public static class AbstractShortList.ShortSubList extends AbstractShortList implements Serializable
AbstractShortList.ShortSubList| Constructor and Description |
|---|
ShortSubList(ShortList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
short k) |
boolean |
add(short k) |
boolean |
addAll(int index,
Collection<? extends Short> c) |
boolean |
addAll(int index,
ShortCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int index,
ShortList l)
Delegates to a more generic method.
|
void |
addElements(int index,
short[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
void |
clear() |
void |
getElements(int from,
short[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one.
|
short |
getShort(int index) |
ShortListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(short k)
|
boolean |
remove(Object o)
Delegates to
rem(). |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one.
|
short |
removeShort(int index) |
short |
set(int index,
short k) |
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. |
add, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekShort, pop, popShort, push, push, remove, set, shortListIterator, shortListIterator, shortSubList, size, top, topShort, toStringadd, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, shortIterator, toArray, toArray, toArray, toShortArray, toShortArrayadd, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraycontainsAll, removeAll, retainAll, shortIterator, toArray, toArray, toShortArray, toShortArrayparallelStream, removeIf, streampublic ShortSubList(ShortList l, int from, int to)
public boolean add(short k)
add in interface ShortCollectionadd in interface ShortListadd in class AbstractShortListCollection.add(Object)public void add(int index,
short k)
add in interface ShortListadd in class AbstractShortListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Short> c)
addAll in interface List<Short>addAll in class AbstractShortListpublic short getShort(int index)
getShort in interface ShortListList.get(int)public short removeShort(int index)
removeShort in interface ShortListremoveShort in class AbstractShortListList.remove(int)public short set(int index,
short k)
set in interface ShortListset in class AbstractShortListList.set(int,Object)public void clear()
clear in interface Collection<Short>clear in interface List<Short>clear in class AbstractCollection<Short>public int size()
size in interface Collection<Short>size in interface List<Short>size in class AbstractCollection<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)
ShortListlistIterator in interface ShortListlistIterator in interface List<Short>listIterator 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 ShortListsubList in interface List<Short>subList in class AbstractShortListList.subList(int,int)public boolean rem(short k)
ShortCollectionremove(), but the clash with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().rem in interface ShortCollectionrem in class AbstractShortListCollection.remove(Object)public boolean remove(Object o)
AbstractShortListrem().remove in interface Collection<Short>remove in interface List<Short>remove in class AbstractShortListpublic boolean addAll(int index,
ShortCollection c)
AbstractShortListaddAll in interface ShortListaddAll in class AbstractShortListList.add(int,Object)public boolean addAll(int index,
ShortList l)
AbstractShortListaddAll in interface ShortListaddAll in class AbstractShortListList.add(int,Object)