E - The element typepublic class ContainmentList<E extends ModelObject> extends Vector<E> implements List<E>
capacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
ContainmentList(ModelObject parent,
Class<E> type)
This is the constructor for the containment list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o)
Appends the specified element to the end of this list (optional
operation).
|
void |
add(int index,
E element)
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
addAll(Collection<? extends E> c)
Appends all of the elements in the specified collection to the end of
this list, in the order that they are returned by the specified
collection's iterator (optional operation).
|
boolean |
addAll(int index,
Collection<? extends E> c)
Inserts all of the elements in the specified collection into this
list at the specified position (optional operation).
|
void |
clear()
Removes all of the elements from this list (optional operation).
|
Class<E> |
getType()
This method returns the base type associated with the list
elements.
|
E |
remove(int index)
Removes the element at the specified position in this list (optional
operation).
|
boolean |
remove(Object o)
Removes the first occurrence in this list of the specified element
(optional operation).
|
boolean |
removeAll(Collection<?> c)
Removes from this list all the elements that are contained in the
specified collection (optional operation).
|
boolean |
retainAll(Collection<?> c)
Retains only the elements in this list that are contained in the
specified collection (optional operation).
|
E |
set(int index,
E element)
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, removeAllElements, removeElement, removeElementAt, removeRange, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArraypublic ContainmentList(ModelObject parent, Class<E> type)
parent - The parent model objecttype - The type of the elements in the listpublic Class<E> getType()
public boolean add(E o)
Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.
add in interface Collection<E extends ModelObject>add in interface List<E extends ModelObject>add in class Vector<E extends ModelObject>o - element to be appended to this list.public boolean remove(Object o)
remove in interface Collection<E extends ModelObject>remove in interface List<E extends ModelObject>remove in class Vector<E extends ModelObject>o - element to be removed from this list, if present.public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E extends ModelObject>addAll in interface List<E extends ModelObject>addAll in class Vector<E extends ModelObject>c - collection whose elements are to be added to this list.Vector.add(Object)public boolean addAll(int index,
Collection<? extends E> c)
addAll in interface List<E extends ModelObject>addAll in class Vector<E extends ModelObject>index - index at which to insert first element from the specified
collection.c - elements to be inserted into this list.public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E extends ModelObject>removeAll in interface List<E extends ModelObject>removeAll in class Vector<E extends ModelObject>c - collection that defines which elements will be removed from
this list.remove(Object),
Vector.contains(Object)public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E extends ModelObject>retainAll in interface List<E extends ModelObject>retainAll in class Vector<E extends ModelObject>c - collection that defines which elements this set will retain.remove(Object),
Vector.contains(Object)public void clear()
clear in interface Collection<E extends ModelObject>clear in interface List<E extends ModelObject>clear in class Vector<E extends ModelObject>public E set(int index, E element)
set in interface List<E extends ModelObject>set in class Vector<E extends ModelObject>index - index of element to replace.element - element to be stored at the specified position.public void add(int index,
E element)
add in interface List<E extends ModelObject>add in class Vector<E extends ModelObject>index - index at which the specified element is to be inserted.element - element to be inserted.public E remove(int index)
remove in interface List<E extends ModelObject>remove in class Vector<E extends ModelObject>index - the index of the element to removed.Copyright © 2014. All Rights Reserved.