List of usage examples for org.apache.commons.lang3.text StrBuilder appendWithSeparators
public StrBuilder appendWithSeparators(final Iterator<?> it, final String separator)
From source file:de.vandermeer.skb.datatool.applications.options.AO_DataEntryType.java
@Override public String getDescriptionLong() { StrBuilder ret = new StrBuilder(50); ret.append("This options directs the data tool to process a particular entry type. "); ret.append("The tool will then load all required entry types and de-reference any SKB links. "); ret.appendNewLine();// w ww . j av a 2 s. c om ret.append( "Available targets for output generation depend on the type, not all types support all targets."); ret.appendNewLine(); ret.append("Available types are: "); Map<String, Set<String>> types = this.tlMap.getTypes(); for (Entry<String, Set<String>> es : types.entrySet()) { ret.append(" - ").append(es.getKey()); ret.append(" -> supporting targets: "); ret.appendWithSeparators(es.getValue(), ", "); ret.appendNewLine(); } ret.appendNewLine(); return ret.toString(); }
From source file:de.vandermeer.skb.datatool.applications.options.AO_DataTarget.java
@Override public String getDescriptionLong() { StrBuilder ret = new StrBuilder(50); ret.append("This options sets the target for the data tool. "); ret.append("A target is important for two things: character conversion and output generation. "); ret.append(/*from w w w .j av a 2s. c om*/ "Since most text is given as UTF-8, targets such as HTML and LaTeX will need a conversion of some characters into their specific format. "); ret.append( "For auto-generating output, the target will have all information required to generate a file in the target language, for instance file extension, special rules for character translation, and a template for output generation. "); ret.appendNewLine(); ret.append("Targets support specific data entry types. "); ret.append("Not all targets support all data entry types. "); ret.append("The selected target must support the selected data entry type. "); ret.appendNewLine(); ret.append("Available targets are: "); ret.appendNewLine(); Map<String, Set<String>> targets = this.tlMap.getTargets(); for (Entry<String, Set<String>> entry : targets.entrySet()) { ret.append(" - ").append(entry.getKey()); ret.append(" -> supporting types: "); ret.appendWithSeparators(entry.getValue(), ", "); ret.appendNewLine(); } ret.appendNewLine(); return ret.toString(); }
From source file:org.labkey.npod.DonorToolsSettings.java
private String makeCSV(List<Integer> ids) { StrBuilder csv = new StrBuilder(); csv.appendWithSeparators(ids, ","); return csv.toString(); }