oracle.cabo.ui.data
Class ListDataObjectList
java.lang.Object
|
+--oracle.cabo.ui.data.ListDataObjectList
- All Implemented Interfaces:
- DataObjectList
- public class ListDataObjectList
- extends java.lang.Object
- implements DataObjectList
This class creates a UIX Components DataObjectList to which DataObjects can be added and removed. This class is not synchronized.
Method Summary |
void |
addItem(DataObject data)
Adds an item to this list |
void |
clear()
Removes all of the elements from this DataObjectList |
DataObject |
getItem(int i)
Returns the DataObject at the index. |
int |
getLength()
Returns the number of items in the data set. |
int |
indexOf(java.lang.Object data)
Searches for the first occurrence of the given argument, testing for equality using the equals method. |
DataObject |
removeItem(int index)
|
java.lang.Object[] |
toArray(java.lang.Object[] anArray)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListDataObjectList
public ListDataObjectList()
- Constructs an empty list
ListDataObjectList
public ListDataObjectList(int initialCapacity)
- Constructs an empty list with the specified initial capacity.
-
- Parameters:
initialCapacity
- the initial capacity of the list.
- See Also:
ArrayList.ArrayList(int)
ListDataObjectList
public ListDataObjectList(java.util.Vector list)
-
- Parameters:
list
- the Vector to use as the internal list. Every element of this Vector must be of type DataObject
- See Also:
DataObject
addItem
public void addItem(DataObject data)
- Adds an item to this list
-
- Parameters:
data
- the item to add to this list.
removeItem
public DataObject removeItem(int index)
-
- Parameters:
index
- the index of the item to be removed
- Returns:
- the removed item.
clear
public void clear()
- Removes all of the elements from this DataObjectList
-
- See Also:
List.clear()
indexOf
public int indexOf(java.lang.Object data)
- Searches for the first occurrence of the given argument, testing for equality using the equals method.
-
- Parameters:
data
- the DataObject to search for
- Returns:
- -1 if the object is not found
- See Also:
List.indexOf(Object)
toArray
public java.lang.Object[] toArray(java.lang.Object[] anArray)
-
- See Also:
List.toArray(Object[])
getItem
public DataObject getItem(int i)
- Description copied from interface:
DataObjectList
- Returns the DataObject at the index.
-
- Specified by:
getItem
in interface DataObjectList
-
- Parameters:
i
- is an index into this list
- Returns:
- the element at the given index
- See Also:
DataObjectList.getItem(int)
getLength
public int getLength()
- Description copied from interface:
DataObjectList
- Returns the number of items in the data set.
-
- Specified by:
getLength
in interface DataObjectList
-
- Returns:
- the length of this list
- See Also:
DataObjectList.getLength()