Package io.dialob.boot.controller
Class ImmutablePageAttributes
- java.lang.Object
-
- io.dialob.boot.controller.ImmutablePageAttributes
-
- All Implemented Interfaces:
PageAttributes
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePageAttributes extends Object implements PageAttributes
Immutable implementation ofPageAttributes.Use the builder to create immutable instances:
ImmutablePageAttributes.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePageAttributes.BuilderBuilds instances of typeImmutablePageAttributes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePageAttributes.Builderbuilder()Creates a builder forImmutablePageAttributes.static ImmutablePageAttributescopyOf(PageAttributes instance)Creates an immutable copy of aPageAttributesvalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePageAttributesthat have equal attribute values.com.google.common.collect.ImmutableMap<String,Object>getAttributes()StringgetTemplate()inthashCode()Computes a hash code from attributes:attributes,template.StringtoString()Prints the immutable valuePageAttributeswith attribute values.ImmutablePageAttributeswithAttributes(Map<String,? extends Object> entries)Copy the current immutable object by replacing theattributesmap with the specified map.ImmutablePageAttributeswithTemplate(String value)Copy the current immutable object by setting a value for thetemplateattribute.
-
-
-
Method Detail
-
getAttributes
public com.google.common.collect.ImmutableMap<String,Object> getAttributes()
- Specified by:
getAttributesin interfacePageAttributes- Returns:
- The value of the
attributesattribute
-
getTemplate
public String getTemplate()
- Specified by:
getTemplatein interfacePageAttributes- Returns:
- The value of the
templateattribute
-
withAttributes
public final ImmutablePageAttributes withAttributes(Map<String,? extends Object> entries)
Copy the current immutable object by replacing theattributesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the attributes map- Returns:
- A modified copy of
thisobject
-
withTemplate
public final ImmutablePageAttributes withTemplate(String value)
Copy the current immutable object by setting a value for thetemplateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for template- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePageAttributesthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:attributes,template.
-
toString
public String toString()
Prints the immutable valuePageAttributeswith attribute values.
-
copyOf
public static ImmutablePageAttributes copyOf(PageAttributes instance)
Creates an immutable copy of aPageAttributesvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PageAttributes instance
-
builder
public static ImmutablePageAttributes.Builder builder()
Creates a builder forImmutablePageAttributes.ImmutablePageAttributes.builder() .putAttributes|putAllAttributes(String => Object) //attributesmappings .template(String) // requiredtemplate.build();- Returns:
- A new ImmutablePageAttributes builder
-
-