Interface InstanceTotalOrderPredicate
-
- All Superinterfaces:
InstanceEnumerationPredicate,InstancePredicate,InstanceValueOrderPredicate
- All Known Implementing Classes:
InstanceTotalOrderPredicateImpl
public interface InstanceTotalOrderPredicate extends InstanceValueOrderPredicate
ATotalOrderorderes the values of aInstanceEnumerationPredicatein a totally ordered list.Each total order contains a list of all values of the corresponding
InstanceEnumerationPredicate. The value can be appended withadd(AtomicObject)or inserted at a specific position withinsertAt(int, AtomicObject).The values must be defined in the
InstanceEnumerationPredicateand all value of the predicate must be ordered. Both constraints are checked during the finishing process of the correspondingAtomicClass.- Author:
- Rainer Maximini
- See Also:
AtomicClass,InstanceEnumerationPredicate,InstancePredicate
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(AtomicObject value)Adds the value at the end of the total orderAtomicObjectelementAt(int index)Returns the element at the specified position in this list.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.intsize()The number of values in this order.-
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, isTotalOrderPredicate
-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceValueOrderPredicate
contains, getOrderValues, isAfter, isBefore, remove, update
-
-
-
-
Method Detail
-
add
void add(AtomicObject value) throws ObjectAlreadyExistsException
Adds the value at the end of the total order- Parameters:
value- aAtomicObjectobject- Throws:
ObjectAlreadyExistsException- is thrown when thevalueis already in the order.
-
elementAt
AtomicObject elementAt(int index)
Returns the element at the specified position in this list.- Parameters:
index- index of element to return.- Returns:
- the element at the specified position in this list.
-
indexOf
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.- 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
void insertAt(int index, AtomicObject value) throws ObjectAlreadyExistsExceptionInsert value at at specified index position. All values up from this are moved one index further.- Parameters:
index- a intvalue- aAtomicObjectobject- Throws:
ObjectAlreadyExistsException- Is thrown when thevalueis already in the order.
-
size
int size()
The number of values in this order.- Returns:
- The number of values in this order.
-
-