Example usage for org.apache.commons.lang StringUtils join

List of usage examples for org.apache.commons.lang StringUtils join

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils join.

Prototype

public static String join(Collection<?> collection, String separator) 

Source Link

Document

Joins the elements of the provided Collection into a single String containing the provided elements.

Usage

From source file:com.github.hexocraft.chestpreview.command.CpCommandReload.java

/**
 * @param plugin The plugin that this object belong to.
 *//*  w  w w.  j  av  a2 s  .co  m*/
public CpCommandReload(ChestPreviewPlugin plugin) {
    super(plugin, Permissions.ADMIN.toString());
    this.setDescription(StringUtils.join(messages.cReload, "\n"));
}

From source file:com.hp.autonomy.iod.client.api.search.GetContentRequestBuilder.java

/**
 * @return A map of query parameters suitable for use with {@link QueryTextIndexService}. get is NOT supported on
 * the resulting map/*from   w w  w  .  java  2s. c om*/
 */
public Map<String, Object> build() {
    final Map<String, Object> map = new MultiMap<>();
    map.put("highlight_expression", highlightExpression);
    map.put("start_tag", startTag);
    map.put("end_tag", endTag);
    map.put("print", print);
    map.put("print_fields", StringUtils.join(printFields, ','));

    return map;
}

From source file:com.bigdata.dastor.db.RangeSliceReply.java

@Override
public String toString() {
    return "RangeSliceReply{" + "rows=" + StringUtils.join(rows, ",") + '}';
}

From source file:com.nigelsmall.geoff.Subgraph.java

public String toString() {
    ArrayList<String> s = new ArrayList<>();
    for (AbstractNode node : this.nodes.values()) {
        s.add(node.toString());//from  ww w  .  j a  v  a 2 s .c o m
    }
    for (AbstractRelationship rel : this.relationships) {
        s.add(rel.toString());
    }
    return StringUtils.join(s, "\n");
}

From source file:io.cloudslang.lang.compiler.modeller.transformers.Java_ActionTransformer.java

@Override
public Map<String, String> transform(Map<String, String> rawData) {
    Set<String> expectedKeySet = new HashSet<>(
            Arrays.asList(ScoreLangConstants.ACTION_CLASS_KEY, ScoreLangConstants.ACTION_METHOD_KEY));

    if (rawData != null) {
        // validation case: there is at least one key under java_action property
        Set<String> actualKeySet = rawData.keySet();

        for (String key : actualKeySet) {
            if (!expectedKeySet.remove(key)) {
                throw new RuntimeException("Invalid key for java action: " + key);
            }//  ww w .  ja v  a2s  . c o  m
        }

        if (!expectedKeySet.isEmpty()) {
            throw new RuntimeException(
                    "The following keys for java action are missing: " + StringUtils.join(expectedKeySet, ","));
        }
    }

    return rawData;
}

From source file:com.bigdata.dastor.io.SSTable.java

public static String indexFilename(String dataFile) {
    String[] parts = dataFile.split("-");
    parts[parts.length - 1] = "Index.db";
    return StringUtils.join(parts, "-");
}

From source file:net.grinder.util.GrinderClassPathUtils.java

/**
 * Construct the classpath of ngrinder which is very important and located in the head of
 * classpath.//ww  w  .  j  a v  a2  s  .  co m
 * 
 * @param classPath
 *            classpath string
 * @param logger
 *            logger
 * @return classpath optimized for grinder.
 */
public static String filterForeMostClassPath(String classPath, Logger logger) {
    List<String> classPathList = new ArrayList<String>();
    for (String eachClassPath : checkNotNull(classPath).split(File.pathSeparator)) {
        String filename = FilenameUtils.getName(eachClassPath);
        if (isForeMostJar(filename)) {
            logger.trace("classpath :" + eachClassPath);
            classPathList.add(eachClassPath);
        }
    }
    return StringUtils.join(classPathList, File.pathSeparator);
}

From source file:br.com.surittec.surifaces.chartjs.model.ArrayValue.java

@Override
public String toString() {
    return String.format("%s%s%s", ChartUtil.ARRAY_PREFIX, StringUtils.join(values, ChartUtil.VALUE_SEPARATOR),
            ChartUtil.ARRAY_SUFFIX);//from w w w .  j  av a2  s  .  com
}

From source file:com.adobe.acs.commons.redirectmaps.impl.RedirectEntriesUtils.java

protected static final void updateRedirectMap(SlingHttpServletRequest request, List<String> entries)
        throws PersistenceException {
    ModifiableValueMap mvm = request.getResource().getChild(RedirectMapModel.MAP_FILE_NODE)
            .getChild(JcrConstants.JCR_CONTENT).adaptTo(ModifiableValueMap.class);
    mvm.put(JcrConstants.JCR_DATA, StringUtils.join(entries, "\n"));
    request.getResourceResolver().commit();
    request.getResourceResolver().refresh();
    log.debug("Changes saved...");
}

From source file:de.interactive_instruments.ShapeChange.Model.TaggedValuesImpl.java

public String toString() {

    String res = "";

    for (String tag : keySet()) {

        String[] values = get(tag);

        res += "(" + tag;

        if (values != null && values.length > 0) {
            res += ":" + StringUtils.join(values, ",");
        }/*from  w w w.  j a v a 2s.c om*/

        res += ")";
    }
    return res;
}