Class ImmutableValueImmutableInfo
- java.lang.Object
-
- org.immutables.value.processor.meta.ValueImmutableInfo
-
- org.immutables.value.processor.meta.ImmutableValueImmutableInfo
-
- All Implemented Interfaces:
java.lang.annotation.Annotation
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableValueImmutableInfo extends ValueImmutableInfoImmutable implementation ofValueImmutableInfo.Use the builder to create immutable instances:
ImmutableValueImmutableInfo.theBuilder(). Use the static factory method to create immutable instances:ImmutableValueImmutableInfo.theOf().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableValueImmutableInfo.BuilderBuilds instances of typeImmutableValueImmutableInfo.private static classImmutableValueImmutableInfo.InternerHolderprivate static classImmutableValueImmutableInfo.InternProxy
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableValueImmutableInfo(boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)privateImmutableValueImmutableInfo(boolean isDefault, boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)privateImmutableValueImmutableInfo(ImmutableValueImmutableInfo.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbuilder()booleancopy()booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableValueImmutableInfothat have equal attribute values.private booleanequalTo(int synthetic, ImmutableValueImmutableInfo another)inthashCode()Computes a hash code from attributes:isDefault,builder,copy,intern,prehash,lazyhash,singleton.booleanintern()booleanisDefault()booleanlazyhash()booleanprehash()booleansingleton()static ImmutableValueImmutableInfo.BuildertheBuilder()Creates a builder forImmutableValueImmutableInfo.static ImmutableValueImmutableInfotheCopyOf(ValueImmutableInfo instance)Creates an immutable copy of aValueImmutableInfovalue.static ImmutableValueImmutableInfotheOf(boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)Construct a new immutableValueImmutableInfoinstance.java.lang.StringtoString()Prints the immutable valueValueImmutableInfowith attribute values.private static ImmutableValueImmutableInfovalidate(ImmutableValueImmutableInfo instance)ImmutableValueImmutableInfowithBuilder(boolean value)Copy the current immutable object by setting a value for thebuilderattribute.ImmutableValueImmutableInfowithCopy(boolean value)Copy the current immutable object by setting a value for thecopyattribute.ImmutableValueImmutableInfowithIntern(boolean value)Copy the current immutable object by setting a value for theinternattribute.ImmutableValueImmutableInfowithIsDefault(boolean value)Copy the current immutable object by setting a value for theisDefaultattribute.ImmutableValueImmutableInfowithLazyhash(boolean value)Copy the current immutable object by setting a value for thelazyhashattribute.ImmutableValueImmutableInfowithPrehash(boolean value)Copy the current immutable object by setting a value for theprehashattribute.ImmutableValueImmutableInfowithSingleton(boolean value)Copy the current immutable object by setting a value for thesingletonattribute.-
Methods inherited from class org.immutables.value.processor.meta.ValueImmutableInfo
annotationType, infoFrom
-
-
-
-
Constructor Detail
-
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 Detail
-
isDefault
public boolean isDefault()
- Overrides:
isDefaultin classValueImmutableInfo- Returns:
- The value of the
isDefaultattribute
-
builder
public boolean builder()
- Specified by:
builderin classValueImmutableInfo- Returns:
- The value of the
builderattribute
-
copy
public boolean copy()
- Specified by:
copyin classValueImmutableInfo- Returns:
- The value of the
copyattribute
-
intern
public boolean intern()
- Specified by:
internin classValueImmutableInfo- Returns:
- The value of the
internattribute
-
prehash
public boolean prehash()
- Specified by:
prehashin classValueImmutableInfo- Returns:
- The value of the
prehashattribute
-
lazyhash
public boolean lazyhash()
- Specified by:
lazyhashin classValueImmutableInfo- Returns:
- The value of the
lazyhashattribute
-
singleton
public boolean singleton()
- Specified by:
singletonin classValueImmutableInfo- Returns:
- The value of the
singletonattribute
-
withIsDefault
public final ImmutableValueImmutableInfo withIsDefault(boolean value)
Copy the current immutable object by setting a value for theisDefaultattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isDefault- Returns:
- A modified copy of the
thisobject
-
withBuilder
public final ImmutableValueImmutableInfo withBuilder(boolean value)
Copy the current immutable object by setting a value for thebuilderattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for builder- Returns:
- A modified copy of the
thisobject
-
withCopy
public final ImmutableValueImmutableInfo withCopy(boolean value)
Copy the current immutable object by setting a value for thecopyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for copy- Returns:
- A modified copy of the
thisobject
-
withIntern
public final ImmutableValueImmutableInfo withIntern(boolean value)
Copy the current immutable object by setting a value for theinternattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for intern- Returns:
- A modified copy of the
thisobject
-
withPrehash
public final ImmutableValueImmutableInfo withPrehash(boolean value)
Copy the current immutable object by setting a value for theprehashattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for prehash- Returns:
- A modified copy of the
thisobject
-
withLazyhash
public final ImmutableValueImmutableInfo withLazyhash(boolean value)
Copy the current immutable object by setting a value for thelazyhashattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lazyhash- Returns:
- A modified copy of the
thisobject
-
withSingleton
public final ImmutableValueImmutableInfo withSingleton(boolean value)
Copy the current immutable object by setting a value for thesingletonattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for singleton- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableValueImmutableInfothat have equal attribute values. As instances of theImmutableValueImmutableInfoclass are interned, theequalsmethod is implemented as an efficient reference equality check.- Specified by:
equalsin interfacejava.lang.annotation.Annotation- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
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:
hashCodein interfacejava.lang.annotation.Annotation- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueValueImmutableInfowith attribute values.- Specified by:
toStringin interfacejava.lang.annotation.Annotation- Overrides:
toStringin classjava.lang.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 immutableValueImmutableInfoinstance.- Parameters:
builder- The value for thebuilderattributecopy- The value for thecopyattributeintern- The value for theinternattributeprehash- The value for theprehashattributelazyhash- The value for thelazyhashattributesingleton- The value for thesingletonattribute- Returns:
- An immutable ValueImmutableInfo instance
-
validate
private static ImmutableValueImmutableInfo validate(ImmutableValueImmutableInfo instance)
-
theCopyOf
public static ImmutableValueImmutableInfo theCopyOf(ValueImmutableInfo instance)
Creates an immutable copy of aValueImmutableInfovalue. 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 forImmutableValueImmutableInfo.ImmutableValueImmutableInfo.theBuilder() .isDefault(boolean) // optionalisDefault.builder(boolean) // requiredbuilder.copy(boolean) // requiredcopy.intern(boolean) // requiredintern.prehash(boolean) // requiredprehash.lazyhash(boolean) // requiredlazyhash.singleton(boolean) // requiredsingleton.build();- Returns:
- A new ImmutableValueImmutableInfo builder
-
-