@Test public void validToString() { final StringTemplate tmpl = new StringTemplate(Arrays.asList( new SubstituteElement(0), new LiteralElement("="), new SubstituteElement(2), new SubstituteElement(1), new LiteralElement("^"), new SubstituteNameElement("two"))); assertEquals("${0}=${2}${1}^${two}", tmpl.toString()); }
@Override public String toString() { final StringBuilder result = new StringBuilder(); elements_.forEach(result::append); return result.toString(); }
StringTemplate implements Function<Map<Any2<Integer, String>, String>, String> { @Override public String toString() { final StringBuilder result = new StringBuilder(); elements_.forEach(result::append); return result.toString(); } }
StringTemplate implements Function<Map<Any2<Integer, String>, String>, String> { @Override public String toString() { final StringBuilder result = new StringBuilder(); elements_.forEach(result::append); return result.toString(); } StringTemplate(List<Element> elements); }
StringTemplate implements Function<Map<Any2<Integer, String>, String>, String> { @Override public String toString() { final StringBuilder result = new StringBuilder(); elements_.forEach(result::append); return result.toString(); } StringTemplate(List<Element> elements); static StringTemplate fromString(String pattern); @Override String apply(Map<Any2<Integer, String>, String> args); int indexSize(); StringBuilder configString(); @Override String toString(); List<Any2<Integer, String>> getArguments(); }
StringTemplate implements Function<Map<Any2<Integer, String>, String>, String> { @Override public String toString() { final StringBuilder result = new StringBuilder(); elements_.forEach(result::append); return result.toString(); } StringTemplate(List<Element> elements); static StringTemplate fromString(String pattern); @Override String apply(Map<Any2<Integer, String>, String> args); int indexSize(); StringBuilder configString(); @Override String toString(); List<Any2<Integer, String>> getArguments();  }