/** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. */ public final StringBuilder appendTo(StringBuilder builder, Iterable<?> parts) { return appendTo(builder, parts.iterator()); }
/** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. */ public final StringBuilder appendTo(StringBuilder builder, Iterable<?> parts) { return appendTo(builder, parts.iterator()); }
/** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. */ public final StringBuilder appendTo(StringBuilder builder, Iterable<?> parts) { return appendTo(builder, parts.iterator()); }
/** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. */ public final StringBuilder appendTo(StringBuilder builder, Iterable<?> parts) { return appendTo(builder, parts.iterator()); }
/** * Returns a string representation of {@code iterator}, with the format * {@code [e1, e2, ..., en]}. The iterator will be left exhausted: its * {@code hasNext()} method will return {@code false}. */ public static String toString(Iterator<?> iterator) { return Collections2.STANDARD_JOINER .appendTo(new StringBuilder().append('['), iterator) .append(']') .toString(); }
/** * Returns a string representation of {@code iterator}, with the format * {@code [e1, e2, ..., en]}. The iterator will be left exhausted: its * {@code hasNext()} method will return {@code false}. */ public static String toString(Iterator<?> iterator) { return Collections2.STANDARD_JOINER .appendTo(new StringBuilder().append('['), iterator) .append(']') .toString(); }
/** * Returns a string representation of {@code iterator}, with the format * {@code [e1, e2, ..., en]}. The iterator will be left exhausted: its * {@code hasNext()} method will return {@code false}. */ public static String toString(Iterator<?> iterator) { return Collections2.STANDARD_JOINER .appendTo(new StringBuilder().append('['), iterator) .append(']') .toString(); }
/** * Returns a string representation of {@code iterator}, with the format * {@code [e1, e2, ..., en]}. The iterator will be left exhausted: its * {@code hasNext()} method will return {@code false}. */ public static String toString(Iterator<?> iterator) { return Collections2.STANDARD_JOINER .appendTo(new StringBuilder().append('['), iterator) .append(']') .toString(); }
@Override public String toString() { return Joiner.on(", ") .appendTo(new StringBuilder().append('['), this) .append(']') .toString(); } };
/** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. */ public final String join(Object[] parts) { return join(Arrays.asList(parts)); }
/** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. */ public final String join(Object[] parts) { return join(Arrays.asList(parts)); }
/** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. */ public final String join(Object[] parts) { return join(Arrays.asList(parts)); }
@Override public String toString() { return Joiner.on(", ") .appendTo(new StringBuilder().append('['), this) .append(']') .toString(); } };
/** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. */ public final String join(Object[] parts) { return join(Arrays.asList(parts)); }
@Override public String toString() { return Joiner.on(", ") .appendTo(new StringBuilder().append('['), this) .append(']') .toString(); } };
@Override public String toString() { return Joiner.on(", ") .appendTo(new StringBuilder().append('['), this) .append(']') .toString(); } };
/** * An implementation of {@link Collection#toString()}. */ static String toStringImpl(final Collection<?> collection) { StringBuilder sb = newStringBuilderForCollection(collection.size()).append('['); STANDARD_JOINER.appendTo( sb, Iterables.transform(collection, new Function<Object, Object>() { @Override public Object apply(Object input) { return input == collection ? "(this Collection)" : input; } })); return sb.append(']').toString(); }
/** * An implementation of {@link Collection#toString()}. */ static String toStringImpl(final Collection<?> collection) { StringBuilder sb = newStringBuilderForCollection(collection.size()).append('['); STANDARD_JOINER.appendTo( sb, Iterables.transform(collection, new Function<Object, Object>() { @Override public Object apply(Object input) { return input == collection ? "(this Collection)" : input; } })); return sb.append(']').toString(); }
/** * An implementation of {@link Collection#toString()}. */ static String toStringImpl(final Collection<?> collection) { StringBuilder sb = newStringBuilderForCollection(collection.size()).append('['); STANDARD_JOINER.appendTo( sb, Iterables.transform(collection, new Function<Object, Object>() { @Override public Object apply(Object input) { return input == collection ? "(this Collection)" : input; } })); return sb.append(']').toString(); }
/** * An implementation of {@link Collection#toString()}. */ static String toStringImpl(final Collection<?> collection) { StringBuilder sb = newStringBuilderForCollection(collection.size()).append('['); STANDARD_JOINER.appendTo( sb, Iterables.transform(collection, new Function<Object, Object>() { @Override public Object apply(Object input) { return input == collection ? "(this Collection)" : input; } })); return sb.append(']').toString(); }