List of usage examples for org.apache.commons.lang StringUtils join
public static String join(Collection<?> collection, String separator)
Joins the elements of the provided Collection
into a single String containing the provided elements.
From source file:cn.newtouch.util.hibernate.ConvertUtils.java
/** * ????(getter), ??./*from w w w . java2 s . c o m*/ * * @param collection * ???. * @param propertyName * ??????. * @param separator * . */ @SuppressWarnings("unchecked") public static String convertElementPropertyToString(final Collection collection, final String propertyName, final String separator) { List list = convertElementPropertyToList(collection, propertyName); return StringUtils.join(list, separator); }
From source file:com.atlassian.connector.eclipse.team.ui.TeamUiMessageUtils.java
private static String getErrorHints() { return "- You have correctly defined Repository Mappings.\n" + "- You are using a supported team provider. Supported providers: " + StringUtils.join(TeamUiUtils.getSupportedTeamConnectors(), ", "); }
From source file:com.pureinfo.srm.patent.action.EmailRemindPatentAction.java
/** * @see com.pureinfo.ark.interaction.ActionBase#executeAction() *//*from ww w.j a va 2 s. c o m*/ public ActionForward executeAction() throws PureException { String[] sIds = request.getParameterValues("id"); String sPatentIds = StringUtils.join(sIds, ','); IPatentMgr mgr = (IPatentMgr) ArkContentHelper.getContentMgrOf(Patent.class); String[] msgs = mgr.sendEmailForHandRemind(sPatentIds); request.setAttribute("msg", msgs); request.setAttribute("forward", "RemindYearFeePatentList.do"); return mapping.findForward("info"); }
From source file:com.gmail.gkovalechyn.automaticevents.cmds.Info.java
public static boolean command(AutomaticEvents plugin, CommandSender sender, String[] args) { if (args.length < 2) { plugin.mh.displayCommandUsage(sender, MessageHandler.Message.CMD_INFO); return true; } else {//from w ww . j av a2s . c o m Event evt = plugin.manager.getEvent(args[1]); if (evt != null) { Map<String, Variable> vars = evt.getVariables(); List<Objective> o = evt.getObjectives(); sender.sendMessage("Open: " + plugin.manager.isEventOpen(args[1])); sender.sendMessage("Running: " + evt.isRunning()); sender.sendMessage("Broken: " + evt.isBroken()); sender.sendMessage("Event file: " + evt.getYamlFileName()); sender.sendMessage("Objectives: "); for (Objective obj : o) { sender.sendMessage("- " + obj.getName()); } sender.sendMessage("Variables: "); for (Map.Entry<String, Variable> entry : vars.entrySet()) { sender.sendMessage( "- " + entry.getKey() + ": " + StringUtils.join(entry.getValue().toArgs(), " ")); } return true; } else { sender.sendMessage("That event does not exist."); return true; } } }
From source file:com.skymobi.monitor.util.FormatUtil.java
public String join(Iterator iterator) { return StringUtils.join(iterator, ","); }
From source file:net.grinder.util.GrinderClassPathUtils.java
/** * Construct classPath for grinder from given classpath string. * //w w w.j a v a 2 s .co m * @param classPath * classpath string * @param logger * logger * @return classpath optimized for grinder. */ public static String filterClassPath(String classPath, Logger logger) { List<String> classPathList = new ArrayList<String>(); for (String eachClassPath : checkNotNull(classPath).split(File.pathSeparator)) { String filename = FilenameUtils.getName(eachClassPath); if (isNotJarOrUselessJar(filename)) { continue; } logger.trace("classpath :" + eachClassPath); classPathList.add(eachClassPath); } return StringUtils.join(classPathList, File.pathSeparator); }
From source file:com.dilipkumarg.qb.core.OnClauseBuilder.java
@Override protected String buildWhereString(List<String> strings) { String conditionsString = StringUtils.join(strings, WHERE_SEPARATOR); return String.format(ON_TEMPLATE, conditionsString); }
From source file:com.microsoft.azure.shortcuts.services.samples.SizesSample.java
public static void test(Azure azure) throws Exception { List<String> sizeNames = azure.sizes().names(true, false); System.out.println("Available VM sizes: " + StringUtils.join(sizeNames, ", ")); }
From source file:com.appleframework.monitor.util.FormatUtil.java
public String join(Iterator<?> iterator) { return StringUtils.join(iterator, ","); }
From source file:com.Shadersoft.GeneralOP.Listeners.PlayerListener.java
@EventHandler public void playerJoinEvent(PlayerJoinEvent e) { Player player = e.getPlayer();//from w ww.ja va 2s . c o m //Set fancy Tab for (Player p : plugin.server.getOnlinePlayers()) { TablistUtil.setForPlayer(p, ChatUtils.colorize(StringUtils.join(plugin.config.getStringList("tablist.header"), "\n")), ChatUtils.colorize(StringUtils.join(plugin.config.getStringList("tablist.footer"), "\n"))); } }