Package cdc.enums
Class AbstractSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>
- java.lang.Object
-
- cdc.enums.AbstractSynthesisMask<M,V>
-
- All Implemented Interfaces:
SynthesisMask<M,V>
- Direct Known Subclasses:
EnumSynthesisMask,NullableEnumSynthesisMask
public abstract class AbstractSynthesisMask<M extends AbstractSynthesisMask<M,V>,V> extends Object implements SynthesisMask<M,V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceAbstractSynthesisMask.Creator<M extends AbstractSynthesisMask<M,V>,V>
-
Field Summary
Fields Modifier and Type Field Description protected Map<V,SynthesisStatus>mapprotected SynthesisMaskSupport<M,V>support
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSynthesisMask(SynthesisMaskSupport<M,V> support, Map<V,SynthesisStatus> map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)SynthesisStatusget(V value)Returns the status associated to a value.SynthesisMaskSupport<M,V>getSupport()ListType<V>getType()inthashCode()booleanisNullable()Mmerge(Mask<?,V> mask)Mmerge(M other)Mset(V value, SynthesisStatus status)Sets the status of a value.MsetAll(SynthesisStatus status)Sets the status of all values.static <M extends AbstractSynthesisMask<M,V>,V>
SynthesisMaskSupport<M,V>support(Class<M> maskClass, AbstractSynthesisMask.Creator<M,V> creator, ListType<V> type, Nullable nullable)protected static <M extends AbstractSynthesisMask<M,V>,V extends Enum<V>>
SynthesisMaskSupport<M,V>support(Class<M> maskClass, AbstractSynthesisMask.Creator<M,V> creator, Class<V> enumClass, Nullable nullable)StringtoString()StringtoString(Function<SynthesisStatus,String> statusToString, String separator)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cdc.enums.SynthesisMask
isLooselySet
-
-
-
-
Field Detail
-
support
protected final SynthesisMaskSupport<M extends AbstractSynthesisMask<M,V>,V> support
-
map
protected final Map<V,SynthesisStatus> map
-
-
Constructor Detail
-
AbstractSynthesisMask
protected AbstractSynthesisMask(SynthesisMaskSupport<M,V> support, Map<V,SynthesisStatus> map)
-
-
Method Detail
-
support
public static <M extends AbstractSynthesisMask<M,V>,V> SynthesisMaskSupport<M,V> support(Class<M> maskClass, AbstractSynthesisMask.Creator<M,V> creator, ListType<V> type, Nullable nullable)
-
support
protected static <M extends AbstractSynthesisMask<M,V>,V extends Enum<V>> SynthesisMaskSupport<M,V> support(Class<M> maskClass, AbstractSynthesisMask.Creator<M,V> creator, Class<V> enumClass, Nullable nullable)
-
getSupport
public final SynthesisMaskSupport<M,V> getSupport()
- Specified by:
getSupportin interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>- Returns:
- The associated support.
-
getType
public ListType<V> getType()
- Specified by:
getTypein interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>- Returns:
- The associated type.
-
isNullable
public boolean isNullable()
- Specified by:
isNullablein interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>- Returns:
trueifnullis a valid mask value that can be characterized.
-
set
public M set(V value, SynthesisStatus status)
Description copied from interface:SynthesisMaskSets the status of a value.- Specified by:
setin interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>- Parameters:
value- The value.status- The status.- Returns:
- The corresponding mask.
-
setAll
public M setAll(SynthesisStatus status)
Description copied from interface:SynthesisMaskSets the status of all values.- Specified by:
setAllin interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>- Parameters:
status- The status.- Returns:
- The corresponding mask.
-
get
public SynthesisStatus get(V value)
Description copied from interface:SynthesisMaskReturns the status associated to a value.- Specified by:
getin interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>- Parameters:
value- The value.- Returns:
- The status of
value.
-
merge
public M merge(M other)
- Specified by:
mergein interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>
-
merge
public M merge(Mask<?,V> mask)
- Specified by:
mergein interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>
-
toString
public String toString(Function<SynthesisStatus,String> statusToString, String separator)
- Specified by:
toStringin interfaceSynthesisMask<M extends AbstractSynthesisMask<M,V>,V>
-
-