Package com.sap.cloud.sdk.result
Interface ResultPrimitive
- All Superinterfaces:
ResultElement
- All Known Implementing Classes:
GsonResultPrimitive
Class representing an unstructured result primitive resulting from a call to an external service (e.g. after invoking
a BAPI or a remote-enabled function module).
Access the content of this result element using the respective method, such as asString()
to obtain a String
object.
-
Method Summary
Modifier and TypeMethodDescriptionIn case thisResultElement
is considered aResultPrimitive
, use this method to access its value asBigDecimal
.In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asBigInteger
.boolean
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asboolean
.byte
asByte()
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asbyte
.char
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value aschar
.double
asDouble()
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asdouble
.float
asFloat()
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asfloat
.int
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asint
.long
asLong()
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value aslong
.short
asShort()
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asshort
.asString()
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asString
.Methods inherited from interface com.sap.cloud.sdk.result.ResultElement
getAsCollection, getAsObject, getAsPrimitive, isResultCollection, isResultObject, isResultPrimitive
-
Method Details
-
asBoolean
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asboolean
.- Specified by:
asBoolean
in interfaceResultElement
- Returns:
boolean
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asboolean
.
-
asByte
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asbyte
.- Specified by:
asByte
in interfaceResultElement
- Returns:
byte
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asbyte
.
-
asCharacter
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value aschar
.- Specified by:
asCharacter
in interfaceResultElement
- Returns:
char
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented aschar
.
-
asString
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asString
.- Specified by:
asString
in interfaceResultElement
- Returns:
String
object.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asString
.
-
asInteger
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asint
.- Specified by:
asInteger
in interfaceResultElement
- Returns:
int
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asint
.
-
asShort
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asshort
.- Specified by:
asShort
in interfaceResultElement
- Returns:
short
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asshort
.
-
asLong
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value aslong
.- Specified by:
asLong
in interfaceResultElement
- Returns:
long
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented aslong
.
-
asFloat
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asfloat
.- Specified by:
asFloat
in interfaceResultElement
- Returns:
float
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asfloat
.
-
asDouble
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asdouble
.- Specified by:
asDouble
in interfaceResultElement
- Returns:
double
value.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asdouble
.
-
asBigInteger
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asBigInteger
.- Specified by:
asBigInteger
in interfaceResultElement
- Returns:
BigInteger
object.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asBigInteger
.
-
asBigDecimal
Description copied from interface:ResultElement
In case thisResultElement
is considered aResultPrimitive
, use this method to access its value asBigDecimal
.- Specified by:
asBigDecimal
in interfaceResultElement
- Returns:
BigDecimal
object.- Throws:
UnsupportedOperationException
- If thisResultElement
is not considered aResultPrimitive
or its value cannot be represented asBigDecimal
.
-