Interface MergeAs<T>

  • Type Parameters:
    T - the type of the merged item.

    public interface MergeAs<T>
    Terminal operation of the FluentAssembler DSL, allowing to choose the result of merging a DTO into multiple aggregates (stream, list, set, array, ...).
    • Method Detail

      • asStream

        Stream<T> asStream()
        Merge as a stream of items.
        Returns:
        the stream.
      • asCollection

        <C extends Collection<T>> C asCollection​(Supplier<C> collectionSupplier)
        Merge as a collection of items.
        Type Parameters:
        C - the type of the collection of items.
        Parameters:
        collectionSupplier - the provider of a (preferably empty) collection.
        Returns:
        the collection.
      • asList

        List<T> asList()
        Merge as a list of items.
        Returns:
        the list.
      • asSet

        Set<T> asSet()
        Merge as a set of items.
        Returns:
        the set.
      • asSlice

        Slice<T> asSlice()
        Merge as a slice of items.
        Returns:
        the slice.
      • asArray

        T[] asArray()
        Merge as an array of items.
        Returns:
        the array.