Interface InstanceTotalOrderPredicate
- All Superinterfaces:
InstanceEnumerationPredicate
,InstancePredicate
,InstanceValueOrderPredicate
- All Known Implementing Classes:
InstanceTotalOrderPredicateImpl
A
TotalOrder
orderes the values of a
InstanceEnumerationPredicate
in a totally
ordered list.
Each total order contains a list of all values of the corresponding
InstanceEnumerationPredicate
. The value can be
appended with add(AtomicObject)
or inserted at a specific position with
insertAt(int, AtomicObject)
.
The values must be defined in the
InstanceEnumerationPredicate
and all value of
the predicate must be ordered. Both constraints are checked during the finishing process of the
corresponding AtomicClass
.
- Author:
- Rainer Maximini
- See Also:
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AtomicObject value) Adds the value at the end of the total orderelementAt
(int index) Returns the element at the specified position in this list.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.int
size()
The number of values in this order.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
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstanceValueOrderPredicate
contains, getOrderValues, isAfter, isBefore, remove, update
-
Method Details
-
add
Adds the value at the end of the total order- Parameters:
value
- aAtomicObject
object- Throws:
ObjectAlreadyExistsException
- is thrown when thevalue
is already in the order.
-
elementAt
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
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 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.- Parameters:
index
- a intvalue
- aAtomicObject
object- Throws:
ObjectAlreadyExistsException
- Is thrown when thevalue
is already in the order.
-
size
int size()The number of values in this order.- Returns:
- The number of values in this order.
-