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.pureinfo.srm.patent.action.PatentFeeToBatchAddAction.java

/**
 * @see com.pureinfo.ark.interaction.ActionBase#executeAction()
 *//*from   www.  j a va2s  . c o m*/
public ActionForward executeAction() throws PureException {
    // ID
    String[] a = request.getParameterValues("listHasFee");
    // ID
    String[] b = request.getParameterValues("listNoFee");
    String sPatentIds = "";
    if (a != null && a.length > 0) {
        sPatentIds = StringUtils.join(a, ',');
    }
    if (b != null && b.length > 0) {
        sPatentIds += ',' + StringUtils.join(b, ',');
    }
    logger.debug("patentIds : " + sPatentIds);
    request.setAttribute("patentIds", sPatentIds);
    return mapping.findForward("success");
}

From source file:edu.snu.dolphin.dnn.util.NeuralNetworkUtils.java

/**
 * Converts a list of integers for a shape to a string.
 * @param dimensionList a list of integers for a shape.
 * @return a string for a shape./*www.j  a va  2  s  .  co  m*/
 */
public static String shapeToString(final List<Integer> dimensionList) {
    return StringUtils.join(dimensionList, SHAPE_DELIMITER);
}

From source file:mrcg.domain.Index.java

public String getName() {
    return StringUtils.join(columns, "_");
}

From source file:com.siemens.scr.avt.ad.api.PersistentObjectNotFoundException.java

public PersistentObjectNotFoundException(Class<?> objType, String[] paramTypes, Object[] params) {
    this(objType + " with parameters <" + StringUtils.join(paramTypes, LIST_DELIMITER) + ">=("
            + StringUtils.join(params, LIST_DELIMITER) + ") is not found!");
}

From source file:com.siemens.scr.avt.ad.query.common.AbstractQueryBuilder.java

private static String conjunctionOf(List<String> conditions) {
    return StringUtils.join(conditions, SPACE + AND + SPACE);
}

From source file:com.rackspacecloud.blueflood.types.Locator.java

public static Locator createLocatorFromPathComponents(String tenantId, String... parts)
        throws IllegalArgumentException {
    return new Locator(tenantId + metricTokenSeparator + StringUtils.join(parts, metricTokenSeparator));
}

From source file:com.thoughtworks.go.config.exceptions.NoSuchAgentException.java

public NoSuchAgentException(List<String> unknownAgents) {
    super(String.format("Agents [%s] could not be found", StringUtils.join(unknownAgents, ", ")));
}

From source file:com.edmunds.etm.common.api.RegexUrlToken.java

@Override
public String toRegex() {
    if (regex == null) {
        regex = StringUtils.join(getValues(), "|");
    }
    return regex;
}

From source file:com.microsoft.azure.shortcuts.resources.samples.ResourceGroupsSample.java

public static void test(Subscription subscription) throws Exception {
    // List resource groups
    Set<String> groupNames = subscription.resourceGroups().asMap().keySet();
    System.out.println("Group names: \n\t" + StringUtils.join(groupNames, ",\n\t"));

    Map<String, ResourceGroup> groups = subscription.resourceGroups().asMap();
    for (ResourceGroup group : groups.values()) {
        printGroup(group);/*from www  .ja va  2  s  .  c o m*/
    }

    // Create a resource group
    String groupName = "group" + String.valueOf(System.currentTimeMillis());
    System.out.println("Creating group " + groupName);
    subscription.resourceGroups().define(groupName).withRegion(Region.US_WEST).withTag("hello", "world")
            .create();

    // Read a specific resource group
    ResourceGroup resourceGroup = subscription.resourceGroups(groupName);
    printGroup(resourceGroup);

    // Update a resource group
    subscription.resourceGroups().update(groupName).withTag("foo", "bar").withoutTag("hello").apply();

    // Delete a specific resource group
    System.out.println("Deleting group " + groupName);
    subscription.resourceGroups(groupName).delete();
}

From source file:com.thoughtworks.go.domain.AllConfigErrors.java

public String asString() {
    return StringUtils.join(this.stream().map(new Function<ConfigErrors, String>() {
        @Override//from w  ww  .j av  a2 s.  c o  m
        public String apply(ConfigErrors errors) {
            return errors.asString();
        }
    }).collect(Collectors.toList()), ", ");
}