Interface InstanceIntervalPredicate
-
- All Superinterfaces:
InstancePredicate
- All Known Implementing Classes:
InstanceIntervalPredicateImpl
public interface InstanceIntervalPredicate extends InstancePredicate
The InstanceIntervalPredicate defines an interval on totally ordered elements. The interval is specified by a minimum and maximum value using the methodssetMinimum(AtomicObject)andsetMaximum(AtomicObject)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.
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.
- Author:
- Rainer Maximini
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanafter(AtomicObject intervalObject, AtomicObject otherIntervalObject)Checks, if an object ofNumericClassorChronologicClassis after another object of the same class.booleanbefore(AtomicObject intervalObject, AtomicObject otherIntervalObject)Checks, if an object ofNumericClassorChronologicClassis before another object of the same class.AtomicObjectgetMaximum()getMaximum.AtomicObjectgetMinimum()getMinimum.booleanholdsFor(AtomicObject value)Checks if the given totally ordered value is an element of the interval.voidsetMaximum(AtomicObject maxValue)Defines the maximum value of the interval.voidsetMinimum(AtomicObject minValue)Defines the minimum value of the interval.-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstancePredicate
getAtomicClass, holdsFor, isEnumerationPredicate, isIntervalPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
-
-
-
Method Detail
-
getMaximum
AtomicObject getMaximum()
getMaximum.
- Returns:
- the upper bound of the interval
-
setMaximum
void setMaximum(AtomicObject maxValue)
Defines the maximum value of the interval.- Parameters:
maxValue- the upper bound of the interval
-
getMinimum
AtomicObject getMinimum()
getMinimum.
- Returns:
- the lower bound of the interval
-
setMinimum
void setMinimum(AtomicObject minValue)
Defines the minimum value of the interval.- Parameters:
minValue- the lower bound of the interval
-
holdsFor
boolean holdsFor(AtomicObject value) throws UncomparableObjectsException
Checks if the given totally ordered value is an element of the interval. The method returnstrueif 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.
- Parameters:
value- A totally ordered object.- Returns:
- true if
valuein included in the interval - Throws:
UncomparableObjectsException- is thrown if value does not match to the bounds of the predicate
-
-
after
boolean after(AtomicObject intervalObject, AtomicObject otherIntervalObject) throws UncomparableObjectsException
Checks, if an object ofNumericClassorChronologicClassis after another object of the same class.- Parameters:
intervalObject- The object from which the order comparison starts.otherIntervalObject- The object that is checked if it is after the other object.- Returns:
trueifotheris after this.- Throws:
UncomparableObjectsException- is thrown if the object are not comparable
-
before
boolean before(AtomicObject intervalObject, AtomicObject otherIntervalObject) throws UncomparableObjectsException
Checks, if an object ofNumericClassorChronologicClassis before another object of the same class.- Parameters:
intervalObject- The object from which the order comparison starts.otherIntervalObject- The object that is checked if it is before the other object.- Returns:
trueifotheris before this.- Throws:
UncomparableObjectsException- is thrown if the object are not comparable
-
-