Package cdc.enums
Interface DynamicEnumSupport<V>
- Type Parameters:
V- The enum value type.
- All Known Subinterfaces:
AbstractForestDynamicEnum.Support<V>,AbstractListDynamicEnum.Support<V>
- All Known Implementing Classes:
AbstractDynamicEnumSupport
Base interface of services offered by dynamic enumerations.
This adds modification (creation removal, ...) methods to EnumType.
- Author:
- Damien Carbonne
-
Method Summary
Methods inherited from interface cdc.enums.DagType
getChildren, getParents, getRoots, isOverOrEqual, isRoot, isStrictlyOver, isStrictlyUnder, isUnderOrEqualMethods inherited from interface cdc.enums.EnumType
getChildNamed, getName, getQName, hasChildNamed, hasSiblingNamed, hasValue, valueOf, valueOfMethods inherited from interface cdc.enums.ListType
addEventHandler, areEqual, getValueClass, getValues, isLocked, isSupported, isUsable, isValid, removeEventHandler, size
-
Method Details
-
lock
void lock()Definitely locks modifications. -
findOrCreate
Returns the value corresponding to a name.If none exists, creates a new value and returns it.
- Parameters:
qname- The qualified name.- Returns:
- The value corresponding to
qname, possibly creating it. - Throws:
IllegalStateException- When locked and value corresponding toqnamedoes not exist.IllegalArgumentException- When locked and value corresponding toqnamedoes not exist andqnameis invalid.
-
remove
Removes a value.- Parameters:
value- The value to remove.- Throws:
IllegalStateException- When locked.UnsupportedOperationException- When removal is not supported.IllegalArgumentException- Whenvalueis invalid.
-
setName
Changes a value name.- Parameters:
value- The value.name- The new local name.- Throws:
IllegalStateException- When locked.UnsupportedOperationException- When renaming is not supported.IllegalArgumentException- Whenvalueornameis invalid.
-