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 thisResultElementis considered aResultPrimitive, use this method to access its value asBigDecimal.In case thisResultElementis considered aResultPrimitive, use this method to access its value asBigInteger.booleanIn case thisResultElementis considered aResultPrimitive, use this method to access its value asboolean.byteasByte()In case thisResultElementis considered aResultPrimitive, use this method to access its value asbyte.charIn case thisResultElementis considered aResultPrimitive, use this method to access its value aschar.doubleasDouble()In case thisResultElementis considered aResultPrimitive, use this method to access its value asdouble.floatasFloat()In case thisResultElementis considered aResultPrimitive, use this method to access its value asfloat.intIn case thisResultElementis considered aResultPrimitive, use this method to access its value asint.longasLong()In case thisResultElementis considered aResultPrimitive, use this method to access its value aslong.shortasShort()In case thisResultElementis considered aResultPrimitive, use this method to access its value asshort.asString()In case thisResultElementis 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:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asboolean.- Specified by:
asBooleanin interfaceResultElement- Returns:
booleanvalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asboolean.
-
asByte
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asbyte.- Specified by:
asBytein interfaceResultElement- Returns:
bytevalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asbyte.
-
asCharacter
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value aschar.- Specified by:
asCharacterin interfaceResultElement- Returns:
charvalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented aschar.
-
asString
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asString.- Specified by:
asStringin interfaceResultElement- Returns:
Stringobject.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asString.
-
asInteger
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asint.- Specified by:
asIntegerin interfaceResultElement- Returns:
intvalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asint.
-
asShort
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asshort.- Specified by:
asShortin interfaceResultElement- Returns:
shortvalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asshort.
-
asLong
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value aslong.- Specified by:
asLongin interfaceResultElement- Returns:
longvalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented aslong.
-
asFloat
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asfloat.- Specified by:
asFloatin interfaceResultElement- Returns:
floatvalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asfloat.
-
asDouble
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asdouble.- Specified by:
asDoublein interfaceResultElement- Returns:
doublevalue.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asdouble.
-
asBigInteger
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asBigInteger.- Specified by:
asBigIntegerin interfaceResultElement- Returns:
BigIntegerobject.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asBigInteger.
-
asBigDecimal
Description copied from interface:ResultElementIn case thisResultElementis considered aResultPrimitive, use this method to access its value asBigDecimal.- Specified by:
asBigDecimalin interfaceResultElement- Returns:
BigDecimalobject.- Throws:
UnsupportedOperationException- If thisResultElementis not considered aResultPrimitiveor its value cannot be represented asBigDecimal.
-