public static final class ImmutableMappedTextFile.Builder<T> extends Object
ImmutableMappedTextFile.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableMappedTextFile<T> |
build()
Builds a new
ImmutableMappedTextFile. |
ImmutableMappedTextFile.Builder<T> |
charset(Charset charset)
Initializes the value for the
charset attribute. |
ImmutableMappedTextFile.Builder<T> |
converter(Function<String,T> converter)
Initializes the value for the
converter attribute. |
ImmutableMappedTextFile.Builder<T> |
from(MappedTextFile<T> instance)
Fill a builder with attribute values from the provided
MappedTextFile instance. |
ImmutableMappedTextFile.Builder<T> |
name(String name)
Initializes the value for the
name attribute. |
public final ImmutableMappedTextFile.Builder<T> from(MappedTextFile<T> instance)
MappedTextFile instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableMappedTextFile.Builder<T> name(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final ImmutableMappedTextFile.Builder<T> converter(Function<String,T> converter)
converter attribute.converter - The value for converterthis builder for use in a chained invocationpublic final ImmutableMappedTextFile.Builder<T> charset(Charset charset)
charset attribute.
If not set, this attribute will have a default value as returned by the initializer of charset.
charset - The value for charsetthis builder for use in a chained invocationpublic ImmutableMappedTextFile<T> build()
ImmutableMappedTextFile.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.