Class GenericCollectionExtractor<T>

java.lang.Object
com.sap.cloud.sdk.result.GenericCollectionExtractor<T>
Type Parameters:
T - The type of the content of the list to create.
All Implemented Interfaces:
CollectionExtractor<List<T>,T>

public class GenericCollectionExtractor<T> extends Object implements CollectionExtractor<List<T>,T>
Extracts a Collection out of a given ResultElement by wrapping the result of an ObjectExtractor into a singletonList.
  • Constructor Details

    • GenericCollectionExtractor

      public GenericCollectionExtractor(ObjectExtractor<T> extractor)
  • Method Details

    • extract

      @Nonnull public List<T> extract(@Nonnull ResultElement resultElement)
      Description copied from interface: CollectionExtractor
      Transforms the given ResultElement into a Collection.
      Specified by:
      extract in interface CollectionExtractor<List<T>,T>
      Parameters:
      resultElement - The ResultElement to transform.
      Returns:
      A Collection containing the content of the given ResultElement.