public class CharValue extends DataValue
DataValue subclass that wraps a CharValue.value of type char.
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(CharValue left,
CharValue right)
Compare two wrapped values for ordering.
|
static boolean |
equal(CharValue left,
CharValue right)
Compare two wrapped values for equality.
|
boolean |
equals(java.lang.Object value)
Return
true if this object is equal to value. |
DataType |
getDataType()
Return the type BasicType.CHAR.
|
int |
getTypeCode()
Return data type code of the wrapped value, equivalent to
dataType.code. |
char |
getValue()
Return the wrapped value.
|
int |
hashCode()
Hash the wrapped value to a number.
|
static CharValue |
of(char value)
Wrap a
char value as an object. |
static CharValue |
ofNullable(java.lang.Character value)
Wrap a nullable
char value as an object. |
static java.lang.Character |
toNullable(java.lang.Object value)
Convert a wrapped
char value to a nullable char. |
java.lang.String |
toString()
Convert this data value to a string.
|
static char |
unwrap(java.lang.Object value)
Convert a wrapped
char value to a char. |
cloneMutablepublic static int compare(CharValue left, CharValue right)
Compare two wrapped values for ordering.
left - (nullable) First object for comparison.right - (nullable) Second object for comparison.left.value < right.value, 0 if left.value == right.value, or 1 if left.value > right.value.public static boolean equal(CharValue left, CharValue right)
Compare two wrapped values for equality.
left - (nullable) First object for comparison.right - (nullable) Second object for comparison.true if left.value == right.value or if both arguments are null, otherwise false.public boolean equals(java.lang.Object value)
Return true if this object is equal to value.
public DataType getDataType()
Return the type BasicType.CHAR.
getDataType in class DataValuepublic int getTypeCode()
Return data type code of the wrapped value, equivalent to dataType.code.
getTypeCode in class DataValuedataType.code.public char getValue()
Return the wrapped value.
public int hashCode()
Hash the wrapped value to a number.
public static CharValue of(char value)
Wrap a char value as an object.
value - Value to be wrapped.public static CharValue ofNullable(java.lang.Character value)
Wrap a nullable char value as an object.
value - (nullable) Value to be wrapped.public static java.lang.Character toNullable(java.lang.Object value)
Convert a wrapped char value to a nullable char.
CastException if value is not a wrapped char or null.
value - (nullable) The wrapped value.public java.lang.String toString()
Convert this data value to a string.
If the CharValue.dataType is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used.
JSON format is used for structured values (arrays and objects).
public static char unwrap(java.lang.Object value)
Convert a wrapped char value to a char.
CastException if value is not a wrapped char.
value - (nullable) The wrapped value.