Package com.sap.cloud.sdk.result
Class GenericObjectExtractor<T>
java.lang.Object
com.sap.cloud.sdk.result.GenericObjectExtractor<T>
- Type Parameters:
T
- The type of the object to extract.
- All Implemented Interfaces:
ObjectExtractor<T>
Extractor trying to generically extract an object out of a given
ResultElement
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextract
(ResultElement resultElement) Extracts the value of the givenResultElement
as the typeT
.
-
Constructor Details
-
GenericObjectExtractor
-
-
Method Details
-
extract
@Nonnull public T extract(@Nonnull ResultElement resultElement) throws UnsupportedOperationException Description copied from interface:ObjectExtractor
Extracts the value of the givenResultElement
as the typeT
.- Specified by:
extract
in interfaceObjectExtractor<T>
- Parameters:
resultElement
- TheResultElement
to transform.- Returns:
- The
resultElement
as the given type. - Throws:
UnsupportedOperationException
- If the value could not be converted to the given type.
-