|
|||||||||
| 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
public static class 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.longs.AbstractLongList |
|---|
AbstractLongList.LongSubList |
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Method Summary | |
|---|---|
boolean |
addAll(Collection<? extends Long> c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection<? extends Long> c)
|
boolean |
addAll(int i,
LongCollection c)
Delegates to a more generic method. |
boolean |
addAll(LongCollection c)
Adds all elements of the given type-specific collection to this collection. |
void |
clear()
|
Object |
clone()
|
boolean |
contains(long k)
|
long |
getLong(int i)
|
LongListIterator |
listIterator()
Returns a type-specific list iterator on the list. |
LongListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
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. |
long |
removeLong(int i)
|
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
LongList |
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. |
long[] |
toLongArray()
Returns a primitive type array containing the items of this collection. |
| Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongList |
|---|
add, add, add, addAll, addAll, addElements, addElements, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, longListIterator, longListIterator, longSubList, peek, peekLong, pop, popLong, push, push, remove, remove, removeElements, set, set, top, topLong, toString |
| Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection |
|---|
add, contains, containsAll, containsAll, isEmpty, longIterator, rem, removeAll, retainAll, 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, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection |
|---|
containsAll, longIterator, removeAll, retainAll, toArray, toArray, toLongArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
|---|
isEmpty |
| Field Detail |
|---|
public static final long serialVersionUID
| Method Detail |
|---|
public long getLong(int i)
getLong in interface LongListList.get(int)public long removeLong(int i)
removeLong in interface LongListremoveLong in class AbstractLongListList.remove(int)public boolean contains(long k)
contains in interface LongCollectioncontains in class AbstractLongListCollection.contains(Object)public boolean addAll(Collection<? extends Long> c)
AbstractLongList
addAll in interface Collection<Long>addAll in interface List<Long>addAll in class AbstractLongListc - a collection.
true if this collection changed as a result of the call.
public boolean addAll(int i,
Collection<? extends Long> c)
addAll in interface List<Long>addAll in class AbstractLongListpublic boolean removeAll(Collection<?> c)
AbstractLongCollection
removeAll in interface Collection<Long>removeAll in interface List<Long>removeAll 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 Collection<Long>retainAll in interface List<Long>retainAll 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 AbstractLongCollectionCollection.toArray()public LongListIterator listIterator()
LongList
listIterator in interface LongListlistIterator in interface List<Long>listIterator in class AbstractLongListLongList.listIterator()public LongListIterator listIterator(int i)
LongList
listIterator in interface LongListlistIterator in interface List<Long>listIterator in class AbstractLongListLongList.listIterator(int)
public LongList subList(int from,
int to)
LongListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface LongListsubList in interface List<Long>subList in class AbstractLongListList.subList(int,int)public int size()
size in interface Collection<Long>size in interface List<Long>public 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 AbstractLongListsize - the new size.public void clear()
clear in interface Collection<Long>clear in interface List<Long>clear in class AbstractLongCollectionpublic Object clone()
clone in class Objectpublic 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 AbstractLongListCollection.remove(Object)public boolean addAll(LongCollection c)
AbstractLongCollection
addAll in interface LongCollectionaddAll in class AbstractLongListc - a type-specific collection.
true if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean addAll(int i,
LongCollection c)
AbstractLongList
addAll in interface LongListaddAll in class AbstractLongListList.add(int,Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||