public static class LongBigLists.ListBigList extends AbstractLongBigList implements Serializable
AbstractLongBigList.LongSubList| Modifier | Constructor and Description |
|---|---|
protected |
ListBigList(LongList list) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long key)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
long key)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(Collection<? extends Long> c) |
boolean |
addAll(LongBigList c)
Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
|
boolean |
addAll(LongCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(long index,
Collection<? extends Long> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
boolean |
addAll(long index,
LongBigList c)
Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
LongCollection c)
Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
|
void |
clear() |
boolean |
contains(long key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(LongCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
long |
getLong(long index)
Returns the element at the specified position.
|
int |
hashCode()
Returns the hash code for this big list, which is identical to
List.hashCode(). |
long |
indexOf(long k)
Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
|
boolean |
isEmpty()
Checks whether the stack is empty.
|
LongBigListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(long k)
Returns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
|
LongBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
LongBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
removeAll(Collection<?> c) |
boolean |
removeAll(LongCollection c)
Remove from this collection all elements in the given type-specific collection.
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
long |
removeLong(long index)
Removes the element at the specified position.
|
boolean |
retainAll(Collection<?> c) |
boolean |
retainAll(LongCollection c)
Retains in this collection only elements from the given type-specific collection.
|
long |
set(long index,
long k)
Replaces the element at the specified position in this big list with the specified element (optional operation).
|
void |
size(long size)
Sets the size of this big list.
|
long |
size64()
Returns the size of this data structure as a long.
|
LongBigList |
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. |
<T> T[] |
toArray(T[] a) |
long[] |
toLongArray()
Returns a primitive type array containing the items of this collection.
|
long[] |
toLongArray(long[] a)
Deprecated.
|
add, addElements, addElements, compareTo, ensureIndex, ensureRestrictedIndex, equals, get, getElements, indexOf, lastIndexOf, peek, peekLong, pop, popLong, push, push, rem, remove, set, size, top, topLong, toStringadd, contains, remove, toArraytoArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, contains, remove, removeIf, removeIf, toArrayparallelStream, spliterator, stream, toArrayforEach, forEachprotected ListBigList(LongList list)
public long size64()
Size64public void size(long size)
BigListIf 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 BigList<Long>size in class AbstractLongBigListsize - the new size.public LongBigListIterator iterator()
AbstractLongBigListNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
This implementation delegates to AbstractLongBigList.listIterator().
iterator in interface LongBigListiterator in interface LongCollectioniterator in interface LongIterableiterator in interface Iterable<Long>iterator in interface Collection<Long>iterator in class AbstractLongBigListIterable.iterator()public LongBigListIterator listIterator()
AbstractLongBigListNote that this specification strengthens the one given in BigList.listIterator().
This implementation delegates to listIterator(0).
listIterator in interface BigList<Long>listIterator in interface LongBigListlistIterator in class AbstractLongBigListBigList.listIterator()public LongBigListIterator listIterator(long index)
AbstractLongBigListNote that this specification strengthens the one given in BigList.listIterator(long).
This implementation is based on the random-access methods.
listIterator in interface BigList<Long>listIterator in interface LongBigListlistIterator in class AbstractLongBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public boolean addAll(long index,
Collection<? extends Long> c)
AbstractLongBigListaddAll in interface BigList<Long>addAll in class AbstractLongBigListindex - 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 LongBigList subList(long from, long to)
LongBigListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long).
subList in interface BigList<Long>subList in interface LongBigListsubList in class AbstractLongBigListfrom - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean contains(long key)
AbstractLongBigListThis implementation delegates to indexOf().
contains in interface LongCollectioncontains in class AbstractLongBigListCollection.contains(Object)public long[] toLongArray()
LongCollectiontoLongArray in interface LongCollectiontoLongArray in class AbstractLongCollectionCollection.toArray()public void removeElements(long from,
long to)
AbstractLongBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface LongBigListremoveElements in class AbstractLongBigListfrom - the start index (inclusive).to - the end index (exclusive).@Deprecated public long[] toLongArray(long[] a)
AbstractLongCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toLongArray in interface LongCollectiontoLongArray in class AbstractLongCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean addAll(long index,
LongCollection c)
AbstractLongBigListThis implementation delegates to the type-specific version of AbstractLongBigList.addAll(long, Collection).
addAll in interface LongBigListaddAll in class AbstractLongBigListList.addAll(int,java.util.Collection)public boolean addAll(LongCollection c)
AbstractLongBigListThis implementation delegates to the type-specific version of AbstractLongBigList.addAll(long, Collection).
addAll in interface LongCollectionaddAll in class AbstractLongBigListc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(long index,
LongBigList c)
AbstractLongBigListThis implementation delegates to the type-specific version of AbstractLongBigList.addAll(long, Collection).
addAll in interface LongBigListaddAll in class AbstractLongBigListList.addAll(int,java.util.Collection)public boolean addAll(LongBigList c)
AbstractLongBigListThis implementation delegates to the type-specific list version of AbstractLongBigList.addAll(long, Collection).
addAll in interface LongBigListaddAll in class AbstractLongBigListList.addAll(int,java.util.Collection)public boolean containsAll(LongCollection c)
LongCollectioncontainsAll in interface LongCollectioncontainsAll in class AbstractLongCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean removeAll(LongCollection c)
LongCollectionremoveAll in interface LongCollectionremoveAll in class AbstractLongCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(LongCollection c)
LongCollectionretainAll in interface LongCollectionretainAll in class AbstractLongCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public void add(long index,
long key)
AbstractLongBigListThis implementation always throws an UnsupportedOperationException.
add in interface LongBigListadd in class AbstractLongBigListBigList.add(long,Object)public boolean add(long key)
AbstractLongBigListThis implementation always throws an UnsupportedOperationException.
This implementation delegates to the type-specific version of BigList.add(long, Object).
add in interface LongCollectionadd in class AbstractLongBigListCollection.add(Object)public long getLong(long index)
LongBigListgetLong in interface LongBigListBigList.get(long)public long indexOf(long k)
LongBigListindexOf in interface LongBigListindexOf in class AbstractLongBigListBigList.indexOf(Object)public long lastIndexOf(long k)
LongBigListlastIndexOf in interface LongBigListlastIndexOf in class AbstractLongBigListBigList.lastIndexOf(Object)public long removeLong(long index)
AbstractLongBigListThis implementation always throws an UnsupportedOperationException.
removeLong in interface LongBigListremoveLong in class AbstractLongBigListBigList.remove(long)public long set(long index,
long k)
AbstractLongBigListThis implementation always throws an UnsupportedOperationException.
set in interface LongBigListset in class AbstractLongBigListBigList.set(long,Object)public boolean isEmpty()
StackisEmpty in interface Stack<Long>isEmpty in interface Collection<Long>isEmpty in class AbstractCollection<Long>public <T> T[] toArray(T[] a)
toArray in interface Collection<Long>toArray in class AbstractCollection<Long>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Long>containsAll in class AbstractCollection<Long>public boolean addAll(Collection<? extends Long> c)
AbstractLongBigListThis implementation delegates to the type-specific version of BigList.addAll(long, Collection).
addAll in interface Collection<Long>addAll in class AbstractLongBigListpublic boolean removeAll(Collection<?> c)
removeAll in interface Collection<Long>removeAll in class AbstractCollection<Long>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Long>retainAll in class AbstractCollection<Long>public void clear()
AbstractLongBigListThis implementation delegates to AbstractLongBigList.removeElements(long, long).
clear in interface Collection<Long>clear in class AbstractLongBigListpublic int hashCode()
AbstractLongBigListList.hashCode().hashCode in interface Collection<Long>hashCode in class AbstractLongBigListCopyright © 2020. All rights reserved.