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.DatatypeTypes
Immutable implementation of
Datatypes.DatatypeTypes.
Use the builder to create immutable instances:
ImmutableDatatypeTypes.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDatatypeTypes. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Proto.AbstractDeclaringprivate final Stringprivate final com.google.common.collect.ImmutableList<ValueType> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableDatatypeTypes(Proto.AbstractDeclaring definedBy, String packageGenerated, com.google.common.collect.ImmutableList<ValueType> types) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDatatypeTypes.static ImmutableDatatypeTypescopyOf(Datatypes.DatatypeTypes instance) Creates an immutable copy of aDatatypes.DatatypeTypesvalue.(package private) Proto.AbstractDeclaringbooleanThis 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) StringtoString()Prints the immutable valueDatatypeTypeswith attribute values.(package private) com.google.common.collect.ImmutableList<ValueType> types()final ImmutableDatatypeTypesCopy the current immutable object by setting a value for thedefinedByattribute.final ImmutableDatatypeTypeswithPackageGenerated(String value) Copy the current immutable object by setting a value for thepackageGeneratedattribute.final ImmutableDatatypeTypesCopy the current immutable object with elements that replace the content oftypes.final ImmutableDatatypeTypesCopy the current immutable object with elements that replace the content oftypes.
-
Field Details
-
definedBy
-
packageGenerated
-
types
-
-
Constructor Details
-
ImmutableDatatypeTypes
private ImmutableDatatypeTypes(Proto.AbstractDeclaring definedBy, String packageGenerated, com.google.common.collect.ImmutableList<ValueType> types)
-
-
Method Details
-
definedBy
Proto.AbstractDeclaring definedBy()- Specified by:
definedByin classDatatypes.DatatypeTypes- Returns:
- The value of the
definedByattribute
-
packageGenerated
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
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
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
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
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
This instance is equal to all instances ofImmutableDatatypeTypesthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:definedBy,packageGenerated,types. -
toString
Prints the immutable valueDatatypeTypeswith attribute values. -
copyOf
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
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
-