Class ImmutableFeatureRequest
java.lang.Object
com.iland.core.web.rest.request.feature.ImmutableFeatureRequest
- All Implemented Interfaces:
FeatureRequest
@Generated(from="FeatureRequest",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableFeatureRequest
extends Object
implements FeatureRequest
Immutable implementation of
FeatureRequest.
Use the builder to create immutable instances:
ImmutableFeatureRequest.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFeatureRequest. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableFeatureRequest.static ImmutableFeatureRequestcopyOf(FeatureRequest instance) Creates an immutable copy of aFeatureRequestvalue.The optional description of the feature.enabled()Whether the feature is currently enabled.booleanThis instance is equal to all instances ofImmutableFeatureRequestthat have equal attribute values.inthashCode()Computes a hash code from attributes:name,description,enabled,users.name()The name of the feature.toString()Prints the immutable valueFeatureRequestwith attribute values.com.google.common.collect.ImmutableList<String>users()The list of users for which this feature should apply.final ImmutableFeatureRequestwithDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.final ImmutableFeatureRequestwithDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.final ImmutableFeatureRequestwithEnabled(Boolean value) Copy the current immutable object by setting a value for theenabledattribute.final ImmutableFeatureRequestCopy the current immutable object by setting a value for thenameattribute.final ImmutableFeatureRequestCopy the current immutable object with elements that replace the content ofusers.final ImmutableFeatureRequestCopy the current immutable object with elements that replace the content ofusers.
-
Method Details
-
name
The name of the feature.- Specified by:
namein interfaceFeatureRequest
-
description
The optional description of the feature.- Specified by:
descriptionin interfaceFeatureRequest
-
enabled
Whether the feature is currently enabled.- Specified by:
enabledin interfaceFeatureRequest
-
users
The list of users for which this feature should apply. Providing an empty list means the feature will apply to all users.- Specified by:
usersin interfaceFeatureRequest
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
Copy the current immutable object by setting an optional value for thedescriptionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for description- Returns:
- A modified copy of
thisobject
-
withEnabled
Copy the current immutable object by setting a value for theenabledattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for enabled- Returns:
- A modified copy of the
thisobject
-
withUsers
Copy the current immutable object with elements that replace the content ofusers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withUsers
Copy the current immutable object with elements that replace the content ofusers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of users elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableFeatureRequestthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,description,enabled,users. -
toString
Prints the immutable valueFeatureRequestwith attribute values. -
copyOf
Creates an immutable copy of aFeatureRequestvalue. 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 FeatureRequest instance
-
builder
Creates a builder forImmutableFeatureRequest.ImmutableFeatureRequest.builder() .name(String) // requiredname.description(String) // optionaldescription.enabled(Boolean) // optionalenabled.addUsers|addAllUsers(String) //userselements .build();- Returns:
- A new ImmutableFeatureRequest builder
-