public class Vector extends Vector implements SCOCollection
Vector,
Serialized FormcapacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
Vector(Object owner,
String fieldName,
Class elementType,
boolean allowNulls)
Constructs an empty vector so that its internal data array
has size 10 and its standard capacity increment is
zero.
|
Vector(Object owner,
String fieldName,
Class elementType,
boolean allowNulls,
int initialCapacity)
Constructs an empty vector with the specified initial capacity and
with its capacity increment equal to zero.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this Vector.
|
boolean |
add(Object o)
Appends the specified element to the end of this Vector.
|
boolean |
addAll(Collection c)
Appends all of the elements in the specified Collection to the end of
this Vector, in the order that they are returned by the specified
Collection's Iterator.
|
boolean |
addAll(int index,
Collection c)
Inserts all of the elements in in the specified Collection into this
Vector at the specified position.
|
void |
addAllInternal(Collection c)
Adds a Collection to the list without recording changes
|
void |
addElement(Object obj)
Adds the specified component to the end of this vector,
increasing its size by one.
|
void |
addInternal(Object o)
Adds an object to the list without recording changes
|
void |
addToBaseCollection(Object o)
Adds an object to the list without recording changes.
|
void |
applyDeferredUpdates(Collection c) |
void |
applyUpdates(StateManager sm,
boolean modified)
Apply changes (can be a no-op)
|
void |
clear()
Removes all of the elements from this Vector.
|
void |
clearInternal()
Clears Collection without notifing the owner
|
Object |
clone()
Creates and returns a copy of this object.
|
Object |
cloneInternal()
Creates and returns a copy of this object without resetting the owner and field value.
|
Collection |
getAdded()
Returns added collection
|
String |
getFieldName()
Returns the field name
|
Object |
getOwner()
Returns the owner object of the SCO instance
|
Collection |
getRemoved()
Returns removed collection
|
void |
insertElementAt(Object obj,
int index)
Inserts the specified object as a component in this vector at the
specified
index. |
boolean |
isDeferred() |
StateManager |
makeDirty()
Marks object dirty
|
void |
markDeferred() |
Object |
remove(int index)
Removes the element at the specified position in this Vector.
|
boolean |
remove(Object o)
Removes the first occurrence of the specified element in this Vector
If the Vector does not contain the element, it is unchanged.
|
boolean |
removeAll(Collection c)
Removes from this Vector all of its elements that are contained in the
specified Collection.
|
void |
removeAllElements()
Removes all components from this vector and sets its size to zero.
|
void |
removeAllInternal(Collection c)
Removes from this collection without recording changes
|
boolean |
removeElement(Object obj)
Removes the first (lowest-indexed) occurrence of the argument
from this vector.
|
void |
removeElementAt(int index)
Deletes the component at the specified index.
|
void |
removeInternal(Object o)
Removes an element without notifing the owner
|
void |
reset()
Cleans removed and added lists
|
boolean |
retainAll(Collection c)
Retains only the elements in this Vector that are contained in the
specified Collection.
|
Object |
set(int index,
Object element)
Replaces the element at the specified position in this Vector with the
specified element.
|
void |
setElementAt(Object obj,
int index)
Sets the component at the specified
index of this
vector to be the specified object. |
void |
setOwner(Object owner,
String fieldName,
Class elementType)
Set the owner if this instance is not owned.
|
void |
unsetOwner()
Nullifies references to the owner Object and Field
|
capacity, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, removeIf, removeRange, replaceAll, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArraypublic Vector(Object owner, String fieldName, Class elementType, boolean allowNulls)
owner - the owning objectfieldName - the owning field nameelementType - the element types allowedallowNulls - true if nulls are allowedpublic Vector(Object owner, String fieldName, Class elementType, boolean allowNulls, int initialCapacity)
owner - the owning objectfieldName - the owning field nameelementType - the element types allowedallowNulls - true if nulls are allowedinitialCapacity - the initial capacity of the vector.IllegalArgumentException - if the specified initial capacity
is negativepublic void setElementAt(Object obj, int index)
index of this
vector to be the specified object. The previous component at that
position is discarded.setElementAt in class Vectorobj - what the component is to be set to.index - the specified index.ArrayIndexOutOfBoundsException - if the index was invalid.Vectorpublic void removeElementAt(int index)
removeElementAt in class Vectorindex - the index of the object to remove.ArrayIndexOutOfBoundsException - if the index was invalid.Vectorpublic void insertElementAt(Object obj, int index)
index.insertElementAt in class Vectorobj - the component to insert.index - where to insert the new component.ArrayIndexOutOfBoundsException - if the index was invalid.Vectorpublic void addElement(Object obj)
addElement in class Vectorobj - the component to be added.Vectorpublic boolean removeElement(Object obj)
removeElement in class Vectorobj - the component to be removed.true if the argument was a component of this
vector; false otherwise.Vectorpublic void removeAllElements()
removeAllElements in class VectorVectorpublic Object set(int index, Object element)
set in interface Listset in class Vectorindex - index of element to replace.element - element to be stored at the specified position.ArrayIndexOutOfBoundsException - index out of range
(index < 0 || index >= size()).IllegalArgumentException - fromIndex > toIndex.Vectorpublic boolean add(Object o)
public boolean remove(Object o)
public void add(int index,
Object element)
public Object remove(int index)
public void clear()
public boolean addAll(Collection c)
public boolean removeAll(Collection c)
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in class Vectorindex - index at which to insert first element
from the specified collection.c - elements to be inserted into this Vector.ArrayIndexOutOfBoundsException - index out of range (index
< 0 || index > size()).Vectorpublic boolean retainAll(Collection c)
public Object clone()
Mutable Second Class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.
public Object cloneInternal()
cloneInternal in interface SCOpublic void reset()
reset in interface SCOCollectionpublic void markDeferred()
markDeferred in interface SCOCollectionpublic boolean isDeferred()
isDeferred in interface SCOCollectionpublic void applyDeferredUpdates(Collection c)
applyDeferredUpdates in interface SCOCollectionpublic void addInternal(Object o)
addInternal in interface SCOCollectionpublic void addAllInternal(Collection c)
addAllInternal in interface SCOCollectionpublic void addToBaseCollection(Object o)
SCOCollectionaddToBaseCollection in interface SCOCollectionpublic void removeAllInternal(Collection c)
removeAllInternal in interface SCOCollectionpublic Collection getAdded()
getAdded in interface SCOCollectionpublic Collection getRemoved()
getRemoved in interface SCOCollectionpublic void clearInternal()
clearInternal in interface SCOCollectionpublic void removeInternal(Object o)
removeInternal in interface SCOCollectionpublic void unsetOwner()
unsetOwner in interface SCOpublic Object getOwner()
public String getFieldName()
getFieldName in interface SCOpublic StateManager makeDirty()
public void applyUpdates(StateManager sm, boolean modified)
applyUpdates in interface SCOpublic void setOwner(Object owner, String fieldName, Class elementType)
setOwner in interface SCOCollectionowner - the new owner.fieldName - the new field name.elementType - the new element type as Class, or null if type
is not to be checked.SCOCollection.setOwner(java.lang.Object, java.lang.String, java.lang.Class)Copyright © 2019. All rights reserved.