MutableShortList.
This is for scenarios where optimization is not a consideration and therefore no further methods will be optimized.
This file was automatically generated from template file boxedPrimitiveList.stg.
| Modifier and Type | Field and Description |
|---|---|
| private final MutableShortList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(Short item)
Overrides org. Implements java. Appends the specified element to the end of this list (optional operation). |
| public void | add(int index, Short element)
Implements java. Inserts the specified element at the specified position in this list (optional operation). |
| public boolean | addAll(int index, Collection<? extends Short> c)
Implements java. Inserts all of the elements in the specified collection into this list at the specified position (optional operation). |
| public void | clear()
Overrides org. Implements java. Removes all of the elements from this list (optional operation). |
| public Short | get(int index)
Implements java. Returns the element at the specified position in this list. |
| public int | indexOf(Object o)
Overrides org. Overrides default org. Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. |
| public int | lastIndexOf(Object o)
Overrides org. Implements java. Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. |
| public Short | remove(int index)
Implements java. Removes the element at the specified position in this list (optional operation). |
| public Short | set(int index, Short element)
Implements java. Replaces the element at the specified position in this list with the specified element (optional operation). |
| public int | size()
Implements java. Returns the number of elements in this list. |
| public MutableList | subList(int fromIndex, int toIndex)
Overrides org. Implements org. Returns a view of the portion of this list between the specified
|
| delegate | back to summary |
|---|---|
| private final MutableShortList delegate | |
| BoxedMutableShortList | back to summary |
|---|---|
| public BoxedMutableShortList(MutableShortList delegate) | |
| add | back to summary |
|---|---|
| public boolean add(Short item) Overrides org. Implements java. Doc from java. Appends the specified element to the end of this list (optional operation). 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 | back to summary |
|---|---|
| public void add(int index, Short element) Implements java. Doc from java. Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(int index, Collection<? extends Short> c) Implements java. Doc from java. Inserts all of the elements in the specified collection into this list at the specified position (optional operation). 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 this list 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. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides org. Implements java. Doc from java. Removes all of the elements from this list (optional operation). The list will be empty after this call returns.
| |
| get | back to summary |
|---|---|
| public Short get(int index) Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(Object o) Overrides org. Overrides default org. Doc from java. Returns the index of the first occurrence of the specified element
in this list, or -1 if this list does not contain the element.
More formally, returns the lowest index
| |
| lastIndexOf | back to summary |
|---|---|
| public int lastIndexOf(Object o) Overrides org. Implements java. Doc from java. Returns the index of the last occurrence of the specified element
in this list, or -1 if this list does not contain the element.
More formally, returns the highest index
| |
| remove | back to summary |
|---|---|
| public Short remove(int index) Implements java. Doc from java. Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
| |
| set | back to summary |
|---|---|
| public Short set(int index, Short element) Implements java. Doc from java. Replaces the element at the specified position in this list with the specified element (optional operation).
| |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| subList | back to summary |
|---|---|
| public MutableList Overrides org. 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.)
| |