Class InstanceIntervalPredicateImpl
java.lang.Object
de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
de.uni_trier.wi2.procake.data.model.base.impl.InstanceIntervalPredicateImpl
- All Implemented Interfaces:
InstanceIntervalPredicate
,InstancePredicate
public class InstanceIntervalPredicateImpl
extends InstancePredicateImpl
implements InstanceIntervalPredicate
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
ConstructorDescriptionInstanceIntervalPredicateImpl
(AtomicClassImpl parentClass) Constructor for InstanceIntervalPredicateImpl. -
Method Summary
Modifier and TypeMethodDescriptionboolean
after
(AtomicObject intervalObject, AtomicObject otherIntervalObject) Checks, if an object ofNumericClass
orChronologicClass
is after another object of the same class.boolean
before
(AtomicObject intervalObject, AtomicObject otherIntervalObject) Checks, if an object ofNumericClass
orChronologicClass
is before another object of the same class.protected void
checkFinishEditing.protected void
finishEditing.getMaximum.getMinimum.boolean
holdsFor
(AtomicObject value) Checks if the given totally ordered value is an element of the interval.boolean
EachInstancePredicate
must implement this method to check if the givenvalue
is an element of theInstancePredicate
.boolean
isIntervalPredicate.void
setMaximum
(AtomicObject maxValue) Defines the maximum value of the interval.void
setMinimum
(AtomicObject minValue) Defines the minimum value of the interval.Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
getAtomicClass, isEnumerationPredicate, isOntologyOrderPredicate, 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, isEnumerationPredicate, isOntologyOrderPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
Constructor Details
-
InstanceIntervalPredicateImpl
Constructor for InstanceIntervalPredicateImpl.
- Parameters:
parentClass
- aAtomicClassImpl
object
-
-
Method Details
-
checkFinishEditing
checkFinishEditing.
- Overrides:
checkFinishEditing
in classInstancePredicateImpl
- Throws:
ClassHierarchyConsistencyException
- if any.
-
finishEditing
finishEditing.
- Overrides:
finishEditing
in classInstancePredicateImpl
- Throws:
ClassHierarchyConsistencyException
- if any.
-
getMaximum
getMaximum.
- Specified by:
getMaximum
in interfaceInstanceIntervalPredicate
- Returns:
- the upper bound of the interval
-
setMaximum
Defines the maximum value of the interval.- Specified by:
setMaximum
in interfaceInstanceIntervalPredicate
- Parameters:
maxValue
- the upper bound of the interval
-
getMinimum
getMinimum.
- Specified by:
getMinimum
in interfaceInstanceIntervalPredicate
- Returns:
- the lower bound of the interval
-
setMinimum
Defines the minimum value of the interval.- Specified by:
setMinimum
in interfaceInstanceIntervalPredicate
- Parameters:
minValue
- the lower bound of the interval
-
holdsFor
EachInstancePredicate
must implement this method to check if the givenvalue
is an element of theInstancePredicate
.- Specified by:
holdsFor
in interfaceInstancePredicate
- Parameters:
value
- The value to check- Returns:
true
if the value is an element of theInstancePredicate
-
holdsFor
Checks if the given totally ordered value is an element of the interval. The method returnstrue
if one of the following relations are true-
value == getMinimum()
-
value == getMaximum()
-
value.before(getMaximum()) && value.after(getMinimum())
During editing the relations between maximum and minimum can be wrong. The relation is only be fixed during finishing the predicate. Consequently, this method can be return a wrong value if the predicate is not finished.
- Specified by:
holdsFor
in interfaceInstanceIntervalPredicate
- Parameters:
value
- A totally ordered object.- Returns:
- true if
value
in included in the interval - Throws:
UncomparableObjectsException
- is thrown if value does not match to the bounds of the predicate
-
-
isIntervalPredicate
public boolean isIntervalPredicate()isIntervalPredicate.
- Specified by:
isIntervalPredicate
in interfaceInstancePredicate
- Overrides:
isIntervalPredicate
in classInstancePredicateImpl
- Returns:
true
if the predicate is anInstanceIntervalPredicate
-
after
public boolean after(AtomicObject intervalObject, AtomicObject otherIntervalObject) throws UncomparableObjectsException Checks, if an object ofNumericClass
orChronologicClass
is after another object of the same class.- Specified by:
after
in interfaceInstanceIntervalPredicate
- Parameters:
intervalObject
- The object from which the order comparison starts.otherIntervalObject
- The object that is checked if it is after the other object.- Returns:
true
ifother
is after this.- Throws:
UncomparableObjectsException
- is thrown if the object are not comparable
-
before
public boolean before(AtomicObject intervalObject, AtomicObject otherIntervalObject) throws UncomparableObjectsException Checks, if an object ofNumericClass
orChronologicClass
is before another object of the same class.- Specified by:
before
in interfaceInstanceIntervalPredicate
- Parameters:
intervalObject
- The object from which the order comparison starts.otherIntervalObject
- The object that is checked if it is before the other object.- Returns:
true
ifother
is before this.- Throws:
UncomparableObjectsException
- is thrown if the object are not comparable
-