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>

public interface DistinctAssortment<T> extends Assortment<T>
Defines the contract for and Assortment where elements are distinct by Object.equals(Object).
  • Method Details

    • builder

      static DistinctAssortmentBuilder builder()
      Creates a new builder.
      Returns:
      the result of builder
    • toCollection

      default Set<T> toCollection()
      Returns to Collection.
      Specified by:
      toCollection in interface Assortment<T>
      Returns:
      the result of toCollection
    • map

      default <R> DistinctAssortment<R> map(Function<T,R> transform)
      Performs map.
      Specified by:
      map in interface Enumerable<T>
      Parameters:
      transform - the transform value
      Returns:
      the result of map
    • filter

      default DistinctAssortment<T> filter(Predicate<T> predicate)
      Performs filter.
      Specified by:
      filter in interface Enumerable<T>
      Parameters:
      predicate - the predicate value
      Returns:
      the result of filter
    • sorted

      default DistinctAssortment<T> sorted(Comparator<T> comparator)
      Performs sorted.
      Specified by:
      sorted in interface Enumerable<T>
      Parameters:
      comparator - the comparator value
      Returns:
      the result of sorted
    • cast

      default <R> DistinctAssortment<R> cast(Class<R> type)
      Performs cast.
      Specified by:
      cast in interface Enumerable<T>
      Type Parameters:
      R -
      Parameters:
      type - the type value
      Returns:
      the result of cast
    • ofType

      default <R> DistinctAssortment<R> ofType(Class<R> type)
      Returns of Type.
      Specified by:
      ofType in interface Enumerable<T>
      Type Parameters:
      R -
      Parameters:
      type - the type value
      Returns:
      the result of ofType