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

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

Introduction

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

Prototype

public static String join(final Iterable<?> iterable, final String separator) 

Source Link

Document

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

No delimiter is added before or after the list.

Usage

From source file:com.uber.hoodie.common.table.log.block.HoodieDeleteBlock.java

@Override
public byte[] getBytes() throws IOException {
    return StringUtils.join(keysToDelete, ',').getBytes(Charset.forName("utf-8"));
}

From source file:com.l2jfree.loginserver.status.commands.Statistics.java

@Override
protected void useCommand(String command, String params) {
    println("Registered server(s):");
    println("\t...count: " + GameServerManager.getInstance().getRegisteredGameServers().size());
    println("\t...ids: " + StringUtils
            .join(GameServerManager.getInstance().getRegisteredGameServers().keySet().iterator(), ", "));

    // TODO: add more details
}

From source file:eu.europa.ec.fisheries.uvms.spatial.service.exception.SpatialServiceException.java

private static String join(String... params) {
    return StringUtils.join(params, ": ");
}

From source file:exm.stc.ic.ICUtil.java

/** Print a formal argument list, e.g. "(int a, int b, int c)" */
public static void prettyPrintFormalArgs(StringBuilder sb, List<Var> args) {
    List<String> argStrings = new ArrayList<String>();
    for (Var a : args) {
        argStrings.add(a.type().typeName() + " " + a.name());
    }/*from w  w w .jav  a 2 s. com*/

    sb.append("(");
    sb.append(StringUtils.join(args, ", "));
    sb.append(")");
}

From source file:com.l2jfree.status.StatusCommand.java

protected final String listCommands() {
    return StringUtils.join(getCommands(), "|");
}

From source file:com.vmware.photon.controller.api.frontend.exceptions.external.TaskNotCompletedException.java

public TaskNotCompletedException(StepEntity stepEntity) {
    super(ErrorCode.TASK_NOT_COMPLETED);
    this.stepEntity = stepEntity;
    addData("id", stepEntity.getId());
    addData("state", stepEntity.getState().toString());
    addData("error", StringUtils.join(stepEntity.getErrors(), ';'));
}

From source file:htsjdk.samtools.tabix.GFFAlignmentContextEncoder.java

@Override
public void encode(AlignmentContext context) throws IOException {
    w.write(String.format(//from  w ww . jav a 2  s. c om
            "%s\t" + "CGV\t" + "chain\t" + "%d\t" + "%d\t" + "%f\t" + "+\t" + ".\t" + "id \"%s\"; "
                    + "targetChr \"%s\"; " + "targetStart \"%d\"; " + "targetEnd \"%d\"; "
                    + "toNegativeStrand \"%b\"; " + "queryStarts \"%s\"; " + "targetStarts \"%s\"; "
                    + "blockLengths \"%s\";" + "\n",
            context.getChr(), context.getStart(), context.getEnd(), context.getScore(), context.getId(),
            context.getTargetChr(), context.getTargetStart(), context.getTargetEnd(),
            context.getToNegativeStrand(), StringUtils.join(context.getQueryStarts(), ','),
            StringUtils.join(context.getTargetStarts(), ','),
            StringUtils.join(context.getBlockLengths(), ',')));
}

From source file:com.funtl.framework.smoke.core.modules.sys.utils.DictUtils.java

public static String getDictLabels(String values, String type, String defaultValue) {
    if (StringUtils.isNotBlank(type) && StringUtils.isNotBlank(values)) {
        List<String> valueList = Lists.newArrayList();
        for (String value : StringUtils.split(values, ",")) {
            valueList.add(getDictLabel(value, type, defaultValue));
        }/*from  ww w  .j ava 2s  .  c  o  m*/
        return StringUtils.join(valueList, ",");
    }
    return defaultValue;
}

From source file:com.petroglyphcr.cq.maps.model.Map.java

public String getMarkers() {
    return StringUtils.join(markers, ",");
}

From source file:forestry.core.commands.CommandModeInfo.java

public CommandModeInfo(ICommandModeHelper modeHelper) {
    super("info");

    this.modeHelper = modeHelper;
    modeStringArr = modeHelper.getModeNames();
    helpString = StringUtils.join(modeStringArr, ", ");
}