Top Description Fields Constructors Methods
org.eclipse.persistence.internal.helper

public Class NonSynchronizedSubVector<E>

extends NonSynchronizedVector<E>
Class Inheritance
Imports
java.util.*

SubList that implements Vector.

Field Summary

Modifier and TypeField and Description
private Vector<E>
l

private int
private int

Constructor Summary

AccessConstructor and Description
public
NonSynchronizedSubVector(Vector<E> list, int fromIndex, int toIndex)

Method Summary

Modifier and TypeMethod and Description
public void
add(int
index at which the specified element is to be inserted
index
,
E
element to be inserted
element
)

Overrides java.util.Vector.add.

Implements java.util.List.add.

Inserts the specified element at the specified position in this Vector.
public boolean
addAll(Collection<? extends E>
elements to be inserted into this Vector
c
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.addAll.

Implements java.util.List.addAll, java.util.Collection.addAll.

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.
public boolean
addAll(int
index at which to insert the first element from the specified collection
index
,
Collection<? extends E>
elements to be inserted into this Vector
c
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.addAll.

Implements java.util.List.addAll.

Inserts all of the elements in the specified Collection into this Vector at the specified position.
public E
elementAt(int
an index into this vector
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.elementAt.

Returns the component at the specified index.
public Enumeration<E>
elements()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.elements.

Returns an enumeration of the components of this vector.
public E
firstElement()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.firstElement.

Returns the first component (the item at index 0) of this vector.
public E
get(int
index of the element to return
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.get.

Implements java.util.List.get.

Returns the element at the specified position in this Vector.
public int
indexOf(Object
element to search for
elem
,
int
index to start searching from
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.indexOf.

Returns the index of the first occurrence of the specified element in this vector, searching forwards from index, or returns -1 if the element is not found.
public Iterator<E>
iterator()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this list in proper sequence.
public E
lastElement()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.lastElement.

Returns the last component of the vector.
public int
lastIndexOf(Object
element to search for
elem
,
int
index to start searching backwards from
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.lastIndexOf.

Returns the index of the last occurrence of the specified element in this vector, searching backwards from index, or returns -1 if the element is not found.
public ListIterator<E>
listIterator(final int
index of the first element to be returned from the list iterator (by a call to next)
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.listIterator.

Implements java.util.List.listIterator.

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.
public E
remove(int
the index of the element to be removed
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.remove.

Implements java.util.List.remove.

Removes the element at the specified position in this Vector.
public E
set(int
index of the element to replace
index
,
E
element to be stored at the specified position
element
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.set.

Implements java.util.List.set.

Replaces the element at the specified position in this Vector with the specified element.
public void
setElementAt(E
what the component is to be set to
obj
,
int
the specified index
index
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.setElementAt.

Sets the component at the specified index of this vector to be the specified object.
public int
size()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of components in this vector.
public Object[]
toArray()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Returns an array containing all of the elements in this Vector in the correct order.
public <T> T[]
toArray(T[]
the array into which the elements of the Vector are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
a
)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Returns an array containing all of the elements in this Vector in the correct order; the runtime type of the returned array is that of the specified array.
Inherited from org.eclipse.persistence.internal.helper.NonSynchronizedVector:
addaddElementcapacityclonecontainsAllcopyIntoelementAtelementDataensureCapacityequalsforEachhashCodeinsertElementAtisEmptylastIndexOflistIteratornewInstancenewInstancenewInstancenewInstanceremoveAllremoveAllElementsremoveElementremoveElementAtremoveRangereplaceAllretainAllsetSizesortspliteratorsubListtoStringtrimToSize

Field Detail

lback to summary
private Vector<E> l
offsetback to summary
private int offset
sizeback to summary
private int size

Constructor Detail

NonSynchronizedSubVectorback to summary
public NonSynchronizedSubVector(Vector<E> list, int fromIndex, int toIndex)

Method Detail

addback to summary
public void add(int index, E element)

Overrides java.util.Vector.add.

Implements java.util.List.add.

Doc from java.util.Vector.add.

Inserts the specified element at the specified position in this Vector. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters
index:int

index at which the specified element is to be inserted

element:E

element to be inserted

Annotations
@Override
addAllback to summary
public boolean addAll(Collection<? extends E> c)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.addAll.

Implements java.util.List.addAll, java.util.Collection.addAll.

Doc from java.util.Vector.addAll.

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. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this Vector, and this Vector is nonempty.)

Parameters
c:Collection<? extends E>

elements to be inserted into this Vector

Returns:boolean

true if this Vector changed as a result of the call

Annotations
@Override
addAllback to summary
public boolean addAll(int index, Collection<? extends E> c)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.addAll.

Implements java.util.List.addAll.

Doc from java.util.Vector.addAll.

Inserts all of the elements in the specified Collection into this Vector at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the Vector in the order that they are returned by the specified Collection's iterator.

Parameters
index:int

index at which to insert the first element from the specified collection

c:Collection<? extends E>

elements to be inserted into this Vector

Returns:boolean

true if this Vector changed as a result of the call

Annotations
@Override
elementAtback to summary
public E elementAt(int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.elementAt.

Doc from java.util.Vector.elementAt.

Returns the component at the specified index.

This method is identical in functionality to the get(int) method (which is part of the List interface).

Parameters
index:int

an index into this vector

Returns:E

the component at the specified index

Annotations
@Override
elementsback to summary
public Enumeration<E> elements()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.elements.

Doc from java.util.Vector.elements.

Returns an enumeration of the components of this vector. The returned Enumeration object will generate all items in this vector. The first item generated is the item at index 0, then the item at index 1, and so on. If the vector is structurally modified while enumerating over the elements then the results of enumerating are undefined.

Returns:Enumeration<E>

an enumeration of the components of this vector

Annotations
@Override
firstElementback to summary
public E firstElement()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.firstElement.

Doc from java.util.Vector.firstElement.

Returns the first component (the item at index 0) of this vector.

Returns:E

the first component of this vector

Annotations
@Override
getback to summary
public E get(int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.get.

Implements java.util.List.get.

Doc from java.util.Vector.get.

Returns the element at the specified position in this Vector.

Parameters
index:int

index of the element to return

Returns:E

object at the specified index

Annotations
@Override
indexOfback to summary
public int indexOf(Object elem, int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.indexOf.

Doc from java.util.Vector.indexOf.

Returns the index of the first occurrence of the specified element in this vector, searching forwards from index, or returns -1 if the element is not found. More formally, returns the lowest index i such that (i >= index && Objects.equals(o, get(i))), or -1 if there is no such index.

Parameters
elem:Object

element to search for

index:int

index to start searching from

Returns:int

the index of the first occurrence of the element in this vector at position index or later in the vector; -1 if the element is not found.

Annotations
@Override
iteratorback to summary
public Iterator<E> iterator()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Doc from java.util.Vector.iterator.

Returns an iterator over the elements in this list in proper sequence.

The returned iterator is fail-fast.

Returns:Iterator<E>

an iterator over the elements in this list in proper sequence

Annotations
@Override
lastElementback to summary
public E lastElement()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.lastElement.

Doc from java.util.Vector.lastElement.

Returns the last component of the vector.

Returns:E

the last component of the vector, i.e., the component at index size() - 1

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(Object elem, int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.lastIndexOf.

Doc from java.util.Vector.lastIndexOf.

Returns the index of the last occurrence of the specified element in this vector, searching backwards from index, or returns -1 if the element is not found. More formally, returns the highest index i such that (i <= index && Objects.equals(o, get(i))), or -1 if there is no such index.

Parameters
elem:Object

element to search for

index:int

index to start searching backwards from

Returns:int

the index of the last occurrence of the element at position less than or equal to index in this vector; -1 if the element is not found.

Annotations
@Override
listIteratorback to summary
public ListIterator<E> listIterator(final int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.listIterator.

Implements java.util.List.listIterator.

Doc from java.util.Vector.listIterator.

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list. The specified index indicates the first element that would be returned by an initial call to next. An initial call to previous would return the element with the specified index minus one.

The returned list iterator is fail-fast.

Parameters
index:int

Doc from java.util.List.listIterator.

index of the first element to be returned from the list iterator (by a call to next)

Returns:ListIterator<E>

Doc from java.util.List.listIterator.

a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list

Annotations
@Override
removeback to summary
public E remove(int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.remove.

Implements java.util.List.remove.

Doc from java.util.Vector.remove.

Removes the element at the specified position in this Vector. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the Vector.

Parameters
index:int

the index of the element to be removed

Returns:E

element that was removed

Annotations
@Override
setback to summary
public E set(int index, E element)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.set.

Implements java.util.List.set.

Doc from java.util.Vector.set.

Replaces the element at the specified position in this Vector with the specified element.

Parameters
index:int

index of the element to replace

element:E

element to be stored at the specified position

Returns:E

the element previously at the specified position

Annotations
@Override
setElementAtback to summary
public void setElementAt(E obj, int index)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.setElementAt.

Doc from java.util.Vector.setElementAt.

Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded.

The index must be a value greater than or equal to 0 and less than the current size of the vector.

This method is identical in functionality to the set(int, E) method (which is part of the List interface). Note that the set method reverses the order of the parameters, to more closely match array usage. Note also that the set method returns the old value that was stored at the specified position.

Parameters
obj:E

what the component is to be set to

index:int

the specified index

Annotations
@Override
sizeback to summary
public int size()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.Vector.size.

Returns the number of components in this vector.

Returns:int

the number of components in this vector

Annotations
@Override
toArrayback to summary
public Object[] toArray()

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Doc from java.util.Vector.toArray.

Returns an array containing all of the elements in this Vector in the correct order.

Returns:Object[]

Doc from java.util.List.toArray.

an array containing all of the elements in this list in proper sequence

Annotations
@Override
toArrayback to summary
public <T> T[] toArray(T[] a)

Overrides org.eclipse.persistence.internal.helper.NonSynchronizedVector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Doc from java.util.Vector.toArray.

Returns an array containing all of the elements in this Vector in the correct order; the runtime type of the returned array is that of the specified array. If the Vector fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this Vector.

If the Vector fits in the specified array with room to spare (i.e., the array has more elements than the Vector), the element in the array immediately following the end of the Vector is set to null. (This is useful in determining the length of the Vector only if the caller knows that the Vector does not contain any null elements.)

Parameters
<T>
type of array elements. The same type as <E> or a supertype of <E>.
a:T[]

the array into which the elements of the Vector are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.

Returns:T[]

an array containing the elements of the Vector

Annotations
@Override
@SuppressWarnings:unchecked