Interface MergeAs<T>
-
- Type Parameters:
T- the type of the merged item.
public interface MergeAs<T>Terminal operation of theFluentAssemblerDSL, allowing to choose the result of merging a DTO into multiple aggregates (stream, list, set, array, ...).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T[]asArray()Merge as an array of items.<C extends Collection<T>>
CasCollection(Supplier<C> collectionSupplier)Merge as a collection of items.List<T>asList()Merge as a list of items.Set<T>asSet()Merge as a set of items.Slice<T>asSlice()Merge as a slice of items.Stream<T>asStream()Merge as a stream of items.
-
-
-
Method Detail
-
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.
-
asArray
T[] asArray()
Merge as an array of items.- Returns:
- the array.
-
-