public static final class JPRATypeModel.JPRAString extends JPRATypeModelType.JPRAStringType
JPRATypeModelType.JPRAStringType.
Use the static factory method to create immutable instances:
JPRATypeModel.JPRAString.of().
| Modifier and Type | Method and Description |
|---|---|
static JPRATypeModel.JPRAString |
copyOf(JPRATypeModelType.JPRAStringType instance)
Creates an immutable copy of a
JPRATypeModelType.JPRAStringType value. |
String |
encoding() |
boolean |
equals(Object another)
This instance is equal to all instances of
JPRAString that have equal attribute values. |
int |
hashCode()
Returns a precomputed-on-construction hash code from attributes:
length, encoding. |
int |
length() |
static JPRATypeModel.JPRAString |
of(int length,
String encoding)
Construct a new immutable
JPRAString instance. |
String |
toString()
Prints the immutable value
JPRAString with attribute values. |
JPRATypeModel.JPRAString |
withEncoding(String encoding)
Copy the current immutable object by setting a value for the
encoding attribute. |
JPRATypeModel.JPRAString |
withLength(int length)
Copy the current immutable object by setting a value for the
length attribute. |
matchTypepublic int length()
length attributepublic String encoding()
encoding attributepublic final JPRATypeModel.JPRAString withLength(int length)
length attribute.
A value equality check is used to prevent copying of the same value by returning this.length - A new value for lengththis objectpublic final JPRATypeModel.JPRAString withEncoding(String encoding)
encoding attribute.
An equals check used to prevent copying of the same value by returning this.encoding - A new value for encodingthis objectpublic boolean equals(Object another)
JPRAString that have equal attribute values.public int hashCode()
length, encoding.public String toString()
JPRAString with attribute values.public static JPRATypeModel.JPRAString of(int length, String encoding)
JPRAString instance.length - The value for the length attributeencoding - The value for the encoding attributepublic static JPRATypeModel.JPRAString copyOf(JPRATypeModelType.JPRAStringType instance)
JPRATypeModelType.JPRAStringType 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 © 2016 <code@io7m.com> http://io7m.com