Package it.unimi.dsi.fastutil.chars
Interface CharBigList
- All Superinterfaces:
it.unimi.dsi.fastutil.BigList<Character>,it.unimi.dsi.fastutil.chars.CharCollection,it.unimi.dsi.fastutil.chars.CharIterable,Collection<Character>,Comparable<it.unimi.dsi.fastutil.BigList<? extends Character>>,Iterable<Character>,it.unimi.dsi.fastutil.Size64
- All Known Implementing Classes:
AbstractCharBigList,AbstractCharBigList.CharRandomAccessSubList,AbstractCharBigList.CharSubList,CharBigArrayBigList,CharBigLists.EmptyBigList,CharBigLists.ListBigList,CharBigLists.Singleton,CharBigLists.SynchronizedBigList,CharBigLists.UnmodifiableBigList,CharMappedBigList
public interface CharBigList
extends it.unimi.dsi.fastutil.BigList<Character>, it.unimi.dsi.fastutil.chars.CharCollection, Comparable<it.unimi.dsi.fastutil.BigList<? extends Character>>
A type-specific
BigList; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens iterator(), listIterator(),
listIterator(long) and subList(long,long).
Besides polymorphic methods, this interfaces specifies methods to copy into an array or remove contiguous sublists. Although the abstract implementation of this interface provides simple, one-by-one implementations of these methods, it is expected that concrete implementation override them with optimized versions.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long index, char key) Inserts the specified element at the specified position in this type-specific big list (optional operation).voidDeprecated.Please use the corresponding type-specific method instead.default booleanaddAll(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).booleanaddAll(long index, it.unimi.dsi.fastutil.chars.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).default booleanaddAll(long index, it.unimi.dsi.fastutil.chars.CharList l) Inserts all of the elements in the specified type-specific list into this type-specific big list at the specified position (optional operation).default booleanAppends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).default booleanaddAll(it.unimi.dsi.fastutil.chars.CharList l) Appends all of the elements in the specified type-specific list to the end of this type-specific big list (optional operation).voidaddElements(long index, char[][] a) Add (hopefully quickly) elements to this type-specific big list.voidaddElements(long index, char[][] a, long offset, long length) Add (hopefully quickly) elements to this type-specific big list.get(long index) Deprecated.Please use the corresponding type-specific method instead.chargetChar(long index) Returns the element at the specified position.voidgetElements(long from, char[][] a, long offset, long length) Copies (hopefully quickly) elements of this type-specific big list into the given big array.default voidgetElements(long from, char[] a, int offset, int length) Copies (hopefully quickly) elements of this type-specific big list into the given array.longindexOf(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.longDeprecated.Please use the corresponding type-specific method instead.it.unimi.dsi.fastutil.chars.CharBigListIteratoriterator()Returns a type-specific iterator on the elements of this list.longlastIndexOf(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.longDeprecated.Please use the corresponding type-specific method instead.it.unimi.dsi.fastutil.chars.CharBigListIteratorReturns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.chars.CharBigListIteratorlistIterator(long index) Returns a type-specific list iterator on this type-specific big list starting at a given index.remove(long index) Deprecated.Please use the corresponding type-specific method instead.charremoveChar(long index) Removes the element at the specified position.voidremoveElements(long from, long to) Removes (hopefully quickly) elements of this type-specific big list.charset(long index, char k) Replaces the element at the specified position in this big list with the specified element (optional operation).Deprecated.Please use the corresponding type-specific method instead.default voidsetElements(char[][] a) Set (hopefully quickly) elements to match the array given.default voidsetElements(long index, char[][] a) Set (hopefully quickly) elements to match the array given.default voidsetElements(long index, char[][] a, long offset, long length) Set (hopefully quickly) elements to match the array given.default it.unimi.dsi.fastutil.chars.CharSpliteratorReturns a type-specific spliterator on the elements of this big-list.subList(long from, long to) Returns a type-specific view of the portion of this type-specific big list from the indexfrom, inclusive, to the indexto, exclusive.Methods inherited from interface it.unimi.dsi.fastutil.BigList
addAll, size, sizeMethods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection
add, add, addAll, contains, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, rem, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toCharArray, toCharArrayMethods inherited from interface it.unimi.dsi.fastutil.chars.CharIterable
forEach, forEach, forEachMethods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray, toArrayMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface it.unimi.dsi.fastutil.Size64
size64
-
Method Details
-
iterator
it.unimi.dsi.fastutil.chars.CharBigListIterator iterator()Returns a type-specific iterator on the elements of this list. -
listIterator
it.unimi.dsi.fastutil.chars.CharBigListIterator listIterator()Returns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Character>- See Also:
-
listIterator
it.unimi.dsi.fastutil.chars.CharBigListIterator listIterator(long index) Returns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Character>- See Also:
-
spliterator
default it.unimi.dsi.fastutil.chars.CharSpliterator spliterator()Returns a type-specific spliterator on the elements of this big-list.BigList spliterators must report at least
Spliterator.SIZEDandSpliterator.ORDERED.See
List.spliterator()for more documentation on the requirements of the returned spliterator (despiteBigListnot being aList, most of the same requirements apply.- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.chars.CharCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.chars.CharIterable- Specified by:
spliteratorin interfaceCollection<Character>- Specified by:
spliteratorin interfaceIterable<Character>- Returns:
- Since:
- 8.5.0
-
subList
Returns a type-specific view of the portion of this type-specific big list from the indexfrom, inclusive, to the indexto, exclusive.- Specified by:
subListin interfaceit.unimi.dsi.fastutil.BigList<Character>- See Also:
-
getElements
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.- Parameters:
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.
-
getElements
default void getElements(long from, char[] a, int offset, int length) Copies (hopefully quickly) elements of this type-specific big list into the given array.- Parameters:
from- the start index (inclusive).a- the destination array.offset- the offset into the destination array where to store the first element copied.length- the number of elements to be copied.
-
removeElements
void removeElements(long from, long to) Removes (hopefully quickly) elements of this type-specific big list.- Parameters:
from- the start index (inclusive).to- the end index (exclusive).
-
addElements
void addElements(long index, char[][] a) Add (hopefully quickly) elements to this type-specific big list.- Parameters:
index- the index at which to add elements.a- the big array containing the elements.
-
addElements
void addElements(long index, char[][] a, long offset, long length) Add (hopefully quickly) elements to this type-specific big list.- Parameters:
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.
-
setElements
default void setElements(char[][] a) Set (hopefully quickly) elements to match the array given.- Parameters:
a- the big array containing the elements.- Since:
- 8.5.0
-
setElements
default void setElements(long index, char[][] a) Set (hopefully quickly) elements to match the array given.- Parameters:
index- the index at which to start setting elements.a- the big array containing the elements.- Since:
- 8.5.0
-
setElements
default void setElements(long index, char[][] a, long offset, long length) Set (hopefully quickly) elements to match the array given. Sets each in this list to the corresponding elements in the array, as if byListIterator iter = listIterator(index); long i = 0; while (i < length) { iter.next(); iter.set(BigArrays.get(a, offset + i++); }However, the exact implementation may be more efficient, taking into account whether random access is faster or not, or at the discretion of subclasses, abuse internals.- Parameters:
index- the index at which to start setting elements.a- the big array containing the elements.offset- the offset of the first element to add.length- the number of elements to add.- Since:
- 8.5.0
-
add
void add(long index, char key) Inserts the specified element at the specified position in this type-specific big list (optional operation).- See Also:
-
addAll
boolean addAll(long index, it.unimi.dsi.fastutil.chars.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).- See Also:
-
getChar
char getChar(long index) Returns the element at the specified position.- See Also:
-
removeChar
char removeChar(long index) Removes the element at the specified position.- See Also:
-
set
char set(long index, char k) Replaces the element at the specified position in this big list with the specified element (optional operation).- See Also:
-
indexOf
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.- See Also:
-
lastIndexOf
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.- See Also:
-
add
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceit.unimi.dsi.fastutil.BigList<Character>
-
get
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
getin interfaceit.unimi.dsi.fastutil.BigList<Character>
-
indexOf
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
indexOfin interfaceit.unimi.dsi.fastutil.BigList<Character>
-
lastIndexOf
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastIndexOfin interfaceit.unimi.dsi.fastutil.BigList<Character>
-
remove
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
removein interfaceit.unimi.dsi.fastutil.BigList<Character>
-
set
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
setin interfaceit.unimi.dsi.fastutil.BigList<Character>
-
addAll
Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).- See Also:
-
addAll
Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).- See Also:
-
addAll
default boolean addAll(long index, it.unimi.dsi.fastutil.chars.CharList l) Inserts all of the elements in the specified type-specific list into this type-specific big list at the specified position (optional operation).- See Also:
-
addAll
default boolean addAll(it.unimi.dsi.fastutil.chars.CharList l) Appends all of the elements in the specified type-specific list to the end of this type-specific big list (optional operation).- See Also:
-