Package org.midheaven.collections
Interface DistinctAssortment<T>
- Type Parameters:
T- type of element in the DistinctAssortment
- All Superinterfaces:
Assortment<T>,Countable,Enumerable<T>,Iterable<T>
- All Known Subinterfaces:
ResizableDistinctAssortment<T>
Defines the contract for and
Assortment where elements are distinct by Object.equals(Object).-
Method Summary
Modifier and TypeMethodDescriptionstatic DistinctAssortmentBuilderbuilder()Creates a new builder.default <R> DistinctAssortment<R> Performs cast.default DistinctAssortment<T> Performs filter.default <R> DistinctAssortment<R> Performs map.default <R> DistinctAssortment<R> Returns of Type.default DistinctAssortment<T> sorted(Comparator<T> comparator) Performs sorted.Returns to Collection.Methods inherited from interface org.midheaven.collections.Assortment
contains, containsAll, count, isEmptyMethods inherited from interface org.midheaven.collections.Enumerable
allMatch, any, anyMatch, as, associate, associate, collect, concat, distinct, enumerator, first, flatMap, groupBy, iterator, limit, maximum, minimum, peek, reduce, reduce, skip, toArray, toArray, toArray, toDistinctAssortment, toSequence, toSequence, with, zipMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
builder
Creates a new builder.- Returns:
- the result of builder
-
toCollection
Returns to Collection.- Specified by:
toCollectionin interfaceAssortment<T>- Returns:
- the result of toCollection
-
map
Performs map.- Specified by:
mapin interfaceEnumerable<T>- Parameters:
transform- the transform value- Returns:
- the result of map
-
filter
Performs filter.- Specified by:
filterin interfaceEnumerable<T>- Parameters:
predicate- the predicate value- Returns:
- the result of filter
-
sorted
Performs sorted.- Specified by:
sortedin interfaceEnumerable<T>- Parameters:
comparator- the comparator value- Returns:
- the result of sorted
-
cast
Performs cast.- Specified by:
castin interfaceEnumerable<T>- Type Parameters:
R-- Parameters:
type- the type value- Returns:
- the result of cast
-
ofType
Returns of Type.- Specified by:
ofTypein interfaceEnumerable<T>- Type Parameters:
R-- Parameters:
type- the type value- Returns:
- the result of ofType
-