Class ImmutableFeature.Builder
java.lang.Object
com.iland.core.web.rest.response.feature.ImmutableFeature.Builder
- Enclosing class:
- ImmutableFeature
@Generated(from="Feature",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableFeature.Builder
extends Object
Builds instances of type
ImmutableFeature.
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 TypeMethodDescriptionbuild()Builds a newImmutableFeature.final ImmutableFeature.Builderdescription(String description) Initializes the optional valuedescriptionto description.final ImmutableFeature.Builderdescription(Optional<String> description) Initializes the optional valuedescriptionto description.final ImmutableFeature.BuilderInitializes the value for theenabledattribute.final ImmutableFeature.BuilderFill a builder with attribute values from the providedFeatureinstance.final ImmutableFeature.BuilderInitializes the value for thenameattribute.final ImmutableFeature.BuilderInitializes the value for theuuidattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedFeatureinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
uuid
Initializes the value for theuuidattribute.- Parameters:
uuid- The value for uuid- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableFeature.Builder description(Optional<String> description) Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
enabled
Initializes the value for theenabledattribute.If not set, this attribute will have a default value as returned by the initializer of
enabled.- Parameters:
enabled- The value for enabled- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFeature.- Returns:
- An immutable instance of Feature
- Throws:
IllegalStateException- if any required attributes are missing
-