Package io.dialob.boot.controller
Class ImmutablePageAttributes.Builder
java.lang.Object
io.dialob.boot.controller.ImmutablePageAttributes.Builder
- Enclosing class:
ImmutablePageAttributes
@Generated(from="PageAttributes",
generator="Immutables")
@NotThreadSafe
public static final class ImmutablePageAttributes.Builder
extends Object
Builds instances of type
ImmutablePageAttributes.
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.
-
Method Summary
Modifier and TypeMethodDescriptionattributes(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theattributesmap.build()Builds a newImmutablePageAttributes.from(PageAttributes instance) Fill a builder with attribute values from the providedPageAttributesinstance.putAllAttributes(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toattributesmap.putAttributes(String key, Object value) Put one entry to theattributesmap.putAttributes(Map.Entry<String, ? extends Object> entry) Put one entry to theattributesmap.Initializes the value for thetemplateattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedPageAttributesinstance. 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.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putAttributes
@CanIgnoreReturnValue public final ImmutablePageAttributes.Builder putAttributes(String key, Object value) Put one entry to theattributesmap.- Parameters:
key- The key in the attributes mapvalue- The associated value in the attributes map- Returns:
thisbuilder for use in a chained invocation
-
putAttributes
@CanIgnoreReturnValue public final ImmutablePageAttributes.Builder putAttributes(Map.Entry<String, ? extends Object> entry) Put one entry to theattributesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
attributes
@CanIgnoreReturnValue public final ImmutablePageAttributes.Builder attributes(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theattributesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the attributes map- Returns:
thisbuilder for use in a chained invocation
-
putAllAttributes
@CanIgnoreReturnValue public final ImmutablePageAttributes.Builder putAllAttributes(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toattributesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the attributes map- Returns:
thisbuilder for use in a chained invocation
-
template
Initializes the value for thetemplateattribute.- Parameters:
template- The value for template- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutablePageAttributes.- Returns:
- An immutable instance of PageAttributes
- Throws:
IllegalStateException- if any required attributes are missing
-