|
|||||||||
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.LongCollections.EmptyCollection
it.unimi.dsi.fastutil.longs.LongLists.EmptyList
public static class LongLists.EmptyList
An immutable class representing an empty type-specific 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 index,
long k)
|
void |
add(int index,
Long k)
|
boolean |
add(long k)
|
boolean |
add(Long k)
Delegates to the corresponding type-specific method. |
boolean |
addAll(Collection<? extends Long> c)
Adds all elements of the given collection to this collection. |
boolean |
addAll(int i,
Collection<? extends Long> c)
|
boolean |
addAll(int i,
LongCollection c)
|
boolean |
addAll(int i,
LongList c)
|
boolean |
addAll(LongCollection c)
Adds all elements of the given type-specific collection to this collection. |
boolean |
addAll(LongList c)
|
void |
addElements(int index,
long[] a)
Add (hopefully quickly) elements to this type-specific list. |
void |
addElements(int index,
long[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list. |
Object |
clone()
|
int |
compareTo(List<? extends Long> o)
|
Long |
get(int i)
|
void |
getElements(int from,
long[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the given array. |
long |
getLong(int i)
|
int |
indexOf(long k)
|
int |
indexOf(Object k)
|
int |
lastIndexOf(long k)
|
int |
lastIndexOf(Object k)
|
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. |
LongIterator |
longIterator()
Deprecated. |
LongListIterator |
longListIterator()
Deprecated. |
LongListIterator |
longListIterator(int i)
Deprecated. |
LongList |
longSubList(int from,
int to)
Deprecated. |
Long |
remove(int k)
|
boolean |
removeAll(Collection<?> c)
Remove from this collection all elements in the given collection. |
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list. |
long |
removeLong(int i)
|
long |
set(int index,
long k)
|
Long |
set(int index,
Long k)
|
void |
size(int s)
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. |
Methods inherited from class it.unimi.dsi.fastutil.longs.LongCollections.EmptyCollection |
---|
clear, contains, containsAll, equals, hashCode, iterator, rem, removeAll, retainAll, size, toArray, toLongArray, toLongArray |
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection |
---|
contains, containsAll, isEmpty, rem, remove, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongList |
---|
iterator |
Methods inherited from interface java.util.List |
---|
clear, contains, containsAll, equals, hashCode, isEmpty, remove, retainAll, size, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection |
---|
contains, containsAll, rem, removeAll, retainAll, toArray, toArray, toLongArray, toLongArray |
Field Detail |
---|
public static final long serialVersionUID
Method Detail |
---|
public void add(int index, long k)
add
in interface LongList
List.add(int,Object)
public boolean add(long k)
add
in interface LongCollection
add
in class LongCollections.EmptyCollection
Collection.add(Object)
public long removeLong(int i)
removeLong
in interface LongList
List.remove(int)
public long set(int index, long k)
set
in interface LongList
List.set(int,Object)
public int indexOf(long k)
indexOf
in interface LongList
List.indexOf(Object)
public int lastIndexOf(long k)
lastIndexOf
in interface LongList
List.lastIndexOf(Object)
public boolean addAll(Collection<? extends Long> c)
AbstractLongCollection
addAll
in interface Collection<Long>
addAll
in interface List<Long>
addAll
in class AbstractLongCollection
c
- 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>
public boolean removeAll(Collection<?> c)
AbstractLongCollection
removeAll
in interface Collection<Long>
removeAll
in interface List<Long>
removeAll
in class AbstractLongCollection
c
- a collection.
true
if this collection changed as a result of the call.public Long get(int i)
get
in interface List<Long>
public boolean addAll(LongCollection c)
AbstractLongCollection
addAll
in interface LongCollection
addAll
in class LongCollections.EmptyCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean addAll(LongList c)
addAll
in interface LongList
List.add(int,Object)
public boolean addAll(int i, LongCollection c)
addAll
in interface LongList
List.add(int,Object)
public boolean addAll(int i, LongList c)
addAll
in interface LongList
List.add(int,Object)
public void add(int index, Long k)
add
in interface List<Long>
public boolean add(Long k)
AbstractLongCollection
add
in interface Collection<Long>
add
in interface List<Long>
add
in class AbstractLongCollection
public Long set(int index, Long k)
set
in interface List<Long>
public long getLong(int i)
getLong
in interface LongList
List.get(int)
public Long remove(int k)
remove
in interface List<Long>
public int indexOf(Object k)
indexOf
in interface List<Long>
public int lastIndexOf(Object k)
lastIndexOf
in interface List<Long>
@Deprecated public LongIterator longIterator()
AbstractLongCollection
longIterator
in interface LongCollection
longIterator
in class AbstractLongCollection
LongCollection.iterator()
public LongListIterator listIterator()
LongList
listIterator
in interface LongList
listIterator
in interface List<Long>
LongList.listIterator()
public LongListIterator listIterator(int i)
LongList
listIterator
in interface LongList
listIterator
in interface List<Long>
LongList.listIterator(int)
@Deprecated public LongListIterator longListIterator()
LongList
longListIterator
in interface LongList
LongList.listIterator()
@Deprecated public LongListIterator longListIterator(int i)
LongList
longListIterator
in interface LongList
LongList.listIterator(int)
public LongList subList(int from, int to)
LongList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in List.subList(int,int)
.
subList
in interface LongList
subList
in interface List<Long>
List.subList(int,int)
@Deprecated public LongList longSubList(int from, int to)
LongList
from
, inclusive, to the index to
, exclusive.
longSubList
in interface LongList
List.subList(int,int)
public void getElements(int from, long[] a, int offset, int length)
LongList
getElements
in interface LongList
from
- 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)
LongList
removeElements
in interface LongList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, long[] a, int offset, int length)
LongList
addElements
in interface LongList
index
- 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 void addElements(int index, long[] a)
LongList
addElements
in interface LongList
index
- the index at which to add elements.a
- the array containing the elements.public void size(int s)
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
s
- the new size.public int compareTo(List<? extends Long> o)
compareTo
in interface Comparable<List<? extends Long>>
public Object clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |