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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableValueImmutableInfo.private static final classprivate static class -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableValueImmutableInfo(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) private -
Method Summary
Modifier and TypeMethodDescriptionbooleanbuilder()booleancopy()booleanThis 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()booleanbooleanlazyhash()booleanprehash()booleanCreates 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.toString()Prints the immutable valueValueImmutableInfowith attribute values.private static ImmutableValueImmutableInfovalidate(ImmutableValueImmutableInfo instance) withBuilder(boolean value) Copy the current immutable object by setting a value for thebuilderattribute.withCopy(boolean value) Copy the current immutable object by setting a value for thecopyattribute.withIntern(boolean value) Copy the current immutable object by setting a value for theinternattribute.withIsDefault(boolean value) Copy the current immutable object by setting a value for theisDefaultattribute.withLazyhash(boolean value) Copy the current immutable object by setting a value for thelazyhashattribute.withPrehash(boolean value) Copy the current immutable object by setting a value for theprehashattribute.withSingleton(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
-
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
-
ImmutableValueImmutableInfo
private ImmutableValueImmutableInfo(boolean isDefault, boolean builder, boolean copy, boolean intern, boolean prehash, boolean lazyhash, boolean singleton)
-
-
Method Details
-
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
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
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
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
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
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
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
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
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 interfaceAnnotation- Overrides:
equalsin classObject- Returns:
trueifthisis equal toanotherinstance
-
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:isDefault,builder,copy,intern,prehash,lazyhash,singleton.- Specified by:
hashCodein interfaceAnnotation- Overrides:
hashCodein classObject- Returns:
- hashCode value
-
toString
Prints the immutable valueValueImmutableInfowith attribute values.- Specified by:
toStringin interfaceAnnotation- Overrides:
toStringin classObject- 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
-
theCopyOf
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
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
-