public static final class Parameters.Builder extends Object
Parameters.
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 |
|---|---|
Parameters |
build()
Builds a new
Parameters. |
Parameters.Builder |
from(Parameters instance)
Fill a builder with attribute values from the provided
Parameters instance. |
Parameters.Builder |
jsonSchema(String jsonSchema)
Initializes the value for the
jsonSchema attribute. |
Parameters.Builder |
properties(Map<String,? extends Object> entries)
Sets or replaces all mappings from the specified map as entries for the
properties map. |
Parameters.Builder |
property(Map.Entry<String,? extends Object> entry)
Put one entry to the
properties map. |
Parameters.Builder |
property(String key,
Object value)
Put one entry to the
properties map. |
Parameters.Builder |
putAllProperties(Map<String,? extends Object> entries)
Put all mappings from the specified map as entries to
properties map. |
Parameters.Builder |
type(String type)
Initializes the value for the
type attribute. |
public final Parameters.Builder from(Parameters instance)
Parameters 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 Parameters.Builder jsonSchema(String jsonSchema)
jsonSchema attribute.jsonSchema - The value for jsonSchema (can be null)this builder for use in a chained invocationpublic final Parameters.Builder type(String type)
type attribute.type - The value for type (can be null)this builder for use in a chained invocationpublic final Parameters.Builder property(String key, Object value)
properties map.key - The key in the properties mapvalue - The associated value in the properties mapthis builder for use in a chained invocationpublic final Parameters.Builder property(Map.Entry<String,? extends Object> entry)
properties map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final Parameters.Builder properties(Map<String,? extends Object> entries)
properties map. Nulls are not permitted as keys or values, but parameter itself can be nullentries - The entries that will be added to the properties mapthis builder for use in a chained invocationpublic final Parameters.Builder putAllProperties(Map<String,? extends Object> entries)
properties map. Nulls are not permittedentries - The entries that will be added to the properties mapthis builder for use in a chained invocationpublic Parameters build()
Parameters.IllegalStateException - if any required attributes are missingCopyright © 2020. All rights reserved.