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

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

Introduction

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

Prototype

String[] EMPTY_STRING_ARRAY

To view the source code for org.apache.commons.lang ArrayUtils EMPTY_STRING_ARRAY.

Click Source Link

Document

An empty immutable String array.

Usage

From source file:com.cyclopsgroup.tornado.hibernate.impl.SessionWrapper.java

String[] getDataSourceNames() {
    return (String[]) sessions.keySet().toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}

From source file:com.qcadoo.report.api.ReportException.java

public ReportException(final Type type, final Throwable cause, final String... args) {
    super(ReportException.generateMessage(type, args), cause);
    this.type = type;
    if (ArrayUtils.isEmpty(args)) {
        this.args = ArrayUtils.EMPTY_STRING_ARRAY;
    } else {//from   ww  w  . j av a  2  s.com
        this.args = args;
    }
}

From source file:com.adobe.acs.commons.notifications.impl.InboxNotificationImpl.java

public void setNotificationActions(String... notificationActions) {
    if (notificationActions == null) {
        this.notificationActions = ArrayUtils.EMPTY_STRING_ARRAY;
    } else {/* www. j  a v  a2s.  c om*/
        this.notificationActions = Arrays.copyOf(notificationActions, notificationActions.length);
    }
}

From source file:com.comphenix.xp.parser.Utility.java

/**
 * Converts an array into a the equivalent string array by performing 
 * toString() on every element./*  w w  w .j  a  v a 2s .  c om*/
 * @param elements - the array to convert.
 * @return The resulting string array.
 */
public static <T> String[] toStringArray(T[] elements) {
    if (elements == null)
        throw new NullArgumentException("elements");
    else if (elements.length == 0)
        return ArrayUtils.EMPTY_STRING_ARRAY;

    String[] copy = new String[elements.length];

    // Get the string representation
    for (int i = 0; i < copy.length; i++) {
        if (elements[i] == null)
            copy[i] = null;
        else
            copy[i] = elements[i].toString();
    }

    return copy;
}

From source file:com.cyclopsgroup.waterview.core.ModuleManager.java

/**
 * Add module package//from www .  j av a 2s. co  m
 *
 * @param packageName Package name
 */
public void addModulePackage(String packageName) {
    modulePackages.add(packageName);
    modulePackageNames = (String[]) modulePackages.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}

From source file:com.opengamma.financial.analytics.timeseries.YieldCurveHistoricalTimeSeriesFunction.java

/**
 * No curves names are excluded.
 */
public YieldCurveHistoricalTimeSeriesFunction() {
    this(ArrayUtils.EMPTY_STRING_ARRAY);
}

From source file:edu.cornell.med.icb.io.ResourceFinder.java

/**
 * No extra paths configuration.
 */
public ResourceFinder() {
    this(ArrayUtils.EMPTY_STRING_ARRAY);
}

From source file:com.cyclopsgroup.waterview.web.Table.java

/**
 * Get column name array//from  www . j a  v  a  2s.c o m
 *
 * @return Array of column names
 */
public String[] getColumnNames() {
    return (String[]) columns.keySet().toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}

From source file:com.cyclopsgroup.waterview.MapAttributes.java

/**
 * Overwrite or implement method in MapValueParser
 *
 * @see com.cyclopsgroup.waterview.Attributes#doGetValues(java.lang.String)
 *//*from  w  w w  .j ava 2 s  .  c  o m*/
protected String[] doGetValues(String name) throws Exception {
    Object object = getMap().get(name);
    if (object == null) {
        return ArrayUtils.EMPTY_STRING_ARRAY;
    }
    ArrayList values = new ArrayList();
    CollectionUtils.addAll(values, TypeUtils.iterate(object));
    String[] ret = new String[values.size()];
    for (int i = 0; i < ret.length; i++) {
        Object value = values.get(i);
        ret[i] = TypeUtils.toString(value);
    }
    return ret;
}

From source file:jef.database.query.function.NoArgSQLFunction.java

public String[] requiresUserFunction() {
    return ArrayUtils.EMPTY_STRING_ARRAY;
}