public static final class ImmutableSystemProperties.Builder extends Object
ImmutableSystemProperties.
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 |
|---|---|
ImmutableSystemProperties |
build()
Builds a new
ImmutableSystemProperties. |
ImmutableSystemProperties.Builder |
from(SystemProperties instance)
Fill a builder with attribute values from the provided
SystemProperties instance. |
ImmutableSystemProperties.Builder |
putAllValue(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
value map. |
ImmutableSystemProperties.Builder |
putValue(Map.Entry<String,? extends String> entry)
Put one entry to the
value map. |
ImmutableSystemProperties.Builder |
putValue(String key,
String value)
Put one entry to the
value map. |
ImmutableSystemProperties.Builder |
value(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
value map. |
public final ImmutableSystemProperties.Builder from(SystemProperties instance)
SystemProperties instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableSystemProperties.Builder putValue(String key, String value)
value map.key - The key in the value mapvalue - The associated value in the value mapthis builder for use in a chained invocationpublic final ImmutableSystemProperties.Builder putValue(Map.Entry<String,? extends String> entry)
value map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableSystemProperties.Builder value(Map<String,? extends String> entries)
value map. Nulls are not permittedentries - The entries that will be added to the value mapthis builder for use in a chained invocationpublic final ImmutableSystemProperties.Builder putAllValue(Map<String,? extends String> entries)
value map. Nulls are not permittedentries - The entries that will be added to the value mapthis builder for use in a chained invocationpublic ImmutableSystemProperties build()
ImmutableSystemProperties.IllegalStateException - if any required attributes are missingCopyright © 2024. All rights reserved.