List of usage examples for org.apache.commons.lang3 StringUtils join
public static String join(final Iterable<?> iterable, final String separator)
Joins the elements of the provided Iterable into a single String containing the provided elements.
No delimiter is added before or after the list.
From source file:com.threewks.thundr.bind.TestBindTo.java
public Object methodStringArray(String[] argument1) { return StringUtils.join(argument1, ":"); }
From source file:com.synopsys.integration.builder.BuilderStatus.java
public String getFullErrorMessage(String errorMessageSeparator) { return StringUtils.join(errorMessages, errorMessageSeparator); }
From source file:c3.ops.priam.resources.CassandraConfig.java
@GET @Path("/get_seeds") public Response getSeeds() { try {//from ww w.j a v a 2s.c o m final List<String> seeds = priamServer.getId().getSeeds(); if (!seeds.isEmpty()) return Response.ok(StringUtils.join(seeds, ',')).build(); logger.error("Cannot find the Seeds"); } catch (Exception e) { logger.error("Error while executing get_seeds", e); return Response.serverError().build(); } return Response.status(500).build(); }
From source file:com.linkedin.pinot.core.data.readers.CSVRecordReaderTest.java
@BeforeClass public void setUp() throws Exception { FileUtils.forceMkdir(TEMP_DIR);/*ww w . j ava 2s.co m*/ try (FileWriter fileWriter = new FileWriter(DATA_FILE); CSVPrinter csvPrinter = new CSVPrinter(fileWriter, CSVFormat.DEFAULT.withHeader(COLUMNS))) { for (Object[] record : RECORDS) { csvPrinter.printRecord(record[0], StringUtils.join((int[]) record[1], CSVRecordReaderConfig.DEFAULT_MULTI_VALUE_DELIMITER)); } } }
From source file:com.orm.androrm.InStatement.java
private String getList() { return StringUtils.join(mValues, "','"); }
From source file:com.ibasco.agql.protocols.valve.steam.webapi.interfaces.user.GetPlayerBans.java
public GetPlayerBans(int apiVersion, Long... steamIds) { super("GetPlayerBans", apiVersion); urlParam("steamids", StringUtils.join(steamIds, ",")); }
From source file:annis.sqlgen.TableJoinsInFromClauseSqlGenerator.java
@Override public String fromClause(QueryData queryData, List<QueryNode> alternative, String indent) { List<String> tables = new ArrayList<String>(); for (QueryNode node : alternative) tables.add(fromClauseForNode(node, false)); return StringUtils.join(tables, ",\n" + indent + TABSTOP); }
From source file:com.skobka.tram.ui.adapter.RouteListAdapter.java
private String getRouteDays(Route route) { ArrayList<String> days = new ArrayList<>(); for (Day day : route.getDays()) { days.add(day.getTitle());// w ww .j a v a 2s. co m } return StringUtils.join(days, ", "); }
From source file:graph.core.cli.AddCycEdgeCommand.java
@Override protected void executeImpl() { DAGPortHandler dagHandler = (DAGPortHandler) handler; if (data.isEmpty()) { printErrorNoData();//from w ww. j a v a 2 s . c o m return; } ArrayList<String> split = UtilityMethods.split(data, ' '); // Extract microtheory (if one exists) ArrayList<String> edgeMt = UtilityMethods.split(split.get(0), ':'); String edgeStr = edgeMt.get(0); String microtheory = (edgeMt.size() > 1) ? StringUtils.join(edgeMt.subList(1, edgeMt.size()), ':') : null; Node creator = null; if (split.size() > 1) { try { creator = dagHandler.getDAG().findOrCreateNode(UtilityMethods.shrinkString(split.get(1), 1), creator); } catch (Exception e) { print("-1|Invalid creator node.\n"); return; } } try { Node[] nodes = dagHandler.getDAG().parseNodes(edgeStr, creator, dagHandler.get(DAGPortHandler.DYNAMICALLY_ADD_NODES).equals("true"), false); if (nodes == null) { print("-1|Problem parsing nodes.\n"); return; } boolean[] flags = dagHandler.asBooleanArray(DAGPortHandler.EDGE_FLAGS); if (flags.length < 1) flags = new boolean[1]; flags[0] = true; Edge edge = ((CycDAG) dagHandler.getDAG()).findOrCreateEdge(nodes, creator, microtheory, flags); dagHandler.getDAG().writeCommand("addedge " + data); if (edge instanceof ErrorEdge) { print("-1|" + ((ErrorEdge) edge).getError() + "\n"); } else { DAGEdge dagEdge = (DAGEdge) edge; print(dagEdge.getID() + "|" + edge.toString(!dagHandler.get(DAGPortHandler.PRETTY_RESULTS).equals("true")) + "|" + dagEdge.getCreator() + "|" + dagEdge.getCreationDate() + "\n"); } } catch (Exception e) { e.printStackTrace(); print("-1|Problem parsing nodes.\n"); return; } }
From source file:com.thoughtworks.go.domain.Matcher.java
public Matcher(String[] array) { this(StringUtils.join(array, SEPARATOR)); }