public static class CharBigLists.ListBigList extends AbstractCharBigList implements java.io.Serializable
AbstractCharBigList.CharRandomAccessSubList, AbstractCharBigList.CharSubList
Modifier and Type | Method and Description |
---|---|
boolean |
add(char key)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
char key)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(CharBigList 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(CharCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(java.util.Collection<? extends java.lang.Character> c) |
boolean |
addAll(long index,
CharBigList 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,
CharCollection c)
Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
java.util.Collection<? extends java.lang.Character> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
void |
clear() |
boolean |
contains(char key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(CharCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c) |
char |
getChar(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(char 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.
|
CharBigListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(char 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.
|
CharBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
CharBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
removeAll(CharCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
char |
removeChar(long index)
Removes the element at the specified position.
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
boolean |
retainAll(CharCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(java.util.Collection<?> c) |
char |
set(long index,
char 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.
|
CharBigList |
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) |
char[] |
toCharArray()
Returns a primitive type array containing the items of this collection.
|
char[] |
toCharArray(char[] a)
Deprecated.
|
add, addElements, addElements, compareTo, equals, forEach, get, getElements, indexOf, intSpliterator, lastIndexOf, peek, peekChar, pop, popChar, push, push, rem, remove, set, setElements, size, top, topChar, toString
add, contains, remove, toArray
addAll, addAll, setElements, setElements, spliterator
add, contains, intIterator, intParallelStream, intStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray
forEach, forEach
public long size64()
Size64
public void size(long size)
BigList
If 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<java.lang.Character>
size
in class AbstractCharBigList
size
- the new size.public CharBigListIterator iterator()
AbstractCharBigList
iterator
in interface CharBigList
iterator
in interface CharCollection
iterator
in interface CharIterable
iterator
in interface java.lang.Iterable<java.lang.Character>
iterator
in interface java.util.Collection<java.lang.Character>
iterator
in class AbstractCharBigList
Iterable.iterator()
public CharBigListIterator listIterator()
AbstractCharBigList
listIterator
in interface BigList<java.lang.Character>
listIterator
in interface CharBigList
listIterator
in class AbstractCharBigList
BigList.listIterator()
public CharBigListIterator listIterator(long index)
AbstractCharBigList
listIterator
in interface BigList<java.lang.Character>
listIterator
in interface CharBigList
listIterator
in class AbstractCharBigList
index
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public boolean addAll(long index, java.util.Collection<? extends java.lang.Character> c)
AbstractCharBigList
addAll
in interface BigList<java.lang.Character>
addAll
in class AbstractCharBigList
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 CharBigList subList(long from, long to)
CharBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Character>
subList
in interface CharBigList
subList
in class AbstractCharBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean contains(char key)
AbstractCharBigList
contains
in interface CharCollection
contains
in class AbstractCharBigList
Collection.contains(Object)
public char[] toCharArray()
CharCollection
toCharArray
in interface CharCollection
toCharArray
in class AbstractCharCollection
Collection.toArray()
public void removeElements(long from, long to)
AbstractCharBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface CharBigList
removeElements
in class AbstractCharBigList
from
- the start index (inclusive).to
- the end index (exclusive).@Deprecated public char[] toCharArray(char[] a)
AbstractCharCollection
Note 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.
toCharArray
in interface CharCollection
toCharArray
in class AbstractCharCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public boolean addAll(long index, CharCollection c)
AbstractCharBigList
addAll
in interface CharBigList
addAll
in class AbstractCharBigList
List.addAll(int,java.util.Collection)
public boolean addAll(CharCollection c)
AbstractCharBigList
addAll
in interface CharCollection
addAll
in class AbstractCharBigList
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean addAll(long index, CharBigList c)
CharBigList
addAll
in interface CharBigList
BigList.addAll(long,Collection)
public boolean addAll(CharBigList c)
CharBigList
addAll
in interface CharBigList
Collection.addAll(Collection)
public boolean containsAll(CharCollection c)
CharCollection
containsAll
in interface CharCollection
containsAll
in class AbstractCharCollection
c
- a type-specific collection.true
if this collection contains all elements of the argument.Collection.containsAll(Collection)
public boolean removeAll(CharCollection c)
CharCollection
removeAll
in interface CharCollection
removeAll
in class AbstractCharCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(CharCollection c)
CharCollection
retainAll
in interface CharCollection
retainAll
in class AbstractCharCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.retainAll(Collection)
public void add(long index, char key)
AbstractCharBigList
add
in interface CharBigList
add
in class AbstractCharBigList
BigList.add(long,Object)
public boolean add(char key)
AbstractCharBigList
add
in interface CharCollection
add
in class AbstractCharBigList
Collection.add(Object)
public char getChar(long index)
CharBigList
getChar
in interface CharBigList
BigList.get(long)
public long indexOf(char k)
CharBigList
indexOf
in interface CharBigList
indexOf
in class AbstractCharBigList
BigList.indexOf(Object)
public long lastIndexOf(char k)
CharBigList
lastIndexOf
in interface CharBigList
lastIndexOf
in class AbstractCharBigList
BigList.lastIndexOf(Object)
public char removeChar(long index)
AbstractCharBigList
removeChar
in interface CharBigList
removeChar
in class AbstractCharBigList
BigList.remove(long)
public char set(long index, char k)
AbstractCharBigList
set
in interface CharBigList
set
in class AbstractCharBigList
BigList.set(long,Object)
public boolean isEmpty()
Stack
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Character>
toArray
in class java.util.AbstractCollection<java.lang.Character>
public boolean containsAll(java.util.Collection<?> c)
AbstractCharCollection
containsAll
in interface java.util.Collection<java.lang.Character>
containsAll
in class AbstractCharCollection
public boolean addAll(java.util.Collection<? extends java.lang.Character> c)
AbstractCharBigList
addAll
in interface java.util.Collection<java.lang.Character>
addAll
in class AbstractCharBigList
public boolean removeAll(java.util.Collection<?> c)
AbstractCharCollection
removeAll
in interface java.util.Collection<java.lang.Character>
removeAll
in class AbstractCharCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractCharCollection
retainAll
in interface java.util.Collection<java.lang.Character>
retainAll
in class AbstractCharCollection
public void clear()
AbstractCharBigList
clear
in interface java.util.Collection<java.lang.Character>
clear
in class AbstractCharBigList
public int hashCode()
AbstractCharBigList
List.hashCode()
.hashCode
in interface java.util.Collection<java.lang.Character>
hashCode
in class AbstractCharBigList