/** * Returns a {@code LongCollector} that converts the input numbers to * strings and concatenates them, separated by the specified delimiter, with * the specified prefix and suffix, in encounter order. * * @param delimiter the delimiter to be used between each element * @param prefix the sequence of characters to be used at the beginning of * the joined result * @param suffix the sequence of characters to be used at the end of the * joined result * @return A {@code LongCollector} which concatenates the input numbers, * separated by the specified delimiter, in encounter order */ static LongCollector<?, String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return PartialCollector.joining(delimiter, prefix, suffix, true).asLong( StreamExInternals.joinAccumulatorLong(delimiter)); }
/** * Returns a {@code DoubleCollector} that converts the input numbers to * strings and concatenates them, separated by the specified delimiter, with * the specified prefix and suffix, in encounter order. * * @param delimiter the delimiter to be used between each element * @param prefix the sequence of characters to be used at the beginning of * the joined result * @param suffix the sequence of characters to be used at the end of the * joined result * @return A {@code DoubleCollector} which concatenates the input numbers, * separated by the specified delimiter, in encounter order */ static DoubleCollector<?, String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return PartialCollector.joining(delimiter, prefix, suffix, true).asDouble( StreamExInternals.joinAccumulatorDouble(delimiter)); }
/** * Returns an {@code IntCollector} that converts the input numbers to * strings and concatenates them, separated by the specified delimiter, with * the specified prefix and suffix, in encounter order. * * @param delimiter the delimiter to be used between each element * @param prefix the sequence of characters to be used at the beginning of * the joined result * @param suffix the sequence of characters to be used at the end of the * joined result * @return An {@code IntCollector} which concatenates the input numbers, * separated by the specified delimiter, in encounter order */ static IntCollector<?, String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return PartialCollector.joining(delimiter, prefix, suffix, true).asInt( StreamExInternals.joinAccumulatorInt(delimiter)); }
/** * Returns a {@code LongCollector} that converts the input numbers to * strings and concatenates them, separated by the specified delimiter, in * encounter order. * * @param delimiter the delimiter to be used between each element * @return A {@code LongCollector} which concatenates the input numbers, * separated by the specified delimiter, in encounter order */ static LongCollector<?, String> joining(CharSequence delimiter) { return PartialCollector.joining(delimiter, null, null, false).asLong( StreamExInternals.joinAccumulatorLong(delimiter)); }
/** * Returns a {@code DoubleCollector} that converts the input numbers to * strings and concatenates them, separated by the specified delimiter, in * encounter order. * * @param delimiter the delimiter to be used between each element * @return A {@code DoubleCollector} which concatenates the input numbers, * separated by the specified delimiter, in encounter order */ static DoubleCollector<?, String> joining(CharSequence delimiter) { return PartialCollector.joining(delimiter, null, null, false).asDouble( StreamExInternals.joinAccumulatorDouble(delimiter)); }
/** * Returns an {@code IntCollector} that converts the input numbers to * strings and concatenates them, separated by the specified delimiter, in * encounter order. * * @param delimiter the delimiter to be used between each element * @return An {@code IntCollector} which concatenates the input numbers, * separated by the specified delimiter, in encounter order */ static IntCollector<?, String> joining(CharSequence delimiter) { return PartialCollector.joining(delimiter, null, null, false).asInt( StreamExInternals.joinAccumulatorInt(delimiter)); }