Modifier and Type | Method and Description |
---|---|
static GuidValue |
castOptional(DataValue value)
For internal use only.
|
static GuidValue |
castRequired(DataValue value)
For internal use only.
|
static int |
compare(GuidValue x,
GuidValue y)
Compare two wrapped values for ordering.
|
static boolean |
equal(GuidValue x,
GuidValue y)
Compare two wrapped values for equality.
|
DataType |
getDataType()
Return the type BasicType.GUID_VALUE.
|
com.sap.cloud.server.odata.core.GUID |
getValue()
Return the wrapped value.
|
static GuidValue |
of(com.sap.cloud.server.odata.core.GUID value)
Wrap a
GUID value as a GuidValue. |
static GuidValue |
ofNullable(com.sap.cloud.server.odata.core.GUID value)
Wrap a
GUID value as a GuidValue. |
static GuidValue |
parse(java.lang.String value)
Parse a string (32/36-character GUID format) to a GuidValue.
|
static GuidValue |
random()
Return a new random (Version 4) GuidValue.
|
byte[] |
toBinary()
Convert the wrapped value to binary format (16 bytes).
|
java.lang.String |
toString()
Convert this data value to a string.
|
java.lang.String |
toString32()
Convert the wrapped value to the 32-character GUID format, e.g.
|
java.lang.String |
toString36()
Convert the wrapped value to the 36-character GUID format, e.g.
|
cloneMutable, equals, getTypeCode, hashCode
public static GuidValue castOptional(DataValue value)
For internal use only.
value
- (internal use only)public static GuidValue castRequired(DataValue value)
For internal use only.
value
- (internal use only)public static int compare(GuidValue x, GuidValue y)
Compare two wrapped values for ordering.
x
- First object for comparison.y
- Second object for comparison.x.value < y.value
, 0 if x.value == y.value
, or 1 if x.value > y.value
.public static boolean equal(GuidValue x, GuidValue y)
Compare two wrapped values for equality.
x
- (nullable) First object for comparison.y
- (nullable) Second object for comparison.true
if x.value == y.value
or if both arguments are null
, otherwise false
.public DataType getDataType()
Return the type BasicType.GUID_VALUE.
getDataType
in class DataValue
public com.sap.cloud.server.odata.core.GUID getValue()
Return the wrapped value.
public static GuidValue of(com.sap.cloud.server.odata.core.GUID value)
Wrap a GUID
value as a GuidValue.
value
- Value to be wrapped.public static GuidValue ofNullable(com.sap.cloud.server.odata.core.GUID value)
Wrap a GUID
value as a GuidValue.
value
- (nullable) Value to be wrapped.public static GuidValue parse(java.lang.String value)
Parse a string (32/36-character GUID format) to a GuidValue.
value
- Value to be parsed.public static GuidValue random()
Return a new random (Version 4) GuidValue.
public byte[] toBinary()
Convert the wrapped value to binary format (16 bytes).
GuidValue.value
.public java.lang.String toString()
Convert this data value to a string.
If the GuidValue.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 java.lang.String toString32()
Convert the wrapped value to the 32-character GUID format, e.g. "21ec20203aea1069a2dd08002b30309d".
GuidValue.value
.public java.lang.String toString36()
Convert the wrapped value to the 36-character GUID format, e.g. "21ec2020-3aea-1069-a2dd-08002b30309d".
GuidValue.value
.