|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.unimi.dsi.fastutil.shorts.AbstractShortCollection
it.unimi.dsi.fastutil.shorts.AbstractShortList
it.unimi.dsi.fastutil.shorts.AbstractShortList.ShortSubList
| Nested Class Summary |
| Nested classes inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortList |
AbstractShortList.ShortSubList |
| Constructor Summary | |
AbstractShortList.ShortSubList(ShortList l,
int from,
int to)
|
|
| Method Summary | |
void |
add(int index,
short k)
|
boolean |
add(short k)
|
boolean |
addAll(int index,
Collection 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)
|
boolean |
rem(short k)
Note that this method should be called remove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. |
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)
|
ShortListIterator |
shortListIterator(int index)
Returns a type-specific list iterator on the list starting at a given index. |
ShortList |
shortSubList(int from,
int to)
|
int |
size()
|
| Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortList |
add, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekShort, pop, popShort, push, push, remove, set, shortIterator, shortListIterator, size, subList, top, topShort, toString |
| Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toShortArray, toShortArray |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
add, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection |
containsAll, removeAll, retainAll, toArray, toShortArray, toShortArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
| Constructor Detail |
public AbstractShortList.ShortSubList(ShortList l,
int from,
int to)
| Method Detail |
public boolean add(short k)
add in interface ShortCollectionadd in class AbstractShortList
public void add(int index,
short k)
add in interface ShortListadd in class AbstractShortList
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in class AbstractShortList
public boolean addAll(int index,
ShortCollection c)
AbstractShortList
addAll in interface ShortListaddAll in class AbstractShortList
public boolean addAll(int index,
ShortList l)
AbstractShortList
addAll in interface ShortListaddAll in class AbstractShortListpublic short getShort(int index)
getShort in interface ShortListList.get(int)public short removeShort(int index)
removeShort in interface ShortListremoveShort in class AbstractShortListpublic 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 AbstractShortList
public short set(int index,
short k)
set in interface ShortListset in class AbstractShortListpublic void clear()
clear in interface Listclear in class AbstractShortCollectionpublic int size()
size in interface List
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 shortListIterator(int index)
ShortListThe iterator returned by the List.listIterator() method and by this
method are identical; however, using this method you can save a type casting.
shortListIterator in interface ShortListshortListIterator in class AbstractShortList
public ShortList shortSubList(int from,
int to)
shortSubList in interface ShortListshortSubList in class AbstractShortList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||