Package com.landawn.abacus.util
Class CharList
- All Implemented Interfaces:
Serializable
,RandomAccess
- Since:
- 0.8
- Author:
- Haiyang Li
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<E extends Exception>
voidaccept
(Throwables.Consumer<? super CharList, E> action) acceptIfNotEmpty
(Throwables.Consumer<? super CharList, E> action) Accept if not empty.void
add
(char e) void
add
(int index, char e) boolean
addAll
(char[] a) Adds the all.boolean
addAll
(int index, char[] a) Adds the all.boolean
Adds the all.boolean
Adds the all.<E extends Exception>
booleanallMatch
(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) <E extends Exception>
booleanallMatch
(Throwables.CharPredicate<E> filter) Returns whether all elements of this List match the provided predicate.<E extends Exception>
booleananyMatch
(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) <E extends Exception>
booleananyMatch
(Throwables.CharPredicate<E> filter) Returns whether any elements of this List match the provided predicate.<R,
E extends Exception>
Rapply
(Throwables.Function<? super CharList, ? extends R, E> func) <R,
E extends Exception>
u.Optional<R>applyIfNotEmpty
(Throwables.Function<? super CharList, ? extends R, E> func) Apply if not empty.char[]
array()
Returns the original element array without copying.average()
average
(int fromIndex, int toIndex) int
binarySearch
(char key) This List should be sorted first.int
binarySearch
(int fromIndex, int toIndex, char key) This List should be sorted first.boxed()
boxed
(int fromIndex, int toIndex) void
clear()
Clear.boolean
contains
(char e) boolean
containsAll
(char[] a) boolean
boolean
containsAny
(char[] a) boolean
copy()
copy
(int fromIndex, int toIndex) copy
(int fromIndex, int toIndex, int step) static CharList
copyOf
(char[] a) static CharList
copyOf
(char[] a, int fromIndex, int toIndex) <E extends Exception>
intcount
(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) <E extends Exception>
intcount
(Throwables.CharPredicate<E> filter) char
delete
(int index) final void
deleteAll
(int... indices) void
deleteRange
(int fromIndex, int toIndex) difference
(char[] a) boolean
disjoint
(char[] b) boolean
distinct
(int fromIndex, int toIndex) boolean
void
fill
(char val) void
fill
(int fromIndex, int toIndex, char val) filter
(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) filter
(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter, int max) filter
(Throwables.CharPredicate<E> filter) filter
(Throwables.CharPredicate<E> filter, int max) <E extends Exception>
u.OptionalCharfindFirst
(Throwables.CharPredicate<E> predicate) <E extends Exception>
u.OptionalIntfindFirstIndex
(Throwables.CharPredicate<E> predicate) Find first index.<E extends Exception>
u.OptionalCharfindLast
(Throwables.CharPredicate<E> predicate) <E extends Exception>
u.OptionalIntfindLastIndex
(Throwables.CharPredicate<E> predicate) Find last index.first()
<E extends Exception>
voidforEach
(int fromIndex, int toIndex, Throwables.CharConsumer<E> action) <E extends Exception>
voidforEach
(Throwables.CharConsumer<E> action) <E extends Exception>
voidforEachIndexed
(int fromIndex, int toIndex, Throwables.IndexedCharConsumer<E> action) <E extends Exception>
voidforEachIndexed
(Throwables.IndexedCharConsumer<E> action) static CharList
from
(Collection<Character> c) static CharList
from
(Collection<Character> c, char defaultForNull) static CharList
from
(Collection<Character> c, int fromIndex, int toIndex) static CharList
from
(Collection<Character> c, int fromIndex, int toIndex, char defaultForNull) char
get
(int index) boolean
Checks for duplicates.int
hashCode()
int
indexOf
(char e) int
indexOf
(int fromIndex, char e) intersection
(char[] a) boolean
isEmpty()
Checks if is empty.boolean
isSorted()
iterator()
join
(int fromIndex, int toIndex, char delimiter) kthLargest
(int k) kthLargest
(int fromIndex, int toIndex, int k) last()
int
lastIndexOf
(char e) Last index of.int
lastIndexOf
(int fromIndex, char e) Last index of.map
(int fromIndex, int toIndex, Throwables.CharUnaryOperator<E> mapper) map
(Throwables.CharUnaryOperator<E> mapper) mapToObj
(int fromIndex, int toIndex, Throwables.CharFunction<? extends T, E> mapper) Map to obj.mapToObj
(Throwables.CharFunction<? extends T, E> mapper) Map to obj.max()
max
(int fromIndex, int toIndex) median()
median
(int fromIndex, int toIndex) min()
min
(int fromIndex, int toIndex) void
moveRange
(int fromIndex, int toIndex, int newPositionStartIndex) <E extends Exception>
booleannoneMatch
(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) <E extends Exception>
booleannoneMatch
(Throwables.CharPredicate<E> filter) Returns whether no elements of this List match the provided predicate.int
occurrencesOf
(char objectToFind) static CharList
of
(char... a) static CharList
of
(char[] a, int size) void
Parallel sort.static CharList
random
(char[] candicates, int len) static CharList
random
(char startInclusive, char endExclusive, int len) static CharList
random
(int len) static CharList
range
(char startInclusive, char endExclusive) static CharList
range
(char startInclusive, char endExclusive, int by) static CharList
rangeClosed
(char startInclusive, char endInclusive) static CharList
rangeClosed
(char startInclusive, char endInclusive, int by) <E extends Exception>
charreduce
(char identity, Throwables.CharBinaryOperator<E> accumulator) This is equivalent to:<E extends Exception>
u.OptionalCharreduce
(Throwables.CharBinaryOperator<E> accumulator) This is equivalent to:boolean
remove
(char e) boolean
removeAll
(char[] a) Removes the all.boolean
Removes the all.boolean
removeAllOccurrences
(char e) Removes the all occurrences.boolean
<E extends Exception>
booleanRemoves the if.static CharList
repeat
(char element, int len) int
replaceAll
(char oldVal, char newVal) <E extends Exception>
voidreplaceAll
(Throwables.CharUnaryOperator<E> operator) <E extends Exception>
booleanreplaceIf
(Throwables.CharPredicate<E> predicate, char newValue) void
replaceRange
(int fromIndex, int toIndex, char[] replacement) boolean
retainAll
(char[] a) boolean
void
reverse()
Reverse.void
reverse
(int fromIndex, int toIndex) void
Reverse sort.void
rotate
(int distance) char
set
(int index, char e) void
shuffle()
Shuffle.void
int
size()
void
sort()
Sort.split
(int fromIndex, int toIndex, int chunkSize) Returns List ofCharList
with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).stream()
stream
(int fromIndex, int toIndex) int
sum()
int
sum
(int fromIndex, int toIndex) void
swap
(int i, int j) symmetricDifference
(char[] a) char[]
toArray()
<C extends Collection<Character>>
CtoCollection
(int fromIndex, int toIndex, IntFunction<? extends C> supplier) To int list.toMultiset
(int fromIndex, int toIndex, IntFunction<Multiset<Character>> supplier) toString()
Trim to size.Methods inherited from class com.landawn.abacus.util.PrimitiveList
distinct, join, join, join, join, println, split, toCollection, toList, toList, toMultiset, toMultiset, toMultiset, toSet, toSet
-
Constructor Details
-
CharList
public CharList() -
CharList
public CharList(int initialCapacity) -
CharList
public CharList(char[] a) The specified array is used as the element array for this list without copying action.- Parameters:
a
-
-
CharList
public CharList(char[] a, int size)
-
-
Method Details
-
of
- Parameters:
a
-- Returns:
-
of
- Parameters:
a
-size
-- Returns:
-
copyOf
- Parameters:
a
-- Returns:
-
copyOf
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
from
- Parameters:
c
-- Returns:
-
from
- Parameters:
c
-defaultForNull
-- Returns:
-
from
- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
from
public static CharList from(Collection<Character> c, int fromIndex, int toIndex, char defaultForNull) - Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
range
- Parameters:
startInclusive
-endExclusive
-- Returns:
-
range
- Parameters:
startInclusive
-endExclusive
-by
-- Returns:
-
rangeClosed
- Parameters:
startInclusive
-endInclusive
-- Returns:
-
rangeClosed
- Parameters:
startInclusive
-endInclusive
-by
-- Returns:
-
repeat
- Parameters:
element
-len
-- Returns:
-
random
- Parameters:
len
-- Returns:
-
random
- Parameters:
startInclusive
-endExclusive
-len
-- Returns:
-
random
- Parameters:
candicates
-len
-- Returns:
-
array
Returns the original element array without copying.- Specified by:
array
in classPrimitiveList<Character,
char[], CharList> - Returns:
-
get
public char get(int index) - Parameters:
index
-- Returns:
-
set
public char set(int index, char e) - Parameters:
index
-e
-- Returns:
-
add
public void add(char e) - Parameters:
e
-
-
add
public void add(int index, char e) - Parameters:
index
-e
-
-
addAll
Adds the all.- Specified by:
addAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
c
-- Returns:
-
addAll
Adds the all.- Specified by:
addAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
index
-c
-- Returns:
-
addAll
public boolean addAll(char[] a) Adds the all.- Specified by:
addAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
addAll
public boolean addAll(int index, char[] a) Adds the all.- Specified by:
addAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
index
-a
-- Returns:
-
remove
public boolean remove(char e) - Parameters:
e
-- Returns:
- true if this list contained the specified element
-
removeAllOccurrences
public boolean removeAllOccurrences(char e) Removes the all occurrences.- Parameters:
e
-- Returns:
- true if this list contained the specified element
-
removeAll
Removes the all.- Specified by:
removeAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
c
-- Returns:
-
removeAll
public boolean removeAll(char[] a) Removes the all.- Specified by:
removeAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
removeIf
Removes the if.- Type Parameters:
E
-- Parameters:
p
-- Returns:
- Throws:
E
- the e
-
removeDuplicates
public boolean removeDuplicates()- Specified by:
removeDuplicates
in classPrimitiveList<Character,
char[], CharList>
-
retainAll
- Specified by:
retainAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
c
-- Returns:
-
retainAll
public boolean retainAll(char[] a) - Specified by:
retainAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
delete
public char delete(int index) - Parameters:
index
-- Returns:
-
deleteAll
- Specified by:
deleteAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
indices
-
-
deleteRange
public void deleteRange(int fromIndex, int toIndex) - Specified by:
deleteRange
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-
-
moveRange
public void moveRange(int fromIndex, int toIndex, int newPositionStartIndex) - Specified by:
moveRange
in classPrimitiveList<Character,
char[], CharList>
-
replaceRange
public void replaceRange(int fromIndex, int toIndex, char[] replacement) - Specified by:
replaceRange
in classPrimitiveList<Character,
char[], CharList>
-
replaceAll
public int replaceAll(char oldVal, char newVal) - Parameters:
oldVal
-newVal
-- Returns:
-
replaceAll
- Type Parameters:
E
-- Parameters:
operator
-- Throws:
E
- the e
-
replaceIf
public <E extends Exception> boolean replaceIf(Throwables.CharPredicate<E> predicate, char newValue) throws E - Type Parameters:
E
-- Parameters:
predicate
-newValue
-- Returns:
- Throws:
E
- the e
-
fill
public void fill(char val) - Parameters:
val
-
-
fill
public void fill(int fromIndex, int toIndex, char val) - Parameters:
fromIndex
-toIndex
-val
-
-
contains
public boolean contains(char e) - Parameters:
e
-- Returns:
-
containsAny
- Specified by:
containsAny
in classPrimitiveList<Character,
char[], CharList> - Parameters:
c
-- Returns:
-
containsAny
public boolean containsAny(char[] a) - Specified by:
containsAny
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
containsAll
- Specified by:
containsAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
c
-- Returns:
-
containsAll
public boolean containsAll(char[] a) - Specified by:
containsAll
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
disjoint
- Specified by:
disjoint
in classPrimitiveList<Character,
char[], CharList> - Parameters:
c
-- Returns:
-
disjoint
public boolean disjoint(char[] b) - Specified by:
disjoint
in classPrimitiveList<Character,
char[], CharList> - Parameters:
b
-- Returns:
-
intersection
- Specified by:
intersection
in classPrimitiveList<Character,
char[], CharList> - Parameters:
b
-- Returns:
- See Also:
-
intersection
- Specified by:
intersection
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
difference
- Specified by:
difference
in classPrimitiveList<Character,
char[], CharList> - Parameters:
b
-- Returns:
- See Also:
-
difference
- Specified by:
difference
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
symmetricDifference
- Specified by:
symmetricDifference
in classPrimitiveList<Character,
char[], CharList> - Parameters:
b
-- Returns:
- this.difference(b).addAll(b.difference(this))
- See Also:
-
symmetricDifference
- Specified by:
symmetricDifference
in classPrimitiveList<Character,
char[], CharList> - Parameters:
a
-- Returns:
-
occurrencesOf
public int occurrencesOf(char objectToFind) - Parameters:
objectToFind
-- Returns:
-
indexOf
public int indexOf(char e) - Parameters:
e
-- Returns:
-
indexOf
public int indexOf(int fromIndex, char e) - Parameters:
fromIndex
-e
-- Returns:
-
lastIndexOf
public int lastIndexOf(char e) Last index of.- Parameters:
e
-- Returns:
-
lastIndexOf
public int lastIndexOf(int fromIndex, char e) Last index of.- Parameters:
fromIndex
- the start index to traverse backwards from. Inclusive.e
-- Returns:
-
min
-
min
- Parameters:
fromIndex
-toIndex
-- Returns:
-
median
-
median
- Parameters:
fromIndex
-toIndex
-- Returns:
-
max
-
max
- Parameters:
fromIndex
-toIndex
-- Returns:
-
kthLargest
- Parameters:
k
-- Returns:
-
kthLargest
- Parameters:
fromIndex
-toIndex
-k
-- Returns:
-
sum
public int sum() -
sum
public int sum(int fromIndex, int toIndex) - Parameters:
fromIndex
-toIndex
-- Returns:
-
average
-
average
- Parameters:
fromIndex
-toIndex
-- Returns:
-
forEach
- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
forEach
public <E extends Exception> void forEach(int fromIndex, int toIndex, Throwables.CharConsumer<E> action) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
forEachIndexed
- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
forEachIndexed
public <E extends Exception> void forEachIndexed(int fromIndex, int toIndex, Throwables.IndexedCharConsumer<E> action) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
first
-
last
-
findFirst
public <E extends Exception> u.OptionalChar findFirst(Throwables.CharPredicate<E> predicate) throws E - Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
findLast
public <E extends Exception> u.OptionalChar findLast(Throwables.CharPredicate<E> predicate) throws E - Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
findFirstIndex
public <E extends Exception> u.OptionalInt findFirstIndex(Throwables.CharPredicate<E> predicate) throws E Find first index.- Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
findLastIndex
public <E extends Exception> u.OptionalInt findLastIndex(Throwables.CharPredicate<E> predicate) throws E Find last index.- Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
allMatch
Returns whether all elements of this List match the provided predicate.- Type Parameters:
E
-- Parameters:
filter
-- Returns:
- Throws:
E
- the e
-
allMatch
public <E extends Exception> boolean allMatch(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
anyMatch
Returns whether any elements of this List match the provided predicate.- Type Parameters:
E
-- Parameters:
filter
-- Returns:
- Throws:
E
- the e
-
anyMatch
public <E extends Exception> boolean anyMatch(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
noneMatch
Returns whether no elements of this List match the provided predicate.- Type Parameters:
E
-- Parameters:
filter
-- Returns:
- Throws:
E
- the e
-
noneMatch
public <E extends Exception> boolean noneMatch(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
- Type Parameters:
E
-- Parameters:
filter
-- Returns:
- Throws:
E
- the e
-
count
public <E extends Exception> int count(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
- Type Parameters:
E
-- Parameters:
filter
-- Returns:
- a new List with the elements match the provided predicate.
- Throws:
E
- the e
-
filter
public <E extends Exception> CharList filter(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
- Type Parameters:
E
-- Parameters:
filter
-max
-- Returns:
- a new List with the elements match the provided predicate.
- Throws:
E
- the e
-
filter
public <E extends Exception> CharList filter(int fromIndex, int toIndex, Throwables.CharPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-filter
-max
-- Returns:
- Throws:
E
- the e
-
map
- Type Parameters:
E
-- Parameters:
mapper
-- Returns:
- Throws:
E
- the e
-
map
public <E extends Exception> CharList map(int fromIndex, int toIndex, Throwables.CharUnaryOperator<E> mapper) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-mapper
-- Returns:
- Throws:
E
- the e
-
mapToObj
public <T,E extends Exception> List<T> mapToObj(Throwables.CharFunction<? extends T, E> mapper) throws EMap to obj.- Type Parameters:
T
-E
-- Parameters:
mapper
-- Returns:
- Throws:
E
- the e
-
mapToObj
public <T,E extends Exception> List<T> mapToObj(int fromIndex, int toIndex, Throwables.CharFunction<? extends T, E> mapper) throws EMap to obj.- Type Parameters:
T
-E
-- Parameters:
fromIndex
-toIndex
-mapper
-- Returns:
- Throws:
E
- the e
-
reduce
public <E extends Exception> u.OptionalChar reduce(Throwables.CharBinaryOperator<E> accumulator) throws E This is equivalent to:if (isEmpty()) { return OptionalChar.empty(); } char result = elementData[0]; for (int i = 1; i < size; i++) { result = accumulator.applyAsChar(result, elementData[i]); } return OptionalChar.of(result);
- Type Parameters:
E
-- Parameters:
accumulator
-- Returns:
- Throws:
E
- the e
-
reduce
public <E extends Exception> char reduce(char identity, Throwables.CharBinaryOperator<E> accumulator) throws E This is equivalent to:if (isEmpty()) { return identity; } char result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsChar(result, elementData[i]); } return result;
- Type Parameters:
E
-- Parameters:
identity
-accumulator
-- Returns:
- Throws:
E
- the e
-
distinct
- Specified by:
distinct
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-- Returns:
-
hasDuplicates
public boolean hasDuplicates()Checks for duplicates.- Specified by:
hasDuplicates
in classPrimitiveList<Character,
char[], CharList> - Returns:
-
isSorted
public boolean isSorted()- Specified by:
isSorted
in classPrimitiveList<Character,
char[], CharList>
-
sort
public void sort()Sort.- Specified by:
sort
in classPrimitiveList<Character,
char[], CharList>
-
parallelSort
public void parallelSort()Parallel sort. -
reverseSort
public void reverseSort()Reverse sort.- Specified by:
reverseSort
in classPrimitiveList<Character,
char[], CharList>
-
binarySearch
public int binarySearch(char key) This List should be sorted first.- Parameters:
key
-- Returns:
-
binarySearch
public int binarySearch(int fromIndex, int toIndex, char key) This List should be sorted first.- Parameters:
fromIndex
-toIndex
-key
-- Returns:
-
reverse
public void reverse()Reverse.- Specified by:
reverse
in classPrimitiveList<Character,
char[], CharList>
-
reverse
public void reverse(int fromIndex, int toIndex) - Specified by:
reverse
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-
-
rotate
public void rotate(int distance) - Specified by:
rotate
in classPrimitiveList<Character,
char[], CharList> - Parameters:
distance
-
-
shuffle
public void shuffle()Shuffle.- Specified by:
shuffle
in classPrimitiveList<Character,
char[], CharList>
-
shuffle
- Specified by:
shuffle
in classPrimitiveList<Character,
char[], CharList> - Parameters:
rnd
-
-
swap
public void swap(int i, int j) - Specified by:
swap
in classPrimitiveList<Character,
char[], CharList> - Parameters:
i
-j
-
-
copy
- Specified by:
copy
in classPrimitiveList<Character,
char[], CharList> - Returns:
- a copy of this List
-
copy
- Specified by:
copy
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-- Returns:
-
copy
- Specified by:
copy
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
split
Returns List ofCharList
with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).- Specified by:
split
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-chunkSize
- the desired size of each sub sequence (the last may be smaller).- Returns:
-
join
- Specified by:
join
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-delimiter
-- Returns:
-
join
- Specified by:
join
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-delimiter
-- Returns:
-
trimToSize
Trim to size.- Specified by:
trimToSize
in classPrimitiveList<Character,
char[], CharList> - Returns:
-
clear
public void clear()Clear.- Specified by:
clear
in classPrimitiveList<Character,
char[], CharList>
-
isEmpty
public boolean isEmpty()Checks if is empty.- Specified by:
isEmpty
in classPrimitiveList<Character,
char[], CharList> - Returns:
- true, if is empty
-
size
public int size()- Specified by:
size
in classPrimitiveList<Character,
char[], CharList>
-
boxed
-
boxed
- Parameters:
fromIndex
-toIndex
-- Returns:
-
toArray
public char[] toArray()- Specified by:
toArray
in classPrimitiveList<Character,
char[], CharList>
-
toIntList
To int list.- Returns:
-
toCollection
public <C extends Collection<Character>> C toCollection(int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Specified by:
toCollection
in classPrimitiveList<Character,
char[], CharList> - Type Parameters:
C
-- Parameters:
fromIndex
-toIndex
-supplier
-- Returns:
-
toMultiset
public Multiset<Character> toMultiset(int fromIndex, int toIndex, IntFunction<Multiset<Character>> supplier) - Specified by:
toMultiset
in classPrimitiveList<Character,
char[], CharList> - Parameters:
fromIndex
-toIndex
-supplier
-- Returns:
-
iterator
-
stream
-
stream
- Parameters:
fromIndex
-toIndex
-- Returns:
-
apply
public <R,E extends Exception> R apply(Throwables.Function<? super CharList, ? extends R, throws EE> func) - Specified by:
apply
in classPrimitiveList<Character,
char[], CharList> - Type Parameters:
R
-E
-- Parameters:
func
-- Returns:
- Throws:
E
- the e
-
applyIfNotEmpty
public <R,E extends Exception> u.Optional<R> applyIfNotEmpty(Throwables.Function<? super CharList, ? extends R, throws EE> func) Apply if not empty.- Specified by:
applyIfNotEmpty
in classPrimitiveList<Character,
char[], CharList> - Type Parameters:
R
-E
-- Parameters:
func
-- Returns:
- Throws:
E
- the e
-
accept
- Specified by:
accept
in classPrimitiveList<Character,
char[], CharList> - Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
acceptIfNotEmpty
public <E extends Exception> If.OrElse acceptIfNotEmpty(Throwables.Consumer<? super CharList, E> action) throws EAccept if not empty.- Specified by:
acceptIfNotEmpty
in classPrimitiveList<Character,
char[], CharList> - Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
hashCode
public int hashCode() -
equals
-
toString
-