-
- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Mcreate()Mcreate(boolean enabled)Creates a full or empty mask.Mcreate(Iterable<V> values)Creates a mask from an iterable.Mcreate(Predicate<V> predicate)Creates a mask from a predicate.Mcreate(V value)Creates a mask with one value.Mcreate(V... values)Creates a mask from an array.Mempty()Mfull()Class<M>getMaskClass()ListType<V>getType()booleanisNullable()Set<V>newSet(int size)Creates a Set that is compliant with implementation.
-
-
-
Method Detail
-
isNullable
boolean isNullable()
- Returns:
trueifnullis a valid mask value.
-
empty
M empty()
- Returns:
- The empty mask.
-
full
M full()
- Returns:
- The fill mask (at the time of call).
-
create
M create()
- Returns:
- The empty mask.
-
create
M create(V value)
Creates a mask with one value.- Parameters:
value- The value.- Returns:
- The mask that contains
value.
-
create
M create(V... values)
Creates a mask from an array.- Parameters:
values- The values (possibly includingnull).- Returns:
- The created mask.
-
create
M create(Iterable<V> values)
Creates a mask from an iterable.- Parameters:
values- The values (possibly includingnull).- Returns:
- The created mask.
-
create
M create(Predicate<V> predicate)
Creates a mask from a predicate.- Parameters:
predicate- A predicate of values to include.- Returns:
- The created mask.
-
create
M create(boolean enabled)
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.
-
-