Class InstanceEnumerationPredicateImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
-
- de.uni_trier.wi2.procake.data.model.base.impl.InstanceEnumerationPredicateImpl
-
- All Implemented Interfaces:
InstanceEnumerationPredicate,InstancePredicate
- Direct Known Subclasses:
InstanceValueOrderPredicateImpl
public class InstanceEnumerationPredicateImpl extends InstancePredicateImpl implements InstanceEnumerationPredicate
Description is missing- Author:
- Rainer Maximini
-
-
Field Summary
-
Fields inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
atomicClass
-
-
Constructor Summary
Constructors Constructor Description InstanceEnumerationPredicateImpl(AtomicClassImpl parentClass)Constructor for InstanceEnumerationPredicateImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(AtomicObject newValue)Adds the value to the value set.protected voidcheckFinishEditing()checkFinishEditing.List<AtomicObject>getValues()getValues.booleanhasValueOrder()hasValueOrder.booleanholdsFor(Object value)EachInstancePredicatemust implement this method to check if the givenvalueis an element of theInstancePredicate.booleanisEnumerationPredicate()isEnumerationPredicate.voidremoveValue(AtomicObject value)Removes the object from the value set if the value exists.voidupdateValue(AtomicObject oldElement, AtomicObject newElement)Updates the value in this predicate as well as in all including orders.-
Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
finishEditing, getAtomicClass, isIntervalPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstancePredicate
getAtomicClass, isIntervalPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
-
-
-
Constructor Detail
-
InstanceEnumerationPredicateImpl
public InstanceEnumerationPredicateImpl(AtomicClassImpl parentClass)
Constructor for InstanceEnumerationPredicateImpl.
- Parameters:
parentClass- aAtomicClassImplobject
-
-
Method Detail
-
addValue
public void addValue(AtomicObject newValue)
Adds the value to the value set. The add command is not propagated to including orders.- Specified by:
addValuein interfaceInstanceEnumerationPredicate- Parameters:
newValue- aAtomicObjectobject
-
checkFinishEditing
protected void checkFinishEditing() throws ClassHierarchyConsistencyExceptioncheckFinishEditing.
- Overrides:
checkFinishEditingin classInstancePredicateImpl- Throws:
ClassHierarchyConsistencyException- if any.
-
getValues
public List<AtomicObject> getValues()
getValues.
- Specified by:
getValuesin interfaceInstanceEnumerationPredicate- Returns:
- An array of all values in this predicate.
-
hasValueOrder
public boolean hasValueOrder()
hasValueOrder.
- Specified by:
hasValueOrderin interfaceInstanceEnumerationPredicate- Returns:
trueif a value order is defined, otherwisefalse- See Also:
InstanceValueOrderPredicate,InstanceEnumerationPredicate.addValue(AtomicObject)
-
holdsFor
public boolean holdsFor(Object value)
EachInstancePredicatemust implement this method to check if the givenvalueis an element of theInstancePredicate.- Specified by:
holdsForin interfaceInstancePredicate- Parameters:
value- The value to check- Returns:
trueif the value is an element of theInstancePredicate
-
isEnumerationPredicate
public boolean isEnumerationPredicate()
isEnumerationPredicate.
- Specified by:
isEnumerationPredicatein interfaceInstancePredicate- Overrides:
isEnumerationPredicatein classInstancePredicateImpl- Returns:
trueif the predicate is anInstanceEnumerationPredicate
-
removeValue
public void removeValue(AtomicObject value)
Removes the object from the value set if the value exists. The remove command is not propagated to including orders.- Specified by:
removeValuein interfaceInstanceEnumerationPredicate- Parameters:
value- aAtomicObjectobject
-
updateValue
public void updateValue(AtomicObject oldElement, AtomicObject newElement)
Updates the value in this predicate as well as in all including orders. The update is only be done if the old value exists and the new one not.In opposite to
InstanceEnumerationPredicate.addValue(AtomicObject)andInstanceEnumerationPredicate.removeValue(AtomicObject)this method propagates the update to all included value orders.- Specified by:
updateValuein interfaceInstanceEnumerationPredicate- Parameters:
oldElement- aAtomicObjectobjectnewElement- aAtomicObjectobject
-
-