public static final class MetaResponse.Builder extends Object
MetaResponse.
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 |
|---|---|
MetaResponse |
build()
Builds a new
MetaResponse. |
MetaResponse.Builder |
from(MetaResponse instance)
Fill a builder with attribute values from the provided
MetaResponse instance. |
MetaResponse.Builder |
meta(Map.Entry<String,? extends Metadata> entry)
Put one entry to the
meta map. |
MetaResponse.Builder |
meta(Map<String,? extends Metadata> entries)
Sets or replaces all mappings from the specified map as entries for the
meta map. |
MetaResponse.Builder |
meta(String key,
Metadata value)
Put one entry to the
meta map. |
MetaResponse.Builder |
putAllMeta(Map<String,? extends Metadata> entries)
Put all mappings from the specified map as entries to
meta map. |
public final MetaResponse.Builder from(MetaResponse instance)
MetaResponse 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 MetaResponse.Builder meta(String key, Metadata value)
meta map.key - The key in the meta mapvalue - The associated value in the meta mapthis builder for use in a chained invocationpublic final MetaResponse.Builder meta(Map.Entry<String,? extends Metadata> entry)
meta map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final MetaResponse.Builder meta(Map<String,? extends Metadata> entries)
meta map. Nulls are not permittedentries - The entries that will be added to the meta mapthis builder for use in a chained invocationpublic final MetaResponse.Builder putAllMeta(Map<String,? extends Metadata> entries)
meta map. Nulls are not permittedentries - The entries that will be added to the meta mapthis builder for use in a chained invocationpublic MetaResponse build()
MetaResponse.IllegalStateException - if any required attributes are missingCopyright © 2021. All rights reserved.