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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextract(ResultElement resultElement) Extracts the value of the givenResultElementas the typeT.
-
Constructor Details
-
GenericObjectExtractor
-
-
Method Details
-
extract
@Nonnull public T extract(@Nonnull ResultElement resultElement) throws UnsupportedOperationException Description copied from interface:ObjectExtractorExtracts the value of the givenResultElementas the typeT.- Specified by:
extractin interfaceObjectExtractor<T>- Parameters:
resultElement- TheResultElementto transform.- Returns:
- The
resultElementas the given type. - Throws:
UnsupportedOperationException- If the value could not be converted to the given type.
-