public static final class JPRATypeModel.JPRAVector extends JPRATypeModelType.JPRAVectorType
jpra vector types.| Modifier and Type | Method and Description |
|---|---|
static JPRATypeModel.JPRAVector |
copyOf(JPRATypeModelType.JPRAVectorType instance)
Creates an immutable copy of a
JPRATypeModelType.JPRAVectorType value. |
JPRATypeModelType.JPRAScalarType |
elementType() |
boolean |
equals(Object another)
This instance is equal to all instances of
JPRAVector that have equal attribute values. |
int |
hashCode()
Returns a precomputed-on-construction hash code from attributes:
length, elementType. |
int |
length() |
static JPRATypeModel.JPRAVector |
of(int length,
JPRATypeModelType.JPRAScalarType elementType)
Construct a new immutable
JPRAVector instance. |
String |
toString()
Prints the immutable value
JPRAVector with attribute values. |
JPRATypeModel.JPRAVector |
withElementType(JPRATypeModelType.JPRAScalarType value)
Copy the current immutable object by setting a value for the
elementType attribute. |
JPRATypeModel.JPRAVector |
withLength(int value)
Copy the current immutable object by setting a value for the
length attribute. |
matchTypepublic int length()
length attributepublic JPRATypeModelType.JPRAScalarType elementType()
elementType attributepublic final JPRATypeModel.JPRAVector withLength(int value)
length attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for lengththis objectpublic final JPRATypeModel.JPRAVector withElementType(JPRATypeModelType.JPRAScalarType value)
elementType attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for elementTypethis objectpublic boolean equals(Object another)
JPRAVector that have equal attribute values.public int hashCode()
length, elementType.public String toString()
JPRAVector with attribute values.public static JPRATypeModel.JPRAVector of(int length, JPRATypeModelType.JPRAScalarType elementType)
JPRAVector instance.length - The value for the length attributeelementType - The value for the elementType attributepublic static JPRATypeModel.JPRAVector copyOf(JPRATypeModelType.JPRAVectorType instance)
JPRATypeModelType.JPRAVectorType value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copyCopyright © 2017 <code@io7m.com> http://io7m.com