|
||||||||||
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.
Nested Class Summary |
Nested classes inherited from class it.unimi.dsi.fastutil.longs.AbstractLongList |
AbstractLongList.LongSubList |
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)
LongCollection
remove()
, 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 LongCollection
rem
in class AbstractLongList
public boolean add(long k)
add
in interface LongCollection
add
in class AbstractLongList
public void add(int i, long k)
add
in interface LongList
add
in class AbstractLongList
public long getLong(int i)
getLong
in interface LongList
List.get(int)
public long removeLong(int i)
removeLong
in interface LongList
removeLong
in class AbstractLongList
public boolean contains(long k)
contains
in interface LongCollection
contains
in class AbstractLongList
public boolean addAll(LongList c)
AbstractLongList
addAll
in interface LongList
addAll
in class AbstractLongList
public boolean addAll(LongCollection c)
AbstractLongList
addAll
in interface LongCollection
addAll
in class AbstractLongList
public boolean addAll(int i, LongList c)
AbstractLongList
addAll
in interface LongList
addAll
in class AbstractLongList
public boolean addAll(int i, LongCollection c)
AbstractLongList
addAll
in interface LongList
addAll
in class AbstractLongList
public boolean removeAll(LongCollection c)
AbstractLongCollection
removeAll
in interface LongCollection
removeAll
in class AbstractLongCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.public boolean retainAll(LongCollection c)
AbstractLongCollection
retainAll
in interface LongCollection
retainAll
in class AbstractLongCollection
c
- 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 List
addAll
in class AbstractLongList
public boolean addAll(int i, List c)
public boolean addAll(int i, Collection c)
addAll
in interface List
addAll
in class AbstractLongList
public boolean removeAll(Collection c)
AbstractLongCollection
removeAll
in interface List
removeAll
in class AbstractLongCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractLongCollection
retainAll
in interface List
retainAll
in class AbstractLongCollection
c
- a collection.
true
if this collection changed as a result of the call.public long[] toLongArray()
LongCollection
toLongArray
in interface LongCollection
toLongArray
in class AbstractLongCollection
public LongListIterator longListIterator()
AbstractLongList
longListIterator
in interface LongList
longListIterator
in class AbstractLongList
public LongListIterator longListIterator(int i)
LongList
The 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 LongList
longListIterator
in class AbstractLongList
public LongList longSubList(int from, int to)
longSubList
in interface LongList
longSubList
in class AbstractLongList
public int size()
size
in interface List
public void size(int size)
LongList
If 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 LongList
size
in class AbstractLongList
public void clear()
clear
in interface List
clear
in class AbstractLongCollection
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |