|
||||||||||
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.AbstractLongList.LongSubList
Nested Class Summary |
Nested classes inherited from class it.unimi.dsi.fastutil.longs.AbstractLongList |
AbstractLongList.LongSubList |
Constructor Summary | |
AbstractLongList.LongSubList(LongList l,
int from,
int to)
|
Method Summary | |
void |
add(int index,
long k)
|
boolean |
add(long k)
|
boolean |
addAll(int index,
Collection c)
|
boolean |
addAll(int index,
LongCollection c)
Delegates to a more generic method. |
boolean |
addAll(int index,
LongList l)
Delegates to a more generic method. |
void |
addElements(int index,
long[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one. |
void |
clear()
|
void |
getElements(int from,
long[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one. |
long |
getLong(int index)
|
LongListIterator |
longListIterator(int index)
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. |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one. |
long |
removeLong(int index)
|
long |
set(int index,
long k)
|
int |
size()
|
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongList |
add, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, longIterator, longListIterator, peek, peekLong, pop, popLong, push, push, remove, set, size, subList, top, topLong, toString |
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toLongArray, 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, removeAll, retainAll, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection |
containsAll, removeAll, retainAll, toArray, toLongArray, toLongArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
Constructor Detail |
public AbstractLongList.LongSubList(LongList l, int from, int to)
Method Detail |
public boolean add(long k)
add
in interface LongCollection
add
in class AbstractLongList
public void add(int index, long k)
add
in interface LongList
add
in class AbstractLongList
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in class AbstractLongList
public boolean addAll(int index, LongCollection c)
AbstractLongList
addAll
in interface LongList
addAll
in class AbstractLongList
public boolean addAll(int index, LongList l)
AbstractLongList
addAll
in interface LongList
addAll
in class AbstractLongList
public long getLong(int index)
getLong
in interface LongList
List.get(int)
public long removeLong(int index)
removeLong
in interface LongList
removeLong
in class AbstractLongList
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 long set(int index, long k)
set
in interface LongList
set
in class AbstractLongList
public void clear()
clear
in interface List
clear
in class AbstractLongCollection
public int size()
size
in interface List
public void getElements(int from, long[] a, int offset, int length)
AbstractLongList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface LongList
getElements
in class AbstractLongList
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)
AbstractLongList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface LongList
removeElements
in class AbstractLongList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, long[] a, int offset, int length)
AbstractLongList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface LongList
addElements
in class AbstractLongList
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 LongListIterator longListIterator(int index)
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |