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().

  • Method Details

    • uuid

      public UUID uuid()
      The UUID of the feature.
      Specified by:
      uuid in interface Feature
    • name

      public String name()
      The name of the feature.
      Specified by:
      name in interface Feature
    • description

      public Optional<String> description()
      The optional description of the feature.
      Specified by:
      description in interface Feature
    • enabled

      public Boolean enabled()
      Whether the feature is currently enabled.
      Specified by:
      enabled in interface Feature
    • withUuid

      public final ImmutableFeature withUuid(UUID value)
      Copy the current immutable object by setting a value for the uuid attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for uuid
      Returns:
      A modified copy of the this object
    • withName

      public final ImmutableFeature withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy of the this object
    • withDescription

      public final ImmutableFeature withDescription(String value)
      Copy the current immutable object by setting a present value for the optional description attribute.
      Parameters:
      value - The value for description
      Returns:
      A modified copy of this object
    • withDescription

      public final ImmutableFeature withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for description
      Returns:
      A modified copy of this object
    • withEnabled

      public final ImmutableFeature withEnabled(Boolean value)
      Copy the current immutable object by setting a value for the enabled attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for enabled
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableFeature that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: uuid, name, description, enabled.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Feature with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableFeature copyOf(Feature instance)
      Creates an immutable copy of a Feature value. 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

      public static ImmutableFeature.Builder builder()
      Creates a builder for ImmutableFeature.
       ImmutableFeature.builder()
          .uuid(UUID) // required uuid
          .name(String) // required name
          .description(String) // optional description
          .enabled(Boolean) // optional enabled
          .build();
       
      Returns:
      A new ImmutableFeature builder