Class ImmutableValueImmutableInfo

java.lang.Object
org.immutables.value.processor.meta.ValueImmutableInfo
org.immutables.value.processor.meta.ImmutableValueImmutableInfo
All Implemented Interfaces:
Annotation

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableValueImmutableInfo extends ValueImmutableInfo
Immutable implementation of ValueImmutableInfo.

Use the builder to create immutable instances: ImmutableValueImmutableInfo.theBuilder(). Use the static factory method to create immutable instances: ImmutableValueImmutableInfo.theOf().

  • Field Details

    • isDefault

      private final boolean isDefault
    • builder

      private final boolean builder
    • copy

      private final boolean copy
    • intern

      private final boolean intern
    • prehash

      private final boolean prehash
    • lazyhash

      private final boolean lazyhash
    • singleton

      private final boolean singleton
  • Constructor Details

    • ImmutableValueImmutableInfo

      private ImmutableValueImmutableInfo(boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)
    • ImmutableValueImmutableInfo

      private ImmutableValueImmutableInfo(ImmutableValueImmutableInfo.Builder builder)
    • ImmutableValueImmutableInfo

      private ImmutableValueImmutableInfo(boolean isDefault, boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)
  • Method Details

    • isDefault

      public boolean isDefault()
      Overrides:
      isDefault in class ValueImmutableInfo
      Returns:
      The value of the isDefault attribute
    • builder

      public boolean builder()
      Specified by:
      builder in class ValueImmutableInfo
      Returns:
      The value of the builder attribute
    • copy

      public boolean copy()
      Specified by:
      copy in class ValueImmutableInfo
      Returns:
      The value of the copy attribute
    • intern

      public boolean intern()
      Specified by:
      intern in class ValueImmutableInfo
      Returns:
      The value of the intern attribute
    • prehash

      public boolean prehash()
      Specified by:
      prehash in class ValueImmutableInfo
      Returns:
      The value of the prehash attribute
    • lazyhash

      public boolean lazyhash()
      Specified by:
      lazyhash in class ValueImmutableInfo
      Returns:
      The value of the lazyhash attribute
    • singleton

      public boolean singleton()
      Specified by:
      singleton in class ValueImmutableInfo
      Returns:
      The value of the singleton attribute
    • withIsDefault

      public final ImmutableValueImmutableInfo withIsDefault(boolean value)
      Copy the current immutable object by setting a value for the isDefault attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isDefault
      Returns:
      A modified copy of the this object
    • withBuilder

      public final ImmutableValueImmutableInfo withBuilder(boolean value)
      Copy the current immutable object by setting a value for the builder attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for builder
      Returns:
      A modified copy of the this object
    • withCopy

      public final ImmutableValueImmutableInfo withCopy(boolean value)
      Copy the current immutable object by setting a value for the copy attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for copy
      Returns:
      A modified copy of the this object
    • withIntern

      public final ImmutableValueImmutableInfo withIntern(boolean value)
      Copy the current immutable object by setting a value for the intern attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for intern
      Returns:
      A modified copy of the this object
    • withPrehash

      public final ImmutableValueImmutableInfo withPrehash(boolean value)
      Copy the current immutable object by setting a value for the prehash attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for prehash
      Returns:
      A modified copy of the this object
    • withLazyhash

      public final ImmutableValueImmutableInfo withLazyhash(boolean value)
      Copy the current immutable object by setting a value for the lazyhash attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for lazyhash
      Returns:
      A modified copy of the this object
    • withSingleton

      public final ImmutableValueImmutableInfo withSingleton(boolean value)
      Copy the current immutable object by setting a value for the singleton attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for singleton
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableValueImmutableInfo that have equal attribute values. As instances of the ImmutableValueImmutableInfo class are interned, the equals method is implemented as an efficient reference equality check.
      Specified by:
      equals in interface Annotation
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableValueImmutableInfo another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: isDefault, builder, copy, intern, prehash, lazyhash, singleton.
      Specified by:
      hashCode in interface Annotation
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ValueImmutableInfo with attribute values.
      Specified by:
      toString in interface Annotation
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • theOf

      public static ImmutableValueImmutableInfo theOf(boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)
      Construct a new immutable ValueImmutableInfo instance.
      Parameters:
      builder - The value for the builder attribute
      copy - The value for the copy attribute
      intern - The value for the intern attribute
      prehash - The value for the prehash attribute
      lazyhash - The value for the lazyhash attribute
      singleton - The value for the singleton attribute
      Returns:
      An immutable ValueImmutableInfo instance
    • validate

      private static ImmutableValueImmutableInfo validate(ImmutableValueImmutableInfo instance)
    • theCopyOf

      public static ImmutableValueImmutableInfo theCopyOf(ValueImmutableInfo instance)
      Creates an immutable copy of a ValueImmutableInfo 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 ValueImmutableInfo instance
    • theBuilder

      public static ImmutableValueImmutableInfo.Builder theBuilder()
      Creates a builder for ImmutableValueImmutableInfo.
       ImmutableValueImmutableInfo.theBuilder()
          .isDefault(boolean) // optional isDefault
          .builder(boolean) // required builder
          .copy(boolean) // required copy
          .intern(boolean) // required intern
          .prehash(boolean) // required prehash
          .lazyhash(boolean) // required lazyhash
          .singleton(boolean) // required singleton
          .build();
       
      Returns:
      A new ImmutableValueImmutableInfo builder