Package cdc.enums
Class AbstractBaseListSupport<V>
- java.lang.Object
-
- cdc.enums.AbstractBaseListSupport<V>
-
- All Implemented Interfaces:
ListType<V>
- Direct Known Subclasses:
AbstractBaseDagSupport
public abstract class AbstractBaseListSupport<V> extends Object implements ListType<V>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Loggerlogger
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBaseListSupport(Class<V> cls, DagFeature... features)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddEventHandler(DagEventHandler handler)Adds an event handler.protected voidcheckIsSupported(DagFeature feature)Checks that a feature is supported.protected voidcheckIsValid(V value)Checks that a value is valid.protected voidfire(V value, DagEventType eventType)Class<V>getValueClass()protected abstract booleanisContained(V value)Returnstrueif a value is contained by this support.booleanisSupported(DagFeature feature)Returnstruewhen a feature is supported.voidremoveEventHandler(DagEventHandler handler)Removes an event handler.
-
-
-
Constructor Detail
-
AbstractBaseListSupport
protected AbstractBaseListSupport(Class<V> cls, DagFeature... features)
-
-
Method Detail
-
addEventHandler
public final void addEventHandler(DagEventHandler handler)
Description copied from interface:ListTypeAdds an event handler.- Specified by:
addEventHandlerin interfaceListType<V>- Parameters:
handler- The event handler.
-
removeEventHandler
public final void removeEventHandler(DagEventHandler handler)
Description copied from interface:ListTypeRemoves an event handler.- Specified by:
removeEventHandlerin interfaceListType<V>- Parameters:
handler- The event handler.
-
fire
protected final void fire(V value, DagEventType eventType)
-
isSupported
public final boolean isSupported(DagFeature feature)
Description copied from interface:ListTypeReturnstruewhen a feature is supported.Locking may make a feature not available even if it is supported.
- Specified by:
isSupportedin interfaceListType<V>- Parameters:
feature- The feature.- Returns:
truewhenfeatureis supported.
-
getValueClass
public final Class<V> getValueClass()
- Specified by:
getValueClassin interfaceListType<V>- Returns:
- The enum value class.
-
checkIsValid
protected final void checkIsValid(V value)
Checks that a value is valid.- Parameters:
value- The value.- Throws:
IllegalArgumentException- Whenvalueis not valid.
-
checkIsSupported
protected final void checkIsSupported(DagFeature feature)
Checks that a feature is supported.- Parameters:
feature- The feature.- Throws:
IllegalArgumentException- Whenfeatureis not supported.
-
isContained
protected abstract boolean isContained(V value)
Returnstrueif a value is contained by this support.- Parameters:
value- The value.- Returns:
trueifvalueis contained by this support.
-
-