Interface InstanceValueOrderPredicate
- All Superinterfaces:
InstanceEnumerationPredicate
,InstancePredicate
- All Known Subinterfaces:
InstanceTaxonomyOrderPredicate
,InstanceTotalOrderPredicate
- All Known Implementing Classes:
InstanceTaxonomyOrderPredicateImpl
,InstanceTotalOrderPredicateImpl
,InstanceValueOrderPredicateImpl
A value order is used in an
InstanceEnumerationPredicate
to define an order
for the values of the predicate.
This interface is extended by and
InstanceTaxonomyOrderPredicate
and
InstanceTotalOrderPredicate
.
- Version:
- $Revision: 1.1 $
- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceEnumerationPredicate
LOG_SUPER_PREDICATE_MUST_BE_DEFINED_IN_INHERITED_PREDICATE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(AtomicObject value) Returnstrue
if the order contains the specified value.getOrderValues.boolean
isAfter
(AtomicObject first, AtomicObject last) isAfter.boolean
isBefore
(AtomicObject first, AtomicObject last) isBefore.void
remove
(AtomicObject value) Removes a value from the value order.void
update
(AtomicObject oldValue, AtomicObject newValue) To update a value in the order theoldValue
and thenewValue
must be specified.Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceEnumerationPredicate
addValue, getValues, hasValueOrder, isInherited, removeValue, setInheritance, updateValue
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstancePredicate
getAtomicClass, holdsFor, isEnumerationPredicate, isIntervalPredicate, isOntologyOrderPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
Field Details
-
LOG_VALUE_ALREADY_DEFINED
- See Also:
-
LOG_VALUE_NOT_FOUND
- See Also:
-
LOG_VALUE_UPDATE_FAILED
- See Also:
-
-
Method Details
-
contains
Returnstrue
if the order contains the specified value.- Parameters:
value
- value whose presence in this order is to be tested.- Returns:
true
if this order contains the specified element.
-
getOrderValues
AtomicObject[] getOrderValues()getOrderValues.
- Returns:
- an array of all values in the order, the array is never be
null
.
-
isAfter
isAfter.
- Parameters:
first
- aAtomicObject
objectlast
- aAtomicObject
object- Returns:
true
iffirst
is afterlast
, otherwisefalse
- Throws:
ObjectNotFoundException
- Is thrown when thefirst
orlast
value is not an element of the order.
-
isBefore
isBefore.
- Parameters:
first
- aAtomicObject
objectlast
- aAtomicObject
object- Returns:
true
iffirst
is beforelast
, otherwisefalse
- Throws:
ObjectNotFoundException
- Is thrown when thefirst
orlast
value is not an element of the order.
-
remove
Removes a value from the value order. Ifvalue == null
nothing happens. If the value order does not cotain thevalue
aObjectNotFoundException
will be thrown.- Parameters:
value
- aAtomicObject
object- Throws:
ObjectNotFoundException
- Is thrown when the value is not an element of the order.
-
update
void update(AtomicObject oldValue, AtomicObject newValue) throws ObjectNotFoundException, ObjectAlreadyExistsException To update a value in the order theoldValue
and thenewValue
must be specified. ThenewValue
is only be applied if and only if the order contains theoldValue
and the order not contains thenewValue
.- Parameters:
oldValue
- aAtomicObject
objectnewValue
- aAtomicObject
object- Throws:
ObjectNotFoundException
- Is thrown when theoldValue
is not an element of the order.ObjectAlreadyExistsException
- Is thrown when thenewValue
is already in the order.
-