public static class AbstractObjectBigList.ObjectSubList<K> extends AbstractObjectBigList<K> implements java.io.Serializable
AbstractObjectBigList.ObjectRandomAccessSubList<K>, AbstractObjectBigList.ObjectSubList<K>| Modifier and Type | Field and Description |
|---|---|
protected long |
from
Initial (inclusive) index of this sublist.
|
protected ObjectBigList<K> |
l
The list this sublist restricts.
|
protected long |
to
Final (exclusive) index of this sublist.
|
| Constructor and Description |
|---|
ObjectSubList(ObjectBigList<K> l,
long from,
long to) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(K k) |
void |
add(long index,
K k) |
boolean |
addAll(long index,
java.util.Collection<? extends K> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
void |
addElements(long index,
K[][] a,
long offset,
long length)
Add (hopefully quickly) elements to this type-specific big list.
|
K |
get(long index) |
void |
getElements(long from,
java.lang.Object[][] a,
long offset,
long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.
|
it.unimi.dsi.fastutil.objects.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) |
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
K |
set(long index,
K k) |
long |
size64() |
it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
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. |
addAll, addElements, clear, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, forEach, hashCode, indexOf, iterator, lastIndexOf, listIterator, peek, pop, push, setElements, size, size, top, toStringcontainsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addAll, addAll, addAll, getElements, setElements, setElementsprotected final ObjectBigList<K> l
protected final long from
protected long to
public ObjectSubList(ObjectBigList<K> l, long from, long to)
public boolean add(K k)
AbstractObjectBigListadd in interface java.util.Collection<K>add in class AbstractObjectBigList<K>public void add(long index,
K k)
AbstractObjectBigListadd in interface it.unimi.dsi.fastutil.BigList<K>add in class AbstractObjectBigList<K>public boolean addAll(long index,
java.util.Collection<? extends K> c)
AbstractObjectBigListaddAll in interface it.unimi.dsi.fastutil.BigList<K>addAll in class AbstractObjectBigList<K>public K remove(long index)
AbstractObjectBigListremove in interface it.unimi.dsi.fastutil.BigList<K>remove in class AbstractObjectBigList<K>public K set(long index, K k)
AbstractObjectBigListset in interface it.unimi.dsi.fastutil.BigList<K>set in class AbstractObjectBigList<K>public long size64()
size64 in interface it.unimi.dsi.fastutil.Size64public void getElements(long from,
java.lang.Object[][] a,
long offset,
long length)
AbstractObjectBigListThis 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)
AbstractObjectBigListThis 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)
AbstractObjectBigListThis 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 it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> listIterator(long index)
AbstractObjectBigListlistIterator in interface it.unimi.dsi.fastutil.BigList<K>listIterator in interface ObjectBigList<K>listIterator in class AbstractObjectBigList<K>BigList.listIterator(long)public it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> spliterator()
ObjectBigListBigList spliterators must report at least Spliterator.SIZED and Spliterator.ORDERED.
See List.spliterator() for more documentation on the requirements
of the returned spliterator (despite BigList not being a List, most of the
same requirements apply.
spliterator in interface ObjectBigList<K>spliterator in interface it.unimi.dsi.fastutil.objects.ObjectCollection<K>spliterator in interface it.unimi.dsi.fastutil.objects.ObjectIterable<K>spliterator in interface java.lang.Iterable<K>spliterator in interface java.util.Collection<K>public ObjectBigList<K> subList(long from, long to)
ObjectBigListfrom, inclusive, to the index to, exclusive.subList in interface it.unimi.dsi.fastutil.BigList<K>subList in interface ObjectBigList<K>subList in class AbstractObjectBigList<K>BigList.subList(long,long)