/** * Creates a sorted copy of the provided elements, then turns that into a comma separated list. * * @return the elements converted to strings, sorted, joined with comma ... or "(none)" if the elements are null or * empty */ public static String joinSorted(Collection elements) { return InternalCommonsUtils.joinSorted(elements); }
/** * Creates a sorted copy of the provided elements, then turns that into a comma separated list. * * @return the elements converted to strings, sorted, joined with comma ... or "(none)" if the elements are null or * empty */ public static String joinSorted(Collection elements) { return InternalCommonsUtils.joinSorted(elements); }
@Override public String toString() { String names = InternalCommonsUtils.joinSorted(adapters.keySet()); return String.format("<ClassPropertyAdaptor %s: %s>", beanType.getName(), names); }
private RuntimeException unexpectedNodeType(Tree node, int... expected) { List<String> tokenNames = CollectionFactory.newList(); for (int i = 0; i < expected.length; i++) tokenNames.add(PropertyExpressionParser.tokenNames[expected[i]]); String message = String.format("Node %s was type %s, but was expected to be (one of) %s.", node.toStringTree(), PropertyExpressionParser.tokenNames[node.getType()], InternalCommonsUtils.joinSorted(tokenNames)); return new RuntimeException(message); }
throw new RuntimeException(String.format("Unknown time interval unit '%s' (in '%s'). Defined units: %s.", units, input, InternalCommonsUtils.joinSorted(UNITS.keySet())));