ShortCollection, ShortIterable, ShortList, ShortStack, Stack<java.lang.Short>, java.io.Serializable, java.lang.Comparable<java.util.List<? extends java.lang.Short>>, java.lang.Iterable<java.lang.Short>, java.util.Collection<java.lang.Short>, java.util.List<java.lang.Short>public static class AbstractShortList.ShortSubList extends AbstractShortList implements java.io.Serializable
AbstractShortList.ShortSubList| Constructor | Description |
|---|---|
ShortSubList(ShortList l,
int from,
int to) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(int index,
short k) |
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
add(short k) |
Ensures that this collection contains the specified element (optional
operation).
|
boolean |
addAll(int index,
ShortCollection c) |
Inserts all of the elements in the specified type-specific collection into
this type-specific list at the specified position (optional operation).
|
boolean |
addAll(int index,
ShortList l) |
Inserts all of the elements in the specified type-specific list into this
type-specific list at the specified position (optional operation).
|
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Short> c) |
Adds all of the elements in the specified collection to this list (optional
operation).
|
void |
addElements(int index,
short[] a,
int offset,
int length) |
Add (hopefully quickly) elements to this type-specific list.
|
void |
getElements(int from,
short[] a,
int offset,
int length) |
Copies (hopefully quickly) elements of this type-specific list into the given
array.
|
short |
getShort(int index) |
Returns the element at the specified position in this list.
|
ShortListIterator |
listIterator(int index) |
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(short k) |
Removes a single instance of the specified element from this collection, if
it is present (optional operation).
|
void |
removeElements(int from,
int to) |
Removes (hopefully quickly) elements of this type-specific list.
|
short |
removeShort(int index) |
Removes the element at the specified position in this list (optional
operation).
|
short |
set(int index,
short k) |
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
int |
size() |
|
ShortList |
subList(int from,
int to) |
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
containsAll, isEmpty, removeAll, retainAll, toArray, toArrayadd, contains, containsAll, remove, removeAll, retainAll, toArray, toShortArray, toShortArrayaddAll, addAll, addAll, addElements, clear, compareTo, contains, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, peekShort, popShort, push, size, topShort, toStringcontainsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraycontainsAll, removeAll, removeIf, removeIf, retainAll, toArray, toShortArray, toShortArrayforEach, forEachadd, add, contains, get, indexOf, lastIndexOf, remove, remove, setpeek, pop, push, toppublic ShortSubList(ShortList l, int from, int to)
public boolean add(short k)
AbstractShortList
This implementation always throws an UnsupportedOperationException.
This implementation delegates to the type-specific version of
List.add(int, Object).
add in interface ShortCollectionadd in interface ShortListadd in class AbstractShortListCollection.add(Object)public void add(int index,
short k)
AbstractShortList
This implementation always throws an UnsupportedOperationException.
add in interface ShortListadd in class AbstractShortListList.add(int,Object)public boolean addAll(int index,
java.util.Collection<? extends java.lang.Short> c)
AbstractShortListaddAll in interface java.util.List<java.lang.Short>addAll in class AbstractShortListpublic short getShort(int index)
ShortListpublic short removeShort(int index)
AbstractShortList
This implementation always throws an UnsupportedOperationException.
removeShort in interface ShortListremoveShort in class AbstractShortListList.remove(int)public short set(int index,
short k)
AbstractShortList
This implementation always throws an UnsupportedOperationException.
set in interface ShortListset in class AbstractShortListList.set(int,Object)public int size()
size in interface java.util.Collection<java.lang.Short>size in interface java.util.List<java.lang.Short>size in class java.util.AbstractCollection<java.lang.Short>public void getElements(int from,
short[] a,
int offset,
int length)
AbstractShortListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface ShortListgetElements in class AbstractShortListfrom - the start index (inclusive).a - the destination array.offset - the offset into the destination array where to store the first
element copied.length - the number of elements to be copied.public void removeElements(int from,
int to)
AbstractShortListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface ShortListremoveElements in class AbstractShortListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
short[] a,
int offset,
int length)
AbstractShortListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface ShortListaddElements in class AbstractShortListindex - the index at which to add elements.a - the array containing the elements.offset - the offset of the first element to add.length - the number of elements to add.public ShortListIterator listIterator(int index)
AbstractShortListThis implementation is based on the random-access methods.
listIterator in interface java.util.List<java.lang.Short>listIterator in interface ShortListlistIterator in class AbstractShortListList.listIterator(int)public ShortList subList(int from, int to)
ShortListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in
List.subList(int,int).
subList in interface java.util.List<java.lang.Short>subList in interface ShortListsubList in class AbstractShortListList.subList(int,int)public boolean rem(short k)
AbstractShortList
This implementation delegates to indexOf().
rem in interface ShortCollectionrem in class AbstractShortListList.remove(Object)public boolean addAll(int index,
ShortCollection c)
ShortListaddAll in interface ShortListaddAll in class AbstractShortListList.addAll(int,java.util.Collection)public boolean addAll(int index,
ShortList l)
AbstractShortList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface ShortListaddAll in class AbstractShortListList.add(int,Object)