Interface ListObject
-
- All Superinterfaces:
CollectionObject,DataObject,PropertyHandler
- All Known Implementing Classes:
ListObjectImpl
public interface ListObject extends CollectionObject
A ListObject represents a list ofDataObjects.A detailed description can be found in the
ListClass.- Author:
- Rainer Maximini
- See Also:
ListClass
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENTComponent: "cake.data.objects" (LogComponentIdentifier.COMPONENT)static StringCOMPONENT_KEYComponent-Key: "23" (LogComponentIdentifier.COMPONENT_KEY_LISTOBJECT)static StringLOG_INDEX_OUT_OF_BOUNDSThe requested index is out of bounds.-
Fields inherited from interface de.uni_trier.wi2.procake.data.object.base.CollectionObject
LOG_WRONG_ELEMENT_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataObjectelementAt(int index)ListClassgetListClass()List<DataObject>getValues()Returns a list of DataObjects contained in this ListObject.intindexOf(DataObject object)Searches for the first occurence of the given data object, testing for equality using theequalsmethod.intindexOf(DataObject object, int index)Searches for the first occurence of the given object, beginning the search atindex, and testing for equality using theequalsmethod.voidinsertAt(DataObject value, int index)Inserts the specified data object in this list at the specifiedindex.voidremoveAt(int index)Deletes the object at the specified index.voidsetValues(List<DataObject> values)Sets the DataObjects of this ListObject.-
Methods inherited from interface de.uni_trier.wi2.procake.data.object.base.CollectionObject
addAll, addValue, contains, getCollection, getCollectionClass, getValue, iterator, removeValue, size
-
Methods inherited from interface de.uni_trier.wi2.procake.data.object.DataObject
assertSameValueAsIn, copy, getDataClass, getId, getModel, hasClassName, hasSameValueAsIn, hasSystemClassName, isAggregate, isAtomic, isBoolean, isByteArray, isChronologic, isCollection, isDataflowWrapper, isDataReference, isDate, isDouble, isInteger, isInterval, isKindOf, isList, isMemberOf, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isSequence, isSet, isString, isSubWorkflow, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, removeId, setDataClass, setId, toDetailedString, toXML
-
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty
-
-
-
-
Field Detail
-
COMPONENT
static final String COMPONENT
Component: "cake.data.objects" (LogComponentIdentifier.COMPONENT)- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "23" (LogComponentIdentifier.COMPONENT_KEY_LISTOBJECT)- See Also:
- Constant Field Values
-
LOG_INDEX_OUT_OF_BOUNDS
static final String LOG_INDEX_OUT_OF_BOUNDS
The requested index is out of bounds.- Component:
COMPONENT - Key: "2300"
- this
- Number of elements in list
- Requested index
- See Also:
- Constant Field Values
- Component:
-
-
Method Detail
-
elementAt
DataObject elementAt(int index) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
getValues
List<DataObject> getValues()
Returns a list of DataObjects contained in this ListObject.- Returns:
- A list of DataObjects contained in this ListObject
-
setValues
void setValues(List<DataObject> values)
Sets the DataObjects of this ListObject. If a type of an element is incompatible with the elementClass aInvalidTypeExceptionis thrown.- Parameters:
values-
-
getListClass
ListClass getListClass()
-
indexOf
int indexOf(DataObject object)
Searches for the first occurence of the given data object, testing for equality using theequalsmethod.- Parameters:
object- the data object that should be searched- Returns:
- the index of the first occurrence of the argument in this list; returns
-1if the object is not found. - See Also:
Object.equals(Object)
-
indexOf
int indexOf(DataObject object, int index) throws IndexOutOfBoundsException
Searches for the first occurence of the given object, beginning the search atindex, and testing for equality using theequalsmethod.- Parameters:
object- the data object that should be searchedindex- the non-negative index to start searching from.- Returns:
- the index of the first occurrence of the object argument in this list at position
indexor later in the vector; returns-1if the object is not found. (Returns-1ifindex>= the current size of this list.) - Throws:
IndexOutOfBoundsException- if the index was invalid.- See Also:
Object.equals(Object)
-
insertAt
void insertAt(DataObject value, int index) throws IndexOutOfBoundsException, InvalidTypeException
Inserts the specified data object in this list at the specifiedindex. Each object in this list with an index greater or equal to the specifiedindexis shifted upward to have an index one greater than the value it had previously.The index must be a value greater than or equal to
0and less than or equal to the current size of the list. (If the index is equal to the current size of the list, the new object is appended to the list.)- Parameters:
value- the data object to insert.index- where to insert the new object.- Throws:
IndexOutOfBoundsException- if the index was invalid.InvalidTypeException- if the value type is incompatible to the element type.
-
removeAt
void removeAt(int index) throws IndexOutOfBoundsExceptionDeletes the object at the specified index. Each object in this list with an index greater or equal to the specifiedindexis shifted downward to have an index one smaller than the value it had previously. The size of this list is decreased by1.The index must be a value greater than or equal to
0and less than the current size of the list.- Parameters:
index- the index of the object to remove.- Throws:
IndexOutOfBoundsException- if the index was invalid.
-
-