Package org.immutables.value.processor
Class ImmutableDatatypeTypes
- java.lang.Object
-
- org.immutables.value.processor.Datatypes.DatatypeTypes
-
- org.immutables.value.processor.ImmutableDatatypeTypes
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable final class ImmutableDatatypeTypes extends Datatypes.DatatypeTypesImmutable implementation ofDatatypes.DatatypeTypes.Use the builder to create immutable instances:
ImmutableDatatypeTypes.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDatatypeTypes.BuilderBuilds instances of typeImmutableDatatypeTypes.
-
Field Summary
Fields Modifier and Type Field Description private Proto.AbstractDeclaringdefinedByprivate java.lang.StringpackageGeneratedprivate com.google.common.collect.ImmutableList<ValueType>types
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableDatatypeTypes(Proto.AbstractDeclaring definedBy, java.lang.String packageGenerated, com.google.common.collect.ImmutableList<ValueType> types)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDatatypeTypes.Builderbuilder()Creates a builder forImmutableDatatypeTypes.static ImmutableDatatypeTypescopyOf(Datatypes.DatatypeTypes instance)Creates an immutable copy of aDatatypes.DatatypeTypesvalue.(package private) Proto.AbstractDeclaringdefinedBy()booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableDatatypeTypesthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableDatatypeTypes another)inthashCode()Computes a hash code from attributes:definedBy,packageGenerated,types.(package private) java.lang.StringpackageGenerated()java.lang.StringtoString()Prints the immutable valueDatatypeTypeswith attribute values.(package private) com.google.common.collect.ImmutableList<ValueType>types()ImmutableDatatypeTypeswithDefinedBy(Proto.AbstractDeclaring value)Copy the current immutable object by setting a value for thedefinedByattribute.ImmutableDatatypeTypeswithPackageGenerated(java.lang.String value)Copy the current immutable object by setting a value for thepackageGeneratedattribute.ImmutableDatatypeTypeswithTypes(java.lang.Iterable<? extends ValueType> elements)Copy the current immutable object with elements that replace the content oftypes.ImmutableDatatypeTypeswithTypes(ValueType... elements)Copy the current immutable object with elements that replace the content oftypes.
-
-
-
Field Detail
-
definedBy
private final Proto.AbstractDeclaring definedBy
-
packageGenerated
private final java.lang.String packageGenerated
-
types
private final com.google.common.collect.ImmutableList<ValueType> types
-
-
Constructor Detail
-
ImmutableDatatypeTypes
private ImmutableDatatypeTypes(Proto.AbstractDeclaring definedBy, java.lang.String packageGenerated, com.google.common.collect.ImmutableList<ValueType> types)
-
-
Method Detail
-
definedBy
Proto.AbstractDeclaring definedBy()
- Specified by:
definedByin classDatatypes.DatatypeTypes- Returns:
- The value of the
definedByattribute
-
packageGenerated
java.lang.String packageGenerated()
- Specified by:
packageGeneratedin classDatatypes.DatatypeTypes- Returns:
- The value of the
packageGeneratedattribute
-
types
com.google.common.collect.ImmutableList<ValueType> types()
- Specified by:
typesin classDatatypes.DatatypeTypes- Returns:
- The value of the
typesattribute
-
withDefinedBy
public final ImmutableDatatypeTypes withDefinedBy(Proto.AbstractDeclaring value)
Copy the current immutable object by setting a value for thedefinedByattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for definedBy- Returns:
- A modified copy of the
thisobject
-
withPackageGenerated
public final ImmutableDatatypeTypes withPackageGenerated(java.lang.String value)
Copy the current immutable object by setting a value for thepackageGeneratedattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for packageGenerated- Returns:
- A modified copy of the
thisobject
-
withTypes
public final ImmutableDatatypeTypes withTypes(ValueType... elements)
Copy the current immutable object with elements that replace the content oftypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTypes
public final ImmutableDatatypeTypes withTypes(java.lang.Iterable<? extends ValueType> elements)
Copy the current immutable object with elements that replace the content oftypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of types elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableDatatypeTypesthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableDatatypeTypes another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:definedBy,packageGenerated,types.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueDatatypeTypeswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableDatatypeTypes copyOf(Datatypes.DatatypeTypes instance)
Creates an immutable copy of aDatatypes.DatatypeTypesvalue. 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 DatatypeTypes instance
-
builder
public static ImmutableDatatypeTypes.Builder builder()
Creates a builder forImmutableDatatypeTypes.ImmutableDatatypeTypes.builder() .definedBy(org.immutables.value.processor.meta.Proto.AbstractDeclaring) // requireddefinedBy.packageGenerated(String) // requiredpackageGenerated.addTypes|addAllTypes(org.immutables.value.processor.meta.ValueType) //typeselements .build();- Returns:
- A new ImmutableDatatypeTypes builder
-
-