public static class LongBigLists.Singleton extends AbstractLongBigList implements java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific big list.
AbstractLongBigList.LongRandomAccessSubList, AbstractLongBigList.LongSubList
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(java.util.Collection<? extends java.lang.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 i,
java.util.Collection<? extends java.lang.Long> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
boolean |
addAll(long i,
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 i,
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() |
java.lang.Object |
clone() |
boolean |
contains(long k)
Returns true if this list contains the specified element.
|
long |
getLong(long i)
Returns the element at the specified position.
|
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.
|
LongBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
LongBigListIterator |
listIterator(long i)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(long k)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(LongCollection c)
Remove from this collection all elements in the given type-specific collection.
|
long |
removeLong(long i)
Removes the element at the specified position.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(LongCollection c)
Retains in this collection only elements from the given type-specific collection.
|
long |
size64()
Returns the size of this data structure as a long.
|
LongSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
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. |
long[] |
toLongArray()
Returns a primitive type array containing the items of this collection.
|
add, add, add, addElements, addElements, compareTo, equals, forEach, get, getElements, hashCode, indexOf, iterator, lastIndexOf, lastIndexOf, peek, peekLong, pop, popLong, push, push, remove, removeElements, set, set, setElements, size, size, top, topLong, toString
add, contains, containsAll, containsAll, forEach, remove, removeIf, toArray, toLongArray
addAll, addAll, setElements, setElements
add, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray, toLongArray
forEach, forEach
public long getLong(long i)
LongBigList
getLong
in interface LongBigList
BigList.get(long)
public boolean rem(long k)
AbstractLongBigList
rem
in interface LongCollection
rem
in class AbstractLongBigList
Collection.remove(Object)
public long removeLong(long i)
AbstractLongBigList
removeLong
in interface LongBigList
removeLong
in class AbstractLongBigList
BigList.remove(long)
public boolean contains(long k)
AbstractLongBigList
contains
in interface LongCollection
contains
in class AbstractLongBigList
Collection.contains(Object)
public long indexOf(long k)
LongBigList
indexOf
in interface LongBigList
indexOf
in class AbstractLongBigList
BigList.indexOf(Object)
public long[] toLongArray()
LongCollection
toLongArray
in interface LongCollection
toLongArray
in class AbstractLongCollection
Collection.toArray()
public LongBigListIterator listIterator()
AbstractLongBigList
listIterator
in interface BigList<java.lang.Long>
listIterator
in interface LongBigList
listIterator
in class AbstractLongBigList
BigList.listIterator()
public LongBigListIterator listIterator(long i)
AbstractLongBigList
listIterator
in interface BigList<java.lang.Long>
listIterator
in interface LongBigList
listIterator
in class AbstractLongBigList
i
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public LongSpliterator spliterator()
LongBigList
BigList 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 LongBigList
spliterator
in interface LongCollection
spliterator
in interface LongIterable
spliterator
in interface java.lang.Iterable<java.lang.Long>
spliterator
in interface java.util.Collection<java.lang.Long>
public LongBigList subList(long from, long to)
LongBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Long>
subList
in interface LongBigList
subList
in class AbstractLongBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean addAll(long i, java.util.Collection<? extends java.lang.Long> c)
AbstractLongBigList
addAll
in interface BigList<java.lang.Long>
addAll
in class AbstractLongBigList
i
- 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 boolean addAll(java.util.Collection<? extends java.lang.Long> c)
AbstractLongBigList
addAll
in interface java.util.Collection<java.lang.Long>
addAll
in class AbstractLongBigList
public boolean removeAll(java.util.Collection<?> c)
AbstractLongCollection
removeAll
in interface java.util.Collection<java.lang.Long>
removeAll
in class AbstractLongCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractLongCollection
retainAll
in interface java.util.Collection<java.lang.Long>
retainAll
in class AbstractLongCollection
public boolean addAll(LongBigList c)
LongBigList
addAll
in interface LongBigList
Collection.addAll(Collection)
public boolean addAll(long i, LongBigList c)
LongBigList
addAll
in interface LongBigList
BigList.addAll(long,Collection)
public boolean addAll(long i, LongCollection c)
AbstractLongBigList
addAll
in interface LongBigList
addAll
in class AbstractLongBigList
List.addAll(int,java.util.Collection)
public boolean addAll(LongCollection c)
AbstractLongBigList
addAll
in interface LongCollection
addAll
in class AbstractLongBigList
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean removeAll(LongCollection c)
LongCollection
removeAll
in interface LongCollection
removeAll
in class AbstractLongCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(LongCollection c)
LongCollection
retainAll
in interface LongCollection
retainAll
in class AbstractLongCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.retainAll(Collection)
public void clear()
AbstractLongBigList
clear
in interface java.util.Collection<java.lang.Long>
clear
in class AbstractLongBigList
public long size64()
Size64
public java.lang.Object clone()
clone
in class java.lang.Object