Package com.sap.cloud.sdk.result
Interface ResultElementFactory<ResultElementT>
- Type Parameters:
ResultElementT- The type of the object to create theResultElementfrom.
- All Known Implementing Classes:
GsonResultElementFactory
public interface ResultElementFactory<ResultElementT>
Factory interface to encapsulating different ways to create a
ResultElement from an arbitrary object.-
Method Summary
Modifier and TypeMethodDescriptioncreate(ResultElementT resultElement) Creates aResultElementbased on the given object.
-
Method Details
-
create
@Nullable ResultElement create(@Nullable ResultElementT resultElement) throws IllegalArgumentException Creates aResultElementbased on the given object.- Parameters:
resultElement- The object to build theResultElementfrom.- Returns:
- A
ResultElementcreated from the given object. - Throws:
IllegalArgumentException- If the given object could not be used to build aResultElement.
-