Example usage for org.apache.commons.lang ArrayUtils clone

List of usage examples for org.apache.commons.lang ArrayUtils clone

Introduction

In this page you can find the example usage for org.apache.commons.lang ArrayUtils clone.

Prototype

public static boolean[] clone(boolean[] array) 

Source Link

Document

Clones an array returning a typecast result and handling null.

Usage

From source file:de.iteratec.iteraplan.presentation.dialog.ExcelImport.MassdataMemBean.java

public void setFileContent(byte[] fileContent) {
    this.fileContent = ArrayUtils.clone(fileContent);
}

From source file:de.iteratec.iteraplan.presentation.dialog.ExcelImport.MassdataMemBean.java

public byte[] getFileContent() {
    return ArrayUtils.clone(fileContent);
}

From source file:com.laxser.blitz.web.impl.thread.InvocationBean.java

@Override
public String[] getMethodParameterNames() {
    return (String[]) ArrayUtils.clone(getActionEngine().getParameterNames());
}

From source file:edu.jhu.pha.vospace.node.NodePath.java

/**
 * Replace the .auto path element with random-generated segment
 * @return//from ww  w  .j  a  v  a2 s . c o  m
 */
public NodePath resolve() {
    String[] newPathTokens = (String[]) ArrayUtils.clone(this.pathTokens);
    int lastElm = newPathTokens.length - 1;
    if (lastElm >= 0 && newPathTokens[lastElm].equals(".auto")) {
        newPathTokens[lastElm] = UUID.randomUUID().toString();
        return new NodePath(newPathTokens);
    } else {
        return this;
    }
}

From source file:com.adaptris.security.StdOutput.java

private static byte[] copy(byte[] source) {
    return ArrayUtils.clone(source);
}

From source file:com.flexive.core.security.UserTicketImpl.java

/**
 * {@inheritDoc}
 */
@Override
public long[] getGroups() {
    return ArrayUtils.clone(this.groups);
}

From source file:com.google.gdt.eclipse.designer.uibinder.model.property.StylePropertyEditorTest.java

private static String[] getStyleSourceLines(String styleName, String[] styleLines) {
    if (styleName == null) {
        return new String[] { "// filler filler filler filler filler", "// filler filler filler filler filler",
                "<ui:UiBinder>", "  <g:FlowPanel/>", "</ui:UiBinder>" };
    } else {/*from   ww w .  j a  v a 2 s  .  co  m*/
        String[] intentedStyleLines = (String[]) ArrayUtils.clone(styleLines);
        for (int i = 0; i < intentedStyleLines.length; i++) {
            intentedStyleLines[i] = "      " + intentedStyleLines[i];
        }
        return CodeUtils.join(
                new String[] { "// filler filler filler filler filler", "// filler filler filler filler filler",
                        "<ui:UiBinder>", "  <ui:style>" },
                intentedStyleLines, new String[] { "  </ui:style>",
                        "  <g:FlowPanel styleName='{style." + styleName + "}'/>", "</ui:UiBinder>" });
    }
}

From source file:com.flexive.core.security.UserTicketImpl.java

/**
 * Constructor.//from ww  w .ja v  a  2 s  .co  m
 *
 * @param applicationId the application id this ticket belongs to
 * @param acc           the account
 * @param groups        the groups
 * @param roles         the roles
 * @param aad           the acl assignemnts
 * @param language      the language
 * @param isWebDav      true if this is a webdav ticket
 */
public UserTicketImpl(String applicationId, boolean isWebDav, Account acc, long[] groups, Role[] roles,
        ACLAssignment aad[], FxLanguage language) {
    this.userName = acc.getName();
    this.loginName = acc.getLoginName();
    this.userId = acc.getId();
    this.contactData = acc.getContactData();
    this.multiLogin = acc.isAllowMultiLogin();
    this.roles = (Role[]) ArrayUtils.clone(roles);
    this.groups = ArrayUtils.clone(groups);
    this.mandator = acc.getMandatorId();
    this.applicationId = applicationId;
    this.assignments = aad.clone();
    this.language = language;
    this.webDav = isWebDav;
    populateData();
}

From source file:com.kbot2.scriptable.methods.data.Walking.java

/**
 * Reverses a Tile array.//from   w  w  w. j a  v a 2s .c  om
 *
 * @param in The Tile Array you want to reverse.
 * @return Returns a Tile array.
 * @author Alowaniak
 */
public static Tile[] reversePath(Tile[] in) {
    Tile[] out = (Tile[]) ArrayUtils.clone(in);
    ArrayUtils.reverse(out);
    return out;
}

From source file:de.iteratec.iteraplan.presentation.dialog.common.model.businessmapping.NewBusinessMappingComponentModelPart.java

private static Integer[] copy(Integer[] original) {
    return (Integer[]) ArrayUtils.clone(original);
}