- Type Parameters:
M- The mask type.V- The value type.
public interface MaskSupport<M extends Mask<M,V>,V>
Interface describing a mask type.
- Author:
- Damien Carbonne
-
Method Summary
Modifier and TypeMethodDescriptioncreate()create(boolean enabled) Creates a full or empty mask.Creates a mask from an iterable.Creates a mask from a predicate.Creates a mask with one value.Creates a mask from an array.empty()full()getType()booleannewSet(int size) Creates a Set that is compliant with implementation.
-
Method Details
-
getMaskClass
- Returns:
- The mask class.
-
getType
- Returns:
- The associated List type.
-
isNullable
boolean isNullable()- Returns:
trueifnullis a valid mask value.
-
empty
M empty()- Returns:
- The empty mask.
-
full
M full()- Returns:
- The full mask (at the time of call).
-
create
M create()- Returns:
- The empty mask.
-
create
Creates a mask with one value.- Parameters:
value- The value.- Returns:
- The mask that contains
value.
-
create
Creates a mask from an array.- Parameters:
values- The values (possibly includingnull).- Returns:
- The created mask.
-
create
Creates a mask from an iterable.- Parameters:
values- The values (possibly includingnull).- Returns:
- The created mask.
-
create
Creates a mask from a predicate.- Parameters:
predicate- A predicate of values to include.- Returns:
- The created mask.
-
create
Creates a full or empty mask.WARNING: Full is meaningful at the time of calling this constructor. It may become false if values change after this call.
- Parameters:
enabled- Iftrue, creates a full mask. An empty mask otherwise.- Returns:
- The created mask.
-
newSet
Creates a Set that is compliant with implementation.This allows using the best implementation.
- Parameters:
size- The initial set size.- Returns:
- A new Set.
-