Class ImmutableFirstPartyStrategy
- java.lang.Object
-
- org.immutables.value.processor.meta.AttributeBuilderReflection.FirstPartyStrategy
-
- org.immutables.value.processor.meta.ImmutableFirstPartyStrategy
-
- All Implemented Interfaces:
AttributeBuilderReflection.Strategy
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable final class ImmutableFirstPartyStrategy extends AttributeBuilderReflection.FirstPartyStrategyImmutable implementation ofAttributeBuilderReflection.FirstPartyStrategy.Use the static factory method to create immutable instances:
ImmutableFirstPartyStrategy.of().
-
-
Field Summary
Fields Modifier and Type Field Description private ValueAttributevalueAttribute
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableFirstPartyStrategy(ImmutableFirstPartyStrategy original, ValueAttribute valueAttribute)privateImmutableFirstPartyStrategy(ValueAttribute valueAttribute)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFirstPartyStrategycopyOf(AttributeBuilderReflection.FirstPartyStrategy instance)Creates an immutable copy of aAttributeBuilderReflection.FirstPartyStrategyvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableFirstPartyStrategythat have equal attribute values.private booleanequalTo(int synthetic, ImmutableFirstPartyStrategy another)inthashCode()Computes a hash code from attributes:valueAttribute.static ImmutableFirstPartyStrategyof(ValueAttribute valueAttribute)Construct a new immutableFirstPartyStrategyinstance.java.lang.StringtoString()Prints the immutable valueFirstPartyStrategywith attribute values.(package private) ValueAttributevalueAttribute()ImmutableFirstPartyStrategywithValueAttribute(ValueAttribute value)Copy the current immutable object by setting a value for thevalueAttributeattribute.-
Methods inherited from class org.immutables.value.processor.meta.AttributeBuilderReflection.FirstPartyStrategy
attributeValueType, getAttributeBuilderDescriptor, isAttributeBuilder
-
-
-
-
Field Detail
-
valueAttribute
private final ValueAttribute valueAttribute
-
-
Constructor Detail
-
ImmutableFirstPartyStrategy
private ImmutableFirstPartyStrategy(ValueAttribute valueAttribute)
-
ImmutableFirstPartyStrategy
private ImmutableFirstPartyStrategy(ImmutableFirstPartyStrategy original, ValueAttribute valueAttribute)
-
-
Method Detail
-
valueAttribute
ValueAttribute valueAttribute()
- Specified by:
valueAttributein classAttributeBuilderReflection.FirstPartyStrategy- Returns:
- The value of the
valueAttributeattribute
-
withValueAttribute
public final ImmutableFirstPartyStrategy withValueAttribute(ValueAttribute value)
Copy the current immutable object by setting a value for thevalueAttributeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueAttribute- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableFirstPartyStrategythat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableFirstPartyStrategy another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:valueAttribute.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueFirstPartyStrategywith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static ImmutableFirstPartyStrategy of(ValueAttribute valueAttribute)
Construct a new immutableFirstPartyStrategyinstance.- Parameters:
valueAttribute- The value for thevalueAttributeattribute- Returns:
- An immutable FirstPartyStrategy instance
-
copyOf
public static ImmutableFirstPartyStrategy copyOf(AttributeBuilderReflection.FirstPartyStrategy instance)
Creates an immutable copy of aAttributeBuilderReflection.FirstPartyStrategyvalue. 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 FirstPartyStrategy instance
-
-