|
||||||||||
| 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.ShortLists.Singleton
An immutable class representing a type-specific singleton list.
This class may be useful to implement your own in case you subclass a type-specific list.
| Field Summary | |
static long |
serialVersionUID
|
| Method Summary | |
void |
add(int i,
short k)
|
boolean |
add(short k)
|
boolean |
addAll(Collection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection c)
|
boolean |
addAll(int i,
List c)
|
boolean |
addAll(int i,
ShortCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
ShortList c)
Delegates to a more generic method. |
boolean |
addAll(List c)
|
boolean |
addAll(ShortCollection c)
Delegates to a more generic method. |
boolean |
addAll(ShortList c)
Delegates to a more generic method. |
void |
clear()
|
Object |
clone()
|
boolean |
contains(short k)
|
short |
getShort(int i)
|
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. |
boolean |
removeAll(Collection c)
Remove from this collection all elements in the given collection. |
boolean |
removeAll(ShortCollection c)
Remove from this collection all elements in the given type-specific collection. |
short |
removeShort(int i)
|
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
boolean |
retainAll(ShortCollection c)
Retains in this collection only elements from the given type-specific collection. |
ShortListIterator |
shortListIterator()
Delegates to the corresponding list-iterator method. |
ShortListIterator |
shortListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
ShortList |
shortSubList(int from,
int to)
|
int |
size()
|
void |
size(int size)
Sets the size of this list. |
short[] |
toShortArray()
Returns a primitive type array containing the items of this collection. |
| Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortList |
add, addElements, addElements, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekShort, pop, popShort, push, push, remove, removeElements, set, set, shortIterator, subList, top, topShort, toString |
| Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, toArray, toArray, toArray, 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, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection |
containsAll, toArray, toShortArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
| Field Detail |
public static final long serialVersionUID
| Method Detail |
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 AbstractShortListpublic boolean add(short k)
add in interface ShortCollectionadd in class AbstractShortCollection
public void add(int i,
short k)
add in interface ShortListadd in class AbstractShortListpublic short getShort(int i)
getShort in interface ShortListList.get(int)public short removeShort(int i)
removeShort in interface ShortListremoveShort in class AbstractShortListpublic boolean contains(short k)
contains in interface ShortCollectioncontains in class AbstractShortListpublic boolean addAll(ShortList c)
AbstractShortList
addAll in interface ShortListaddAll in class AbstractShortListpublic boolean addAll(ShortCollection c)
AbstractShortList
addAll in interface ShortCollectionaddAll in class AbstractShortList
public boolean addAll(int i,
ShortList c)
AbstractShortList
addAll in interface ShortListaddAll in class AbstractShortList
public boolean addAll(int i,
ShortCollection c)
AbstractShortList
addAll in interface ShortListaddAll in class AbstractShortListpublic boolean removeAll(ShortCollection c)
AbstractShortCollection
removeAll in interface ShortCollectionremoveAll in class AbstractShortCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean retainAll(ShortCollection c)
AbstractShortCollection
retainAll in interface ShortCollectionretainAll in class AbstractShortCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean addAll(List c)
public boolean addAll(Collection c)
AbstractShortList
addAll in interface ListaddAll in class AbstractShortList
public boolean addAll(int i,
List c)
public boolean addAll(int i,
Collection c)
addAll in interface ListaddAll in class AbstractShortListpublic boolean removeAll(Collection c)
AbstractShortCollection
removeAll in interface ListremoveAll in class AbstractShortCollectionc - a collection.
true if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractShortCollection
retainAll in interface ListretainAll in class AbstractShortCollectionc - a collection.
true if this collection changed as a result of the call.public short[] toShortArray()
ShortCollection
toShortArray in interface ShortCollectiontoShortArray in class AbstractShortCollectionpublic ShortListIterator shortListIterator()
AbstractShortList
shortListIterator in interface ShortListshortListIterator in class AbstractShortListpublic ShortListIterator shortListIterator(int i)
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 ShortListList.listIterator(int)
public ShortList shortSubList(int from,
int to)
shortSubList in interface ShortListshortSubList in class AbstractShortListpublic int size()
size in interface Listpublic void size(int size)
ShortListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
size in interface ShortListsize in class AbstractShortListpublic void clear()
clear in interface Listclear in class AbstractShortCollectionpublic Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||