Interface Selectable<C,E>

Type Parameters:
C - the criteria type
E - the element type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Selectable<C,E>
A notional list of elements from which immutable sublists may be selected according to some criteria.
Author:
Laird Nelson
  • Method Summary

    Modifier and Type
    Method
    Description
    select(C criteria)
    Selects and returns an immutable List representing a sublist of this Selectable's elements, as mediated by the supplied criteria.
  • Method Details

    • select

      List<E> select(C criteria)
      Selects and returns an immutable List representing a sublist of this Selectable's elements, as mediated by the supplied criteria.

      Implementations of this method must be idempotent and must return a determinate value.

      Implementations of this method must not return null.

      Parameters:
      criteria - the criteria to use; may be null to indicate no particular criteria should be used during selection
      Returns:
      an immutable sublist of this Selectable's elements effectively selected by the supplied criteria; never null