Class ImmutableFeature
java.lang.Object
com.iland.core.web.rest.response.feature.ImmutableFeature
- All Implemented Interfaces:
Feature
@Generated(from="Feature",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableFeature
extends Object
implements Feature
Immutable implementation of
Feature.
Use the builder to create immutable instances:
ImmutableFeature.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableFeature.Builderbuilder()Creates a builder forImmutableFeature.static ImmutableFeatureCreates an immutable copy of aFeaturevalue.The optional description of the feature.enabled()Whether the feature is currently enabled.booleanThis instance is equal to all instances ofImmutableFeaturethat have equal attribute values.inthashCode()Computes a hash code from attributes:uuid,name,description,enabled.name()The name of the feature.toString()Prints the immutable valueFeaturewith attribute values.uuid()The UUID of the feature.final ImmutableFeaturewithDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.final ImmutableFeaturewithDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.final ImmutableFeaturewithEnabled(Boolean value) Copy the current immutable object by setting a value for theenabledattribute.final ImmutableFeatureCopy the current immutable object by setting a value for thenameattribute.final ImmutableFeatureCopy the current immutable object by setting a value for theuuidattribute.
-
Method Details
-
uuid
The UUID of the feature. -
name
The name of the feature. -
description
The optional description of the feature.- Specified by:
descriptionin interfaceFeature
-
enabled
Whether the feature is currently enabled. -
withUuid
Copy the current immutable object by setting a value for theuuidattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for uuid- Returns:
- A modified copy of the
thisobject
-
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
-
equals
This instance is equal to all instances ofImmutableFeaturethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:uuid,name,description,enabled. -
toString
Prints the immutable valueFeaturewith attribute values. -
copyOf
Creates an immutable copy of aFeaturevalue. 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 Feature instance
-
builder
Creates a builder forImmutableFeature.ImmutableFeature.builder() .uuid(UUID) // requireduuid.name(String) // requiredname.description(String) // optionaldescription.enabled(Boolean) // optionalenabled.build();- Returns:
- A new ImmutableFeature builder
-