Interface Selectable<C,E>
- Type Parameters:
C- the criteria typeE- 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.
A notional list of elements from which immutable sublists may be selected according to some
criteria.
- Author:
- Laird Nelson
-
Method Summary
-
Method Details
-
select
Selects and returns an immutableListrepresenting a sublist of thisSelectable'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.Implementations of this method should not call
list(), since that method is typically implemented in terms of this one, or undefined behavior may result.- Parameters:
criteria- the criteria to use; may benull- Returns:
- an immutable sublist of this
Selectable's elements; nevernull - See Also:
-
list
Returns an immutableListof all of thisSelectable's elements.Implementations of this method must be idempotent and must return a determinate value.
Implementations of this method must not return
null.The default implementation of this method calls the
select(Object)method withnullas the sole argument.- Returns:
- an immutable
Listof all of thisSelectable's elements; nevernull - See Also:
-