|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongList
it.unimi.dsi.fastutil.longs.LongLists.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,
long k)
|
boolean |
add(long 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,
LongCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
LongList c)
Delegates to a more generic method. |
boolean |
addAll(List c)
|
boolean |
addAll(LongCollection c)
Delegates to a more generic method. |
boolean |
addAll(LongList c)
Delegates to a more generic method. |
void |
clear()
|
Object |
clone()
|
boolean |
contains(long k)
|
long |
getLong(int i)
|
LongListIterator |
longListIterator()
Delegates to the corresponding list-iterator method. |
LongListIterator |
longListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
LongList |
longSubList(int from,
int to)
|
boolean |
rem(long 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(LongCollection c)
Remove from this collection all elements in the given type-specific collection. |
long |
removeLong(int i)
|
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
boolean |
retainAll(LongCollection c)
Retains in this collection only elements from the given type-specific collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
long[] |
toLongArray()
Returns a primitive type array containing the items of this collection. |
| Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongList |
add, addElements, addElements, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, longIterator, peek, peekLong, pop, popLong, push, push, remove, removeElements, set, set, subList, top, topLong, toString |
| Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, toArray, toArray, toArray, toLongArray |
| 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.longs.LongCollection |
containsAll, toArray, toLongArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
| Field Detail |
public static final long serialVersionUID
| Method Detail |
public boolean rem(long k)
LongCollectionremove(), 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 LongCollectionrem in class AbstractLongListpublic boolean add(long k)
add in interface LongCollectionadd in class AbstractLongCollection
public void add(int i,
long k)
add in interface LongListadd in class AbstractLongListpublic long getLong(int i)
getLong in interface LongListList.get(int)public long removeLong(int i)
removeLong in interface LongListremoveLong in class AbstractLongListpublic boolean contains(long k)
contains in interface LongCollectioncontains in class AbstractLongListpublic boolean addAll(LongList c)
AbstractLongList
addAll in interface LongListaddAll in class AbstractLongListpublic boolean addAll(LongCollection c)
AbstractLongList
addAll in interface LongCollectionaddAll in class AbstractLongList
public boolean addAll(int i,
LongList c)
AbstractLongList
addAll in interface LongListaddAll in class AbstractLongList
public boolean addAll(int i,
LongCollection c)
AbstractLongList
addAll in interface LongListaddAll in class AbstractLongListpublic boolean removeAll(LongCollection c)
AbstractLongCollection
removeAll in interface LongCollectionremoveAll in class AbstractLongCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean retainAll(LongCollection c)
AbstractLongCollection
retainAll in interface LongCollectionretainAll in class AbstractLongCollectionc - 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)
AbstractLongList
addAll in interface ListaddAll in class AbstractLongList
public boolean addAll(int i,
List c)
public boolean addAll(int i,
Collection c)
addAll in interface ListaddAll in class AbstractLongListpublic boolean removeAll(Collection c)
AbstractLongCollection
removeAll in interface ListremoveAll in class AbstractLongCollectionc - a collection.
true if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractLongCollection
retainAll in interface ListretainAll in class AbstractLongCollectionc - a collection.
true if this collection changed as a result of the call.public long[] toLongArray()
LongCollection
toLongArray in interface LongCollectiontoLongArray in class AbstractLongCollectionpublic LongListIterator longListIterator()
AbstractLongList
longListIterator in interface LongListlongListIterator in class AbstractLongListpublic LongListIterator longListIterator(int i)
LongListThe iterator returned by the List.listIterator() method and by this
method are identical; however, using this method you can save a type casting.
longListIterator in interface LongListList.listIterator(int)
public LongList longSubList(int from,
int to)
longSubList in interface LongListlongSubList in class AbstractLongListpublic int size()
size in interface Listpublic void size(int size)
LongListIf 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 LongListsize in class AbstractLongListpublic void clear()
clear in interface Listclear in class AbstractLongCollectionpublic Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||