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.InstanceValueOrderPredicate
COMPONENT, COMPONENT_KEY, LOG_VALUE_ALREADY_DEFINED, LOG_VALUE_NOT_FOUND, LOG_VALUE_UPDATE_FAILED
-
-
Constructor Summary
Constructors Constructor Description InstanceTotalOrderPredicateImpl(StringClassImpl parentClass)Constructor for InstanceTotalOrderPredicateImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(AtomicObject value)Adds the value at the end of the total orderbooleancontains(AtomicObject value)Returnstrueif the order contains the specified value.AtomicObjectelementAt(int index)Returns the element at the specified position in this list.AtomicObject[]getOrderValues()getOrderValues.intindexOf(AtomicObject value)Returns the index in this order of the specified value.voidinsertAt(int index, AtomicObject value)Insert value at at specified index position.booleanisAfter(AtomicObject first, AtomicObject last)isAfter.booleanisBefore(AtomicObject first, AtomicObject last)isBefore.booleanisTotalOrderPredicate()isTotalOrderPredicate.voidremove(AtomicObject value)Removes a value from the value order.intsize()The number of values in this order.voidupdate(AtomicObject oldValue, AtomicObject newValue)To update a value in the order theoldValueand thenewValuemust 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, removeValue, updateValue
-
Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.InstancePredicateImpl
finishEditing, getAtomicClass, isIntervalPredicate
-
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, removeValue, updateValue
-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstancePredicate
getAtomicClass, holdsFor, isEnumerationPredicate, isIntervalPredicate, isTaxonomyOrderPredicate
-
-
-
-
Constructor Detail
-
InstanceTotalOrderPredicateImpl
public InstanceTotalOrderPredicateImpl(StringClassImpl parentClass)
Constructor for InstanceTotalOrderPredicateImpl.
- Parameters:
parentClass- aStringClassImplobject
-
-
Method Detail
-
add
public void add(AtomicObject value) throws ObjectAlreadyExistsException
Adds the value at the end of the total order- Specified by:
addin interfaceInstanceTotalOrderPredicate- Parameters:
value- aAtomicObjectobject- Throws:
ObjectAlreadyExistsException- is thrown when thevalueis already in the order.
-
contains
public boolean contains(AtomicObject value)
Returnstrueif the order contains the specified value.- Specified by:
containsin interfaceInstanceValueOrderPredicate- Parameters:
value- value whose presence in this order is to be tested.- Returns:
trueif this order contains the specified element.
-
elementAt
public AtomicObject elementAt(int index)
Returns the element at the specified position in this list.- Specified by:
elementAtin interfaceInstanceTotalOrderPredicate- Parameters:
index- index of element to return.- Returns:
- the element at the specified position in this list.
-
getOrderValues
public AtomicObject[] getOrderValues()
getOrderValues.
- Specified by:
getOrderValuesin interfaceInstanceValueOrderPredicate- Returns:
- an array of all values in the order, the array is never be
null.
-
indexOf
public int indexOf(AtomicObject value) throws ObjectNotFoundException
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:
indexOfin interfaceInstanceTotalOrderPredicate- Parameters:
value- element to search for.- Returns:
- the index in this order of the specified value
- Throws:
ObjectNotFoundException- Is thrown when thevalueis not an element of the order.
-
insertAt
public void insertAt(int index, AtomicObject value) throws ObjectAlreadyExistsExceptionInsert value at at specified index position. All values up from this are moved one index further.- Specified by:
insertAtin interfaceInstanceTotalOrderPredicate- Parameters:
index- a intvalue- aAtomicObjectobject- Throws:
ObjectAlreadyExistsException- Is thrown when thevalueis already in the order.
-
isAfter
public boolean isAfter(AtomicObject first, AtomicObject last) throws ObjectNotFoundException
isAfter.
- Specified by:
isAfterin interfaceInstanceValueOrderPredicate- Parameters:
first- aAtomicObjectobjectlast- aAtomicObjectobject- Returns:
trueiffirstis afterlast, otherwisefalse- Throws:
ObjectNotFoundException- Is thrown when thefirstorlastvalue is not an element of the order.
-
isBefore
public boolean isBefore(AtomicObject first, AtomicObject last) throws ObjectNotFoundException
isBefore.
- Specified by:
isBeforein interfaceInstanceValueOrderPredicate- Parameters:
first- aAtomicObjectobjectlast- aAtomicObjectobject- Returns:
trueiffirstis beforelast, otherwisefalse- Throws:
ObjectNotFoundException- Is thrown when thefirstorlastvalue is not an element of the order.
-
isTotalOrderPredicate
public boolean isTotalOrderPredicate()
isTotalOrderPredicate.
- Specified by:
isTotalOrderPredicatein interfaceInstancePredicate- Overrides:
isTotalOrderPredicatein classInstanceValueOrderPredicateImpl- Returns:
trueif the predicate is anInstanceTotalOrderPredicate
-
remove
public void remove(AtomicObject value) throws ObjectNotFoundException
Removes a value from the value order. Ifvalue == nullnothing happens. If the value order does not cotain thevalueaObjectNotFoundExceptionwill be thrown.- Specified by:
removein interfaceInstanceValueOrderPredicate- Parameters:
value- aAtomicObjectobject- 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:
sizein 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 theoldValueand thenewValuemust be specified. ThenewValueis only be applied if and only if the order contains theoldValueand the order not contains thenewValue.- Specified by:
updatein interfaceInstanceValueOrderPredicate- Parameters:
oldValue- aAtomicObjectobjectnewValue- aAtomicObjectobject- Throws:
ObjectNotFoundException- Is thrown when theoldValueis not an element of the order.ObjectAlreadyExistsException- Is thrown when thenewValueis already in the order.
-
-