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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableFeature.Builder from(Feature instance)
      Fill a builder with attribute values from the provided Feature instance. 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:
      this builder for use in a chained invocation
    • uuid

      @CanIgnoreReturnValue public final ImmutableFeature.Builder uuid(UUID uuid)
      Initializes the value for the uuid attribute.
      Parameters:
      uuid - The value for uuid
      Returns:
      this builder for use in a chained invocation
    • name

      @CanIgnoreReturnValue public final ImmutableFeature.Builder name(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • description

      @CanIgnoreReturnValue public final ImmutableFeature.Builder description(String description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for chained invocation
    • description

      @CanIgnoreReturnValue public final ImmutableFeature.Builder description(Optional<String> description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for use in a chained invocation
    • enabled

      @CanIgnoreReturnValue public final ImmutableFeature.Builder enabled(Boolean enabled)
      Initializes the value for the enabled attribute.

      If not set, this attribute will have a default value as returned by the initializer of enabled.

      Parameters:
      enabled - The value for enabled
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableFeature build()
      Builds a new ImmutableFeature.
      Returns:
      An immutable instance of Feature
      Throws:
      IllegalStateException - if any required attributes are missing