public static class AbstractCharBigList.CharSubList extends AbstractCharBigList implements java.io.Serializable
AbstractCharBigList.CharRandomAccessSubList, AbstractCharBigList.CharSubList
Constructor and Description |
---|
CharSubList(CharBigList l,
long from,
long to) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(char k)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
char k)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(long index,
CharBigList l)
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 |
addElements(long index,
char[][] a,
long offset,
long length)
Add (hopefully quickly) elements to this type-specific big list.
|
char |
getChar(long index)
Returns the element at the specified position.
|
void |
getElements(long from,
char[][] a,
long offset,
long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.
|
IntSpliterator |
intSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
CharBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(char k)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
|
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.
|
char |
set(long index,
char 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.
|
CharSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
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. |
add, addAll, addAll, addElements, clear, compareTo, contains, equals, forEach, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekChar, pop, popChar, push, push, remove, set, setElements, size, size, top, topChar, toString
add, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toCharArray, toCharArray
addAll, addAll, addAll, setElements, setElements
add, contains, containsAll, intIterator, intParallelStream, intStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toCharArray, toCharArray
containsAll, isEmpty, removeAll, retainAll, toArray, toArray
forEach, forEach
public CharSubList(CharBigList l, long from, long to)
public boolean add(char k)
AbstractCharBigList
add
in interface CharCollection
add
in class AbstractCharBigList
Collection.add(Object)
public void add(long index, char k)
AbstractCharBigList
add
in interface CharBigList
add
in class AbstractCharBigList
BigList.add(long,Object)
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 char getChar(long index)
CharBigList
getChar
in interface CharBigList
BigList.get(long)
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 long size64()
Size64
public void getElements(long from, char[][] a, long offset, long length)
AbstractCharBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface CharBigList
getElements
in class AbstractCharBigList
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)
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).public void addElements(long index, char[][] a, long offset, long length)
AbstractCharBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface CharBigList
addElements
in class AbstractCharBigList
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 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 CharSpliterator spliterator()
CharBigList
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 CharBigList
spliterator
in interface CharCollection
spliterator
in interface CharIterable
spliterator
in interface java.lang.Iterable<java.lang.Character>
spliterator
in interface java.util.Collection<java.lang.Character>
public IntSpliterator intSpliterator()
CharCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int
, long
, and double
.
WARNING: This is not the same as converting the source to a sequence
of code points. This returned instance literally performs (int)(charValue)
casts.
Surrogate pairs will be left as separate elements instead of combined into a single element
with the code point it represents. See Character
for more discussion on code points,
char values, and surrogate pairs.
intSpliterator
in interface CharCollection
intSpliterator
in interface CharIterable
intSpliterator
in class AbstractCharBigList
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 rem(char k)
AbstractCharBigList
rem
in interface CharCollection
rem
in class AbstractCharBigList
Collection.remove(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(long index, CharBigList l)
CharBigList
addAll
in interface CharBigList
BigList.addAll(long,Collection)