public interface ResultPrimitive extends ResultElement
Access the content of this result element using the respective method, such as asString()
to obtain a String
object.
Modifier and Type | Method and Description |
---|---|
BigDecimal |
asBigDecimal()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as BigDecimal . |
BigInteger |
asBigInteger()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as BigInteger . |
boolean |
asBoolean()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as boolean . |
byte |
asByte()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as byte . |
char |
asCharacter()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as char . |
double |
asDouble()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as double . |
float |
asFloat()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as float . |
int |
asInteger()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as int . |
long |
asLong()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as long . |
short |
asShort()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as short . |
String |
asString()
In case this
ResultElement is considered a ResultPrimitive , use this method to access its value
as String . |
getAsCollection, getAsObject, getAsPrimitive, isResultCollection, isResultObject, isResultPrimitive
boolean asBoolean() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as boolean
.asBoolean
in interface ResultElement
boolean
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as boolean
.byte asByte() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as byte
.asByte
in interface ResultElement
byte
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as byte
.char asCharacter() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as char
.asCharacter
in interface ResultElement
char
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as char
.@Nonnull String asString() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as String
.asString
in interface ResultElement
String
object.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as String
.int asInteger() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as int
.asInteger
in interface ResultElement
int
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as int
.short asShort() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as short
.asShort
in interface ResultElement
short
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as short
.long asLong() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as long
.asLong
in interface ResultElement
long
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as long
.float asFloat() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as float
.asFloat
in interface ResultElement
float
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as float
.double asDouble() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as double
.asDouble
in interface ResultElement
double
value.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as double
.@Nonnull BigInteger asBigInteger() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as BigInteger
.asBigInteger
in interface ResultElement
BigInteger
object.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as BigInteger
.@Nonnull BigDecimal asBigDecimal() throws UnsupportedOperationException
ResultElement
is considered a ResultPrimitive
, use this method to access its value
as BigDecimal
.asBigDecimal
in interface ResultElement
BigDecimal
object.UnsupportedOperationException
- If this ResultElement
is not considered a ResultPrimitive
or its value cannot be
represented as BigDecimal
.Copyright © 2019 SAP SE. All rights reserved.