This implementation is backed by an IntTreePMap and supports logarithmic-time querying, setting, insertion, and removal.
This implementation is thread-safe (assuming Java's AbstractList is thread-safe) although its iterators may not be.
Null values are supported.
| Modifier and Type | Field and Description |
|---|---|
| private static final TreePVector | |
| private final IntTreePMap | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <E> TreePVector | |
| public static <E> TreePVector | |
| public E | get(final int
index of the element to return index)Implements abstract java. Implements java. Returns the element at the specified position in this list. |
| public Iterator | iterator()
Overrides java. Implements java. Returns an iterator over the elements in this list in proper sequence. |
| public TreePVector | minus(final Object e)
Implements org. Returns a sequence consisting of the elements of this without the first occurrence of e. |
| public TreePVector | |
| public TreePVector | |
| public TreePVector | plus(final E e)
Implements org. Returns a vector consisting of the elements of this with e appended. |
| public TreePVector | |
| public TreePVector | plusAll(final Collection<? extends E> list)
Implements org. Returns a vector consisting of the elements of this with list appended. |
| public TreePVector | |
| public static <E> TreePVector | |
| public int | size()
Implements abstract java. Implements java. Returns the number of elements in this list. |
| public TreePVector | subList(int
low endpoint (inclusive) of the subList start, int high endpoint (exclusive) of the subList end)Overrides java. Implements org. Returns a view of the portion of this list between the specified
|
| public PVector |
| EMPTY | back to summary |
|---|---|
| private static final TreePVector<Object> EMPTY | |
| map | back to summary |
|---|---|
| private final IntTreePMap<E> map | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| TreePVector | back to summary |
|---|---|
| private TreePVector(final IntTreePMap<E> map) | |
| empty | back to summary |
|---|---|
public static <E> TreePVector
| |
| from | back to summary |
|---|---|
public static <E> TreePVector
| |
| get | back to summary |
|---|---|
| public E get(final int index) Implements abstract java. Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| iterator | back to summary |
|---|---|
| public Iterator Overrides java. Implements java. Doc from java. Returns an iterator over the elements in this list in proper sequence. | |
| minus | back to summary |
|---|---|
| public TreePVector Implements org. Doc from org. Returns a sequence consisting of the elements of this without the first occurrence of e.
| |
| minus | back to summary |
|---|---|
| public TreePVector Implements org.
| |
| minusAll | back to summary |
|---|---|
| public TreePVector Implements org.
| |
| plus | back to summary |
|---|---|
| public TreePVector Implements org. Doc from org. Returns a vector consisting of the elements of this with e appended.
| |
| plus | back to summary |
|---|---|
| public TreePVector Implements org.
| |
| plusAll | back to summary |
|---|---|
| public TreePVector Implements org. Doc from org. Returns a vector consisting of the elements of this with list appended.
| |
| plusAll | back to summary |
|---|---|
| public TreePVector Implements org.
| |
| singleton | back to summary |
|---|---|
public static <E> TreePVector
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| subList | back to summary |
|---|---|
| public TreePVector Overrides java. Implements org. Doc from java. Returns a view of the portion of this list between the specified
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
Similar idioms may be constructed for indexOf and
lastIndexOf, and all of the algorithms in the
Collections class can be applied to a subList.The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
| |
| with | back to summary |
|---|---|
| public PVector Implements org.
| |