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:appsgate.lig.eude.interpreter.langage.nodes.NodeEventsAnd.java
@Override public String getExpertProgramScript() { return "[" + StringUtils.join(listOfEvent, " AND ") + "]"; }
From source file:com.spartasystems.holdmail.mapper.MessageListMapper.java
protected MessageListItem toMessageListItem(MessageEntity entity) { List<String> recipients = entity.getRecipients().stream().map(MessageRecipientEntity::getRecipientEmail) .collect(Collectors.toList()); String recipientString = StringUtils.join(recipients, ", "); return new MessageListItem(entity.getMessageId(), entity.getReceivedDate().getTime(), entity.getSenderEmail(), recipientString, entity.getSubject()); }
From source file:com.lyncode.jtwig.functions.internal.string.UrlEncode.java
private String encodeMap(Map argument) throws FunctionException { List<String> pieces = new ArrayList<String>(); for (Object key : argument.keySet()) { pieces.add(encode(key.toString()) + "=" + encode(argument.get(key).toString())); }//from ww w . j a va 2 s. c o m return StringUtils.join(pieces, "&"); }
From source file:com.reprezen.kaizen.oasparser.jsonoverlay.gen.InterfaceGenerator.java
@Override protected String getTypeDeclaration(Type type, String suffix) { String superType = getSuperType(type); requireTypes(superType);/*from w ww . java 2 s. c o m*/ requireTypes(type.getExtendInterfaces()); List<String> allTypes = Lists.newArrayList(superType); allTypes.addAll(type.getExtendInterfaces()); return t("public interface ${name} extends ${0}", type, StringUtils.join(allTypes, ", ")); }
From source file:com.jaspersoft.android.jaspermobile.cookie.LollipopCookieManager.java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override//w ww . j a v a 2 s. c o m protected void semanticConfiguration(final String targetDomain) { final CookieManager cookieManager = CookieManager.getInstance(); cookieManager.removeSessionCookies(new ValueCallback<Boolean>() { @Override public void onReceiveValue(Boolean value) { cookieManager.setCookie(targetDomain, StringUtils.join(getCookieStore(), ";")); CookieManager.getInstance().flush(); } }); }
From source file:com.l2jserver.util.transformer.impl.ArrayTransformer.java
@Override @SuppressWarnings("unchecked") public String transform(Class<? extends T[]> type, T[] value) { final Transformer<T> transformer = (Transformer<T>) TransformerFactory .getTransfromer(type.getComponentType()); final String[] values = new String[value.length]; int i = 0;//from w w w . j av a2 s .c o m for (final T item : value) { values[i++] = transformer.transform((Class<T>) type.getComponentType(), item); } return StringUtils.join(values, '|'); }
From source file:net.pms.newgui.DummyFrame.java
public String getLog() { return StringUtils.join(log, "\n"); }
From source file:com.anrisoftware.mongoose.buildins.echobuildin.EchoBuildin.java
private void setupUnnamed(List<Object> unnamedArgs) { text = StringUtils.join(unnamedArgs, SEPARATOR); }
From source file:com.thinkbiganalytics.servicemonitor.rest.client.ambari.AmbariAlertsCommand.java
@Override public void beforeRestRequest() { sb = new StringBuffer(); super.beforeRestRequest(); List<String> serviceList = ServiceMonitorCheckUtil.getServiceNames(this.getServices()); String serviceString = StringUtils.join(serviceList, ","); parameters = new HashMap<>(); sb.append("fields=*"); sb.append("&Alert/service_name.in(").append(serviceString).append(")"); }
From source file:edu.utd.robocode.RobocodeRunner.java
public void run(String[] robots) { // Create the RobocodeEngine // IRobocodeEngine engine = new RobocodeEngine(new // java.io.File("C:/Robocode")); // Run from C:/Robocode RobocodeEngine engine = new RobocodeEngine(); // Run from current // working directory // Add battle listener to our RobocodeEngine engine.addBattleListener(adapter);//from ww w . j a v a2 s . c o m // Show the battles engine.setVisible(false); // Setup the battle specification int numberOfRounds = 5; BattlefieldSpecification battlefield = new BattlefieldSpecification(800, 600); // 800x600 Logger.getAnonymousLogger().info(RobocodeEngine.getRobotsDir().toString()); RobotSpecification[] selectedRobots = engine.getLocalRepository(StringUtils.join(robots, ',')); // RobotSpecification[] selectedRobots = engine.getLocalRepository(); for (RobotSpecification robot : selectedRobots) { System.out.print(robot.getName() + ", "); } // RobotSpecification[] selectedRobots = // engine.getLocalRepository("tested.robots.BattleLost,tested.robots.EnvAttacks"); BattleSpecification battleSpec = new BattleSpecification(numberOfRounds, battlefield, selectedRobots); // Run our specified battle and let it run till it's over engine.runBattle(battleSpec, true/* wait till the battle is over */); }