|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectBigList<K>
it.unimi.dsi.fastutil.objects.AbstractObjectBigList.ObjectSubList<K>
public static class AbstractObjectBigList.ObjectSubList<K>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectBigList |
---|
AbstractObjectBigList.ObjectSubList<K> |
Field Summary | |
---|---|
protected long |
from
Initial (inclusive) index of this sublist. |
protected ObjectBigList<K> |
l
The list this sublist restricts. |
static long |
serialVersionUID
|
protected long |
to
Final (exclusive) index of this sublist. |
Constructor Summary | |
---|---|
AbstractObjectBigList.ObjectSubList(ObjectBigList<K> l,
long from,
long to)
|
Method Summary | |
---|---|
boolean |
add(K k)
|
void |
add(long index,
K k)
Inserts the specified element at the specified position in this big list (optional operation). |
boolean |
addAll(long index,
Collection<? extends K> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation). |
void |
addElements(long index,
K[][] a,
long offset,
long length)
Adds elements to this type-specific big list one-by-one. |
void |
clear()
|
K |
get(long index)
Returns the element at the specified position. |
void |
getElements(long from,
Object[][] a,
long offset,
long length)
Copies element of this type-specific big list into the given big array one-by-one. |
ObjectBigListIterator<K> |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index. |
K |
remove(long index)
Removes the element at the specified position. |
boolean |
remove(Object o)
|
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one. |
K |
set(long index,
K k)
Replaces the element at the specified position in this big list with the specified element (optional operation). |
long |
size64()
Returns the size of this data structure as a long. |
ObjectBigList<K> |
subList(long from,
long to)
Returns a type-specific view of the portion of this type-specific big list from the index from , inclusive, to the index to , exclusive. |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectBigList |
---|
addAll, addAll, addElements, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, peek, pop, push, remove, set, size, size, size, top, toString |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection |
---|
containsAll, isEmpty, objectIterator, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectCollection |
---|
objectIterator, toArray |
Methods inherited from interface java.util.Collection |
---|
containsAll, isEmpty, removeAll, retainAll, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
---|
isEmpty |
Field Detail |
---|
public static final long serialVersionUID
protected final ObjectBigList<K> l
protected final long from
protected long to
Constructor Detail |
---|
public AbstractObjectBigList.ObjectSubList(ObjectBigList<K> l, long from, long to)
Method Detail |
---|
public boolean add(K k)
add
in interface Collection<K>
add
in class AbstractObjectBigList<K>
public void add(long index, K k)
BigList
add
in interface BigList<K>
add
in class AbstractObjectBigList<K>
index
- a position in the big list.k
- an element to be inserted.List.add(int,Object)
public boolean addAll(long index, Collection<? extends K> c)
BigList
addAll
in interface BigList<K>
addAll
in class AbstractObjectBigList<K>
index
- index at which to insert the first element from the specified collection.c
- collection containing elements to be added to this big list.
true
if this big list changed as a result of the callList.addAll(int, Collection)
public K get(long index)
BigList
get
in interface BigList<K>
index
- a position in the big list.
List.get(int)
public K remove(long index)
BigList
remove
in interface BigList<K>
remove
in class AbstractObjectBigList<K>
index
- a position in the big list.
List.remove(int)
public K set(long index, K k)
BigList
set
in interface BigList<K>
set
in class AbstractObjectBigList<K>
index
- a position in the big list.k
- the element to be stored at the specified position.
List.set(int,Object)
public void clear()
clear
in interface Collection<K>
clear
in class AbstractCollection<K>
public long size64()
Size64
size64
in interface Size64
public void getElements(long from, Object[][] a, long offset, long length)
AbstractObjectBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface ObjectBigList<K>
getElements
in class AbstractObjectBigList<K>
from
- the start index (inclusive).a
- the destination big array.offset
- the offset into the destination big array where to store the first element copied.length
- the number of elements to be copied.public void removeElements(long from, long to)
AbstractObjectBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface ObjectBigList<K>
removeElements
in class AbstractObjectBigList<K>
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(long index, K[][] a, long offset, long length)
AbstractObjectBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface ObjectBigList<K>
addElements
in class AbstractObjectBigList<K>
index
- the index at which to add elements.a
- the big array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.public ObjectBigListIterator<K> listIterator(long index)
ObjectBigList
listIterator
in interface BigList<K>
listIterator
in interface ObjectBigList<K>
listIterator
in class AbstractObjectBigList<K>
index
- index of first element to be returned from the big-list iterator.
BigList.listIterator(long)
public ObjectBigList<K> subList(long from, long to)
ObjectBigList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long)
.
subList
in interface BigList<K>
subList
in interface ObjectBigList<K>
subList
in class AbstractObjectBigList<K>
from
- the starting element (inclusive).to
- the ending element (exclusive).
BigList.subList(long,long)
public boolean remove(Object o)
remove
in interface Collection<K>
remove
in class AbstractCollection<K>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |