public interface ResultObject extends ResultElement
Use the method get(String)
to access one particular element inside this object as ResultElement
.
Use the method as(Class)
to cast this object into a given class type.
Modifier and Type | Method and Description |
---|---|
<T> T |
as(Class<T> objectType)
Returns this
ResultObject casted into the given type T . |
ResultElement |
get(String elementName)
Returns one particular element inside this result object identified by its name.
|
asBigDecimal, asBigInteger, asBoolean, asByte, asCharacter, asDouble, asFloat, asInteger, asLong, asShort, asString, getAsCollection, getAsObject, getAsPrimitive, isResultCollection, isResultObject, isResultPrimitive
@Nullable ResultElement get(@Nonnull String elementName) throws UnsupportedOperationException
elementName
- Name of the requested element.ResultElement
.UnsupportedOperationException
- If requested element cannot be found within this object.@Nullable <T> T as(@Nonnull Class<T> objectType) throws UnsupportedOperationException
ResultObject
casted into the given type T
.T
- The type the result object shall be casted to.objectType
- The Class
type of the type T
T
.UnsupportedOperationException
- If the cast into the given object type failed.Copyright © 2019 SAP SE. All rights reserved.