Package com.helger.base.string
Class StringImplode.ImploderBuilder
java.lang.Object
com.helger.base.string.StringImplode.ImploderBuilder
- Enclosing class:
StringImplode
A simple builder that allows to implode collections of arguments with a lot of customization.
It used by all the "getImploded*" overloads and fulfills the requests of other use cases as
well.
- Since:
- 10.0.0
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the objectlength(int n) Set the number of source items to iterate, depending on the source offset.offset(int n) Set an offset of the source from which to start.separator(char c) source(Collection<?> a) source(Collection<T> a, Function<? super T, String> aMapper) final <T> StringImplode.ImploderBuildersource(T... a)
-
Constructor Details
-
ImploderBuilder
public ImploderBuilder()
-
-
Method Details
-
source
-
source
@Nonnull public <T> StringImplode.ImploderBuilder source(@Nullable Collection<T> a, @Nonnull Function<? super T, String> aMapper) -
source
-
source
-
source
@Nonnull public <T> StringImplode.ImploderBuilder source(@Nullable T[] a, @Nonnull Function<? super T, String> aMapper) -
separator
-
separator
-
offset
Set an offset of the source from which to start. Only values > 0 have an effect.- Parameters:
n- The offset to use- Returns:
- this for chaining
-
length
Set the number of source items to iterate, depending on the source offset. By default all elements from start to end are used. Only values > 0 have an effect.- Parameters:
n- The length to use- Returns:
- this for chaining
-
filterNonEmpty
-
filter
-
build
Description copied from interface:IBuilderBuild the object
-