Package com.linkedin.alpini.base.misc
Class Joiner
- java.lang.Object
-
- com.linkedin.alpini.base.misc.Joiner
-
public class Joiner extends java.lang.Object
A replacement to the use of the Google collections class of the same name,
-
-
Constructor Summary
Constructors Constructor Description Joiner(java.lang.String delimiter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <B extends java.lang.Appendable,T>
BappendTo(B sb, java.lang.Iterable<T> iterable)
<B extends java.lang.Appendable,T>
BappendTo(B sb, java.util.Iterator<T> iterator)
<B extends java.lang.Appendable,T>
BappendTo(B sb, T... array)
<B extends java.lang.Appendable,T>
BappendTo(B sb, T first, T second, T[] array)
<T> java.lang.StringBuilder
appendTo(java.lang.StringBuilder sb, java.lang.Iterable<T> iterable)
<T> java.lang.StringBuilder
appendTo(java.lang.StringBuilder sb, java.util.Iterator<T> iterator)
<T> java.lang.StringBuilder
appendTo(java.lang.StringBuilder sb, T... array)
<T> java.lang.StringBuilder
appendTo(java.lang.StringBuilder sb, T first, T second, T[] array)
<A> java.lang.String
join(A... array)
<A> java.lang.String
join(A first, A second, A[] array)
<T> java.lang.String
join(java.lang.Iterable<T> iterable)
<T> java.lang.String
join(java.util.Iterator<T> iterator)
static Joiner
on(char delimiter)
static Joiner
on(java.lang.String delimiter)
Joiner
skipNulls()
<T> java.util.stream.Stream<T>
streamOf(java.lang.Iterable<T> iterable)
<T> java.util.stream.Stream<T>
streamOf(java.util.Iterator<T> iterator)
Joiner
useForNull(java.lang.String nullText)
-
-
-
Method Detail
-
on
@CheckReturnValue @Nonnull public static Joiner on(char delimiter)
-
on
@CheckReturnValue @Nonnull public static Joiner on(@Nonnull java.lang.String delimiter)
-
streamOf
@Nonnull public <T> java.util.stream.Stream<T> streamOf(@Nonnull java.lang.Iterable<T> iterable)
-
streamOf
@Nonnull public <T> java.util.stream.Stream<T> streamOf(@Nonnull java.util.Iterator<T> iterator)
-
join
@CheckReturnValue @Nonnull @SafeVarargs public final <A> java.lang.String join(@Nonnull A... array)
-
join
@CheckReturnValue @Nonnull public final <A> java.lang.String join(A first, A second, @Nonnull A[] array)
-
join
@CheckReturnValue @Nonnull public <T> java.lang.String join(@Nonnull java.lang.Iterable<T> iterable)
-
join
@CheckReturnValue @Nonnull public <T> java.lang.String join(@Nonnull java.util.Iterator<T> iterator)
-
appendTo
@CheckReturnValue @Nonnull @SafeVarargs public final <B extends java.lang.Appendable,T> B appendTo(@Nonnull B sb, @Nonnull T... array) throws java.io.IOException
- Throws:
java.io.IOException
-
appendTo
@CheckReturnValue @Nonnull public final <B extends java.lang.Appendable,T> B appendTo(@Nonnull B sb, T first, T second, @Nonnull T[] array) throws java.io.IOException
- Throws:
java.io.IOException
-
appendTo
@CheckReturnValue @Nonnull public <B extends java.lang.Appendable,T> B appendTo(@Nonnull B sb, @Nonnull java.lang.Iterable<T> iterable) throws java.io.IOException
- Throws:
java.io.IOException
-
appendTo
@CheckReturnValue @Nonnull public <B extends java.lang.Appendable,T> B appendTo(@Nonnull B sb, @Nonnull java.util.Iterator<T> iterator) throws java.io.IOException
- Throws:
java.io.IOException
-
appendTo
@CheckReturnValue @Nonnull @SafeVarargs public final <T> java.lang.StringBuilder appendTo(@Nonnull java.lang.StringBuilder sb, @Nonnull T... array)
-
appendTo
@CheckReturnValue @Nonnull public final <T> java.lang.StringBuilder appendTo(@Nonnull java.lang.StringBuilder sb, T first, T second, @Nonnull T[] array)
-
appendTo
@CheckReturnValue @Nonnull public <T> java.lang.StringBuilder appendTo(@Nonnull java.lang.StringBuilder sb, @Nonnull java.lang.Iterable<T> iterable)
-
appendTo
@CheckReturnValue @Nonnull public <T> java.lang.StringBuilder appendTo(@Nonnull java.lang.StringBuilder sb, @Nonnull java.util.Iterator<T> iterator)
-
skipNulls
@CheckReturnValue @Nonnull public Joiner skipNulls()
-
useForNull
@CheckReturnValue @Nonnull public Joiner useForNull(@Nonnull java.lang.String nullText)
-
-