Class InstanceTotalOrderPredicateImpl
java.lang.Object
de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
de.uni_trier.wi2.procake.data.model.base.impl.InstanceEnumerationPredicateImpl
de.uni_trier.wi2.procake.data.model.base.impl.InstanceValueOrderPredicateImpl
de.uni_trier.wi2.procake.data.model.base.impl.InstanceTotalOrderPredicateImpl
- All Implemented Interfaces:
InstanceEnumerationPredicate
,InstancePredicate
,InstanceTotalOrderPredicate
,InstanceValueOrderPredicate
public class InstanceTotalOrderPredicateImpl
extends InstanceValueOrderPredicateImpl
implements InstanceTotalOrderPredicate
Description is missing
- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
atomicClass
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceEnumerationPredicate
LOG_SUPER_PREDICATE_MUST_BE_DEFINED_IN_INHERITED_PREDICATE
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceValueOrderPredicate
LOG_VALUE_ALREADY_DEFINED, LOG_VALUE_NOT_FOUND, LOG_VALUE_UPDATE_FAILED
-
Constructor Summary
ConstructorDescriptionInstanceTotalOrderPredicateImpl
(StringClassImpl parentClass) Constructor for InstanceTotalOrderPredicateImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AtomicObject value) Adds the value at the end of the total orderboolean
contains
(AtomicObject value) Returnstrue
if the order contains the specified value.elementAt
(int index) Returns the element at the specified position in this list.getOrderValues.int
indexOf
(AtomicObject value) Returns the index in this order of the specified value.void
insertAt
(int index, AtomicObject value) Insert value at at specified index position.boolean
isAfter
(AtomicObject first, AtomicObject last) isAfter.boolean
isBefore
(AtomicObject first, AtomicObject last) isBefore.boolean
isTotalOrderPredicate.void
remove
(AtomicObject value) Removes a value from the value order.int
size()
The number of values in this order.void
update
(AtomicObject oldValue, AtomicObject newValue) To update a value in the order theoldValue
and thenewValue
must be specified.Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstanceValueOrderPredicateImpl
isTaxonomyOrderPredicate
Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstanceEnumerationPredicateImpl
addValue, checkFinishEditing, getValues, hasValueOrder, holdsFor, isEnumerationPredicate, isInherited, removeValue, setInheritance, updateValue
Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
finishEditing, getAtomicClass, isIntervalPredicate, isOntologyOrderPredicate
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.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
-
Constructor Details
-
InstanceTotalOrderPredicateImpl
Constructor for InstanceTotalOrderPredicateImpl.
- Parameters:
parentClass
- aStringClassImpl
object
-
-
Method Details
-
add
Adds the value at the end of the total order- Specified by:
add
in interfaceInstanceTotalOrderPredicate
- Parameters:
value
- aAtomicObject
object- Throws:
ObjectAlreadyExistsException
- is thrown when thevalue
is already in the order.
-
contains
Returnstrue
if the order contains the specified value.- Specified by:
contains
in interfaceInstanceValueOrderPredicate
- Parameters:
value
- value whose presence in this order is to be tested.- Returns:
true
if this order contains the specified element.
-
elementAt
Returns the element at the specified position in this list.- Specified by:
elementAt
in interfaceInstanceTotalOrderPredicate
- Parameters:
index
- index of element to return.- Returns:
- the element at the specified position in this list.
-
getOrderValues
getOrderValues.
- Specified by:
getOrderValues
in interfaceInstanceValueOrderPredicate
- Returns:
- an array of all values in the order, the array is never be
null
.
-
indexOf
Returns the index in this order of the specified value. If the order does not contain this value an exception will be thrown.- Specified by:
indexOf
in interfaceInstanceTotalOrderPredicate
- Parameters:
value
- element to search for.- Returns:
- the index in this order of the specified value
- Throws:
ObjectNotFoundException
- Is thrown when thevalue
is not an element of the order.
-
insertAt
Insert value at at specified index position. All values up from this are moved one index further.- Specified by:
insertAt
in interfaceInstanceTotalOrderPredicate
- Parameters:
index
- a intvalue
- aAtomicObject
object- Throws:
ObjectAlreadyExistsException
- Is thrown when thevalue
is already in the order.
-
isAfter
isAfter.
- Specified by:
isAfter
in interfaceInstanceValueOrderPredicate
- 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.
- Specified by:
isBefore
in interfaceInstanceValueOrderPredicate
- 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.
-
isTotalOrderPredicate
public boolean isTotalOrderPredicate()isTotalOrderPredicate.
- Specified by:
isTotalOrderPredicate
in interfaceInstancePredicate
- Overrides:
isTotalOrderPredicate
in classInstanceValueOrderPredicateImpl
- Returns:
true
if the predicate is anInstanceTotalOrderPredicate
-
remove
Removes a value from the value order. Ifvalue == null
nothing happens. If the value order does not cotain thevalue
aObjectNotFoundException
will be thrown.- Specified by:
remove
in interfaceInstanceValueOrderPredicate
- Parameters:
value
- aAtomicObject
object- Throws:
ObjectNotFoundException
- Is thrown when the value is not an element of the order.
-
size
public int size()The number of values in this order.- Specified by:
size
in interfaceInstanceTotalOrderPredicate
- Returns:
- The number of values in this order.
-
update
public 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
.- Specified by:
update
in interfaceInstanceValueOrderPredicate
- 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.
-