public final class IntList extends PrimitiveList<Integer,int[],IntList>
Constructor and Description |
---|
IntList() |
IntList(int initialCapacity) |
IntList(int[] a)
The specified array is used as the element array for this list without copying action.
|
IntList(int[] a,
int size) |
Modifier and Type | Method and Description |
---|---|
<E extends Exception> |
accept(Throwables.Consumer<? super IntList,E> action) |
<E extends Exception> |
acceptIfNotEmpty(Throwables.Consumer<? super IntList,E> action)
Accept if not empty.
|
void |
add(int e) |
void |
add(int index,
int e) |
boolean |
addAll(int[] a)
Adds the all.
|
boolean |
addAll(int index,
int[] a)
Adds the all.
|
boolean |
addAll(int index,
IntList c)
Adds the all.
|
boolean |
addAll(IntList c)
Adds the all.
|
<E extends Exception> |
allMatch(int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter) |
<E extends Exception> |
allMatch(Throwables.IntPredicate<E> filter)
Returns whether all elements of this List match the provided predicate.
|
<E extends Exception> |
anyMatch(int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter) |
<E extends Exception> |
anyMatch(Throwables.IntPredicate<E> filter)
Returns whether any elements of this List match the provided predicate.
|
<R,E extends Exception> |
apply(Throwables.Function<? super IntList,R,E> func) |
<R,E extends Exception> |
applyIfNotEmpty(Throwables.Function<? super IntList,R,E> func)
Apply if not empty.
|
int[] |
array()
Returns the original element array without copying.
|
u.OptionalDouble |
average() |
u.OptionalDouble |
average(int fromIndex,
int toIndex) |
int |
binarySearch(int key)
This List should be sorted first.
|
int |
binarySearch(int fromIndex,
int toIndex,
int key)
This List should be sorted first.
|
List<Integer> |
boxed() |
List<Integer> |
boxed(int fromIndex,
int toIndex) |
void |
clear()
Clear.
|
boolean |
contains(int e) |
boolean |
containsAll(int[] a) |
boolean |
containsAll(IntList c) |
boolean |
containsAny(int[] a) |
boolean |
containsAny(IntList c) |
IntList |
copy() |
IntList |
copy(int fromIndex,
int toIndex) |
IntList |
copy(int from,
int to,
int step) |
static IntList |
copyOf(int[] a) |
static IntList |
copyOf(int[] a,
int fromIndex,
int toIndex) |
<E extends Exception> |
count(int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter) |
<E extends Exception> |
count(Throwables.IntPredicate<E> filter) |
int |
delete(int index) |
void |
deleteAll(int... indices) |
void |
deleteRange(int fromIndex,
int toIndex) |
IntList |
difference(int[] a) |
IntList |
difference(IntList b)
Returns a new list with all the elements in
b removed by occurrences. |
boolean |
disjoint(int[] b) |
boolean |
disjoint(IntList c) |
IntList |
distinct(int fromIndex,
int toIndex) |
boolean |
equals(Object obj) |
void |
fill(int val) |
void |
fill(int fromIndex,
int toIndex,
int val) |
<E extends Exception> |
filter(int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter) |
<E extends Exception> |
filter(int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter,
int max) |
<E extends Exception> |
filter(Throwables.IntPredicate<E> filter) |
<E extends Exception> |
filter(Throwables.IntPredicate<E> filter,
int max) |
<E extends Exception> |
findFirst(Throwables.IntPredicate<E> predicate) |
<E extends Exception> |
findFirstIndex(Throwables.IntPredicate<E> predicate)
Find first index.
|
<E extends Exception> |
findLast(Throwables.IntPredicate<E> predicate) |
<E extends Exception> |
findLastIndex(Throwables.IntPredicate<E> predicate)
Find last index.
|
u.OptionalInt |
first() |
<E extends Exception> |
forEach(int fromIndex,
int toIndex,
Throwables.IntConsumer<E> action) |
<E extends Exception> |
forEach(Throwables.IntConsumer<E> action) |
<E extends Exception> |
forEachIndexed(int fromIndex,
int toIndex,
Throwables.IndexedIntConsumer<E> action) |
<E extends Exception> |
forEachIndexed(Throwables.IndexedIntConsumer<E> action) |
static IntList |
from(Collection<Integer> c) |
static IntList |
from(Collection<Integer> c,
int defaultForNull) |
static IntList |
from(Collection<Integer> c,
int fromIndex,
int toIndex) |
static IntList |
from(Collection<Integer> c,
int fromIndex,
int toIndex,
int defaultForNull) |
int |
get(int index) |
boolean |
hasDuplicates()
Checks for duplicates.
|
int |
hashCode() |
int |
indexOf(int e) |
int |
indexOf(int fromIndex,
int e) |
IntList |
intersection(int[] a) |
IntList |
intersection(IntList b)
Returns a new list with all the elements occurred in both
a and b by occurrences. |
boolean |
isEmpty()
Checks if is empty.
|
IntIterator |
iterator() |
String |
join(int fromIndex,
int toIndex,
char delimiter) |
String |
join(int fromIndex,
int toIndex,
String delimiter) |
u.OptionalInt |
kthLargest(int k) |
u.OptionalInt |
kthLargest(int fromIndex,
int toIndex,
int k) |
u.OptionalInt |
last() |
int |
lastIndexOf(int e)
Last index of.
|
int |
lastIndexOf(int fromIndex,
int e)
Last index of.
|
<E extends Exception> |
map(int fromIndex,
int toIndex,
Throwables.IntUnaryOperator<E> mapper) |
<E extends Exception> |
map(Throwables.IntUnaryOperator<E> mapper) |
<T,E extends Exception> |
mapToObj(int fromIndex,
int toIndex,
Throwables.IntFunction<? extends T,E> mapper)
Map to obj.
|
<T,E extends Exception> |
mapToObj(Throwables.IntFunction<? extends T,E> mapper)
Map to obj.
|
u.OptionalInt |
max() |
u.OptionalInt |
max(int fromIndex,
int toIndex) |
u.OptionalInt |
median() |
u.OptionalInt |
median(int fromIndex,
int toIndex) |
u.OptionalInt |
min() |
u.OptionalInt |
min(int fromIndex,
int toIndex) |
<E extends Exception> |
noneMatch(int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter) |
<E extends Exception> |
noneMatch(Throwables.IntPredicate<E> filter)
Returns whether no elements of this List match the provided predicate.
|
int |
occurrencesOf(int objectToFind) |
static IntList |
of(int... a) |
static IntList |
of(int[] a,
int size) |
void |
parallelSort()
Parallel sort.
|
static IntList |
random(int len) |
static IntList |
random(int startInclusive,
int endExclusive,
int len) |
static IntList |
range(int startInclusive,
int endExclusive) |
static IntList |
range(int startInclusive,
int endExclusive,
int by) |
static IntList |
rangeClosed(int startInclusive,
int endInclusive) |
static IntList |
rangeClosed(int startInclusive,
int endInclusive,
int by) |
<E extends Exception> |
reduce(int identity,
Throwables.IntBinaryOperator<E> accumulator)
This is equivalent to:
|
<E extends Exception> |
reduce(Throwables.IntBinaryOperator<E> accumulator)
This is equivalent to:
|
boolean |
remove(int e) |
boolean |
removeAll(int[] a)
Removes the all.
|
boolean |
removeAll(IntList c)
Removes the all.
|
boolean |
removeAllOccurrences(int e)
Removes the all occurrences.
|
<E extends Exception> |
removeIf(Throwables.IntPredicate<E> p)
Removes the if.
|
static IntList |
repeat(int element,
int len) |
int |
replaceAll(int oldVal,
int newVal) |
<E extends Exception> |
replaceAll(Throwables.IntUnaryOperator<E> operator) |
<E extends Exception> |
replaceIf(Throwables.IntPredicate<E> predicate,
int newValue) |
boolean |
retainAll(int[] a) |
boolean |
retainAll(IntList c) |
void |
reverse()
Reverse.
|
void |
reverse(int fromIndex,
int toIndex) |
void |
reverseSort()
Reverse sort.
|
void |
rotate(int distance) |
int |
set(int index,
int e) |
void |
shuffle()
Shuffle.
|
void |
shuffle(Random rnd) |
int |
size() |
void |
sort()
Sort.
|
List<IntList> |
split(int fromIndex,
int toIndex,
int chunkSize)
Returns List of
IntList with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller). |
IntStream |
stream() |
IntStream |
stream(int fromIndex,
int toIndex) |
int |
sum() |
int |
sum(int fromIndex,
int toIndex) |
void |
swap(int i,
int j) |
IntList |
symmetricDifference(int[] a) |
IntList |
symmetricDifference(IntList b)
IntList a = IntList.of(0, 1, 2, 2, 3);
IntList b = IntList.of(2, 5, 1);
IntList c = a.symmetricDifference(b); // The elements c in a will be: [0, 2, 3, 5].
|
int[] |
toArray() |
<C extends Collection<Integer>> |
toCollection(int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
DoubleList |
toDoubleList()
To double list.
|
FloatList |
toFloatList()
To float list.
|
LongList |
toLongList()
To long list.
|
<K,A,D,E extends Exception> |
toMap(Throwables.IntFunction<? extends K,E> keyMapper,
Collector<Integer,A,D> downstream) |
<K,A,D,M extends Map<K,D>,E extends Exception> |
toMap(Throwables.IntFunction<? extends K,E> keyMapper,
Collector<Integer,A,D> downstream,
IntFunction<? extends M> mapFactory) |
<K,V,E extends Exception,E2 extends Exception> |
toMap(Throwables.IntFunction<? extends K,E> keyMapper,
Throwables.IntFunction<? extends V,E2> valueMapper) |
<K,V,M extends Map<K,V>,E extends Exception,E2 extends Exception> |
toMap(Throwables.IntFunction<? extends K,E> keyMapper,
Throwables.IntFunction<? extends V,E2> valueMapper,
IntFunction<? extends M> mapFactory) |
<K,V,E extends Exception,E2 extends Exception,E3 extends Exception> |
toMap(Throwables.IntFunction<? extends K,E> keyMapper,
Throwables.IntFunction<? extends V,E2> valueMapper,
Throwables.BinaryOperator<V,E3> mergeFunction) |
<K,V,M extends Map<K,V>,E extends Exception,E2 extends Exception,E3 extends Exception> |
toMap(Throwables.IntFunction<? extends K,E> keyMapper,
Throwables.IntFunction<? extends V,E2> valueMapper,
Throwables.BinaryOperator<V,E3> mergeFunction,
IntFunction<? extends M> mapFactory) |
Multiset<Integer> |
toMultiset(int fromIndex,
int toIndex,
IntFunction<Multiset<Integer>> supplier) |
IntList |
top(int n) |
IntList |
top(int n,
Comparator<? super Integer> cmp) |
IntList |
top(int fromIndex,
int toIndex,
int n) |
IntList |
top(int fromIndex,
int toIndex,
int n,
Comparator<? super Integer> cmp) |
String |
toString() |
IntList |
trimToSize()
Trim to size.
|
distinct, join, join, join, join, println, split, toCollection, toList, toList, toMultiset, toMultiset, toMultiset, toSet, toSet
public IntList()
public IntList(int initialCapacity)
public IntList(int[] a)
a
- public IntList(int[] a, int size)
@SafeVarargs public static IntList of(int... a)
a
- public static IntList of(int[] a, int size)
a
- size
- public static IntList copyOf(int[] a)
a
- public static IntList copyOf(int[] a, int fromIndex, int toIndex)
a
- fromIndex
- toIndex
- public static IntList from(Collection<Integer> c)
c
- public static IntList from(Collection<Integer> c, int defaultForNull)
c
- defaultForNull
- public static IntList from(Collection<Integer> c, int fromIndex, int toIndex)
c
- fromIndex
- toIndex
- public static IntList from(Collection<Integer> c, int fromIndex, int toIndex, int defaultForNull)
c
- fromIndex
- toIndex
- defaultForNull
- public static IntList range(int startInclusive, int endExclusive)
startInclusive
- endExclusive
- public static IntList range(int startInclusive, int endExclusive, int by)
startInclusive
- endExclusive
- by
- public static IntList rangeClosed(int startInclusive, int endInclusive)
startInclusive
- endInclusive
- public static IntList rangeClosed(int startInclusive, int endInclusive, int by)
startInclusive
- endInclusive
- by
- public static IntList repeat(int element, int len)
element
- len
- public static IntList random(int len)
len
- public static IntList random(int startInclusive, int endExclusive, int len)
startInclusive
- endExclusive
- len
- public int[] array()
array
in class PrimitiveList<Integer,int[],IntList>
public int get(int index)
index
- public int set(int index, int e)
index
- e
- public void add(int e)
e
- public void add(int index, int e)
index
- e
- public boolean addAll(IntList c)
c
- public boolean addAll(int index, IntList c)
index
- c
- public boolean addAll(int[] a)
addAll
in class PrimitiveList<Integer,int[],IntList>
a
- public boolean addAll(int index, int[] a)
addAll
in class PrimitiveList<Integer,int[],IntList>
index
- a
- public boolean remove(int e)
e
- public boolean removeAllOccurrences(int e)
e
- public boolean removeAll(IntList c)
c
- public boolean removeAll(int[] a)
removeAll
in class PrimitiveList<Integer,int[],IntList>
a
- public <E extends Exception> boolean removeIf(Throwables.IntPredicate<E> p) throws E extends Exception
E
- p
- E
- the eE extends Exception
public boolean retainAll(IntList c)
c
- public boolean retainAll(int[] a)
a
- public int delete(int index)
index
- @SafeVarargs public final void deleteAll(int... indices)
deleteAll
in class PrimitiveList<Integer,int[],IntList>
indices
- public void deleteRange(int fromIndex, int toIndex)
deleteRange
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- public int replaceAll(int oldVal, int newVal)
oldVal
- newVal
- public <E extends Exception> void replaceAll(Throwables.IntUnaryOperator<E> operator) throws E extends Exception
E
- operator
- E
- the eE extends Exception
public <E extends Exception> boolean replaceIf(Throwables.IntPredicate<E> predicate, int newValue) throws E extends Exception
E
- predicate
- newValue
- E
- the eE extends Exception
public void fill(int val)
val
- public void fill(int fromIndex, int toIndex, int val)
fromIndex
- toIndex
- val
- public boolean contains(int e)
e
- public boolean containsAll(IntList c)
c
- public boolean containsAll(int[] a)
containsAll
in class PrimitiveList<Integer,int[],IntList>
a
- public boolean containsAny(IntList c)
c
- public boolean containsAny(int[] a)
containsAny
in class PrimitiveList<Integer,int[],IntList>
a
- public boolean disjoint(IntList c)
c
- public boolean disjoint(int[] b)
disjoint
in class PrimitiveList<Integer,int[],IntList>
b
- public IntList intersection(IntList b)
a
and b
by occurrences.
IntList a = IntList.of(0, 1, 2, 2, 3); IntList b = IntList.of(2, 5, 1); a.retainAll(b); // The elements remained in a will be: [1, 2, 2]. IntList a = IntList.of(0, 1, 2, 2, 3); IntList b = IntList.of(2, 5, 1); IntList c = a.intersection(b); // The elements c in a will be: [1, 2].
b
- public IntList intersection(int[] a)
a
- public IntList difference(IntList b)
b
removed by occurrences.
IntList a = IntList.of(0, 1, 2, 2, 3); IntList b = IntList.of(2, 5, 1); a.removeAll(b); // The elements remained in a will be: [0, 3]. IntList a = IntList.of(0, 1, 2, 2, 3); IntList b = IntList.of(2, 5, 1); IntList c = a.difference(b); // The elements c in a will be: [0, 2, 3].
b
- public IntList difference(int[] a)
a
- public IntList symmetricDifference(IntList b)
IntList a = IntList.of(0, 1, 2, 2, 3); IntList b = IntList.of(2, 5, 1); IntList c = a.symmetricDifference(b); // The elements c in a will be: [0, 2, 3, 5].
b
- difference(IntList)
public IntList symmetricDifference(int[] a)
a
- public int occurrencesOf(int objectToFind)
objectToFind
- public int indexOf(int e)
e
- public int indexOf(int fromIndex, int e)
fromIndex
- e
- public int lastIndexOf(int e)
e
- public int lastIndexOf(int fromIndex, int e)
fromIndex
- the start index to traverse backwards from. Inclusive.e
- public u.OptionalInt min()
public u.OptionalInt min(int fromIndex, int toIndex)
fromIndex
- toIndex
- public u.OptionalInt median()
public u.OptionalInt median(int fromIndex, int toIndex)
fromIndex
- toIndex
- public u.OptionalInt max()
public u.OptionalInt max(int fromIndex, int toIndex)
fromIndex
- toIndex
- public u.OptionalInt kthLargest(int k)
k
- public u.OptionalInt kthLargest(int fromIndex, int toIndex, int k)
fromIndex
- toIndex
- k
- public int sum()
public int sum(int fromIndex, int toIndex)
fromIndex
- toIndex
- public u.OptionalDouble average()
public u.OptionalDouble average(int fromIndex, int toIndex)
fromIndex
- toIndex
- public <E extends Exception> void forEach(Throwables.IntConsumer<E> action) throws E extends Exception
E
- action
- E
- the eE extends Exception
public <E extends Exception> void forEach(int fromIndex, int toIndex, Throwables.IntConsumer<E> action) throws E extends Exception
E
- fromIndex
- toIndex
- action
- E
- the eE extends Exception
public <E extends Exception> void forEachIndexed(Throwables.IndexedIntConsumer<E> action) throws E extends Exception
E
- action
- E
- the eE extends Exception
public <E extends Exception> void forEachIndexed(int fromIndex, int toIndex, Throwables.IndexedIntConsumer<E> action) throws E extends Exception
E
- fromIndex
- toIndex
- action
- E
- the eE extends Exception
public u.OptionalInt first()
public u.OptionalInt last()
public <E extends Exception> u.OptionalInt findFirst(Throwables.IntPredicate<E> predicate) throws E extends Exception
E
- predicate
- E
- the eE extends Exception
public <E extends Exception> u.OptionalInt findLast(Throwables.IntPredicate<E> predicate) throws E extends Exception
E
- predicate
- E
- the eE extends Exception
public <E extends Exception> u.OptionalInt findFirstIndex(Throwables.IntPredicate<E> predicate) throws E extends Exception
E
- predicate
- E
- the eE extends Exception
public <E extends Exception> u.OptionalInt findLastIndex(Throwables.IntPredicate<E> predicate) throws E extends Exception
E
- predicate
- E
- the eE extends Exception
public <E extends Exception> boolean allMatch(Throwables.IntPredicate<E> filter) throws E extends Exception
E
- filter
- E
- the eE extends Exception
public <E extends Exception> boolean allMatch(int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
E
- fromIndex
- toIndex
- filter
- E
- the eE extends Exception
public <E extends Exception> boolean anyMatch(Throwables.IntPredicate<E> filter) throws E extends Exception
E
- filter
- E
- the eE extends Exception
public <E extends Exception> boolean anyMatch(int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
E
- fromIndex
- toIndex
- filter
- E
- the eE extends Exception
public <E extends Exception> boolean noneMatch(Throwables.IntPredicate<E> filter) throws E extends Exception
E
- filter
- E
- the eE extends Exception
public <E extends Exception> boolean noneMatch(int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
E
- fromIndex
- toIndex
- filter
- E
- the eE extends Exception
public <E extends Exception> int count(Throwables.IntPredicate<E> filter) throws E extends Exception
E
- filter
- E
- the eE extends Exception
public <E extends Exception> int count(int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
E
- fromIndex
- toIndex
- filter
- E
- the eE extends Exception
public <E extends Exception> IntList filter(Throwables.IntPredicate<E> filter) throws E extends Exception
E
- filter
- E
- the eE extends Exception
public <E extends Exception> IntList filter(int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
E
- fromIndex
- toIndex
- filter
- E
- the eE extends Exception
public <E extends Exception> IntList filter(Throwables.IntPredicate<E> filter, int max) throws E extends Exception
E
- filter
- max
- E
- the eE extends Exception
public <E extends Exception> IntList filter(int fromIndex, int toIndex, Throwables.IntPredicate<E> filter, int max) throws E extends Exception
E
- fromIndex
- toIndex
- filter
- max
- E
- the eE extends Exception
public <E extends Exception> IntList map(Throwables.IntUnaryOperator<E> mapper) throws E extends Exception
E
- mapper
- E
- the eE extends Exception
public <E extends Exception> IntList map(int fromIndex, int toIndex, Throwables.IntUnaryOperator<E> mapper) throws E extends Exception
E
- fromIndex
- toIndex
- mapper
- E
- the eE extends Exception
public <T,E extends Exception> List<T> mapToObj(Throwables.IntFunction<? extends T,E> mapper) throws E extends Exception
T
- E
- mapper
- E
- the eE extends Exception
public <T,E extends Exception> List<T> mapToObj(int fromIndex, int toIndex, Throwables.IntFunction<? extends T,E> mapper) throws E extends Exception
T
- E
- fromIndex
- toIndex
- mapper
- E
- the eE extends Exception
public <E extends Exception> u.OptionalInt reduce(Throwables.IntBinaryOperator<E> accumulator) throws E extends Exception
if (isEmpty()) {
return OptionalInt.empty();
}
int result = elementData[0];
for (int i = 1; i < size; i++) {
result = accumulator.applyAsInt(result, elementData[i]);
}
return OptionalInt.of(result);
E
- accumulator
- E
- the eE extends Exception
public <E extends Exception> int reduce(int identity, Throwables.IntBinaryOperator<E> accumulator) throws E extends Exception
if (isEmpty()) {
return identity;
}
int result = identity;
for (int i = 0; i < size; i++) {
result = accumulator.applyAsInt(result, elementData[i]);
}
return result;
E
- identity
- accumulator
- E
- the eE extends Exception
public boolean hasDuplicates()
hasDuplicates
in class PrimitiveList<Integer,int[],IntList>
public IntList distinct(int fromIndex, int toIndex)
distinct
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- public IntList top(int n)
n
- public IntList top(int fromIndex, int toIndex, int n)
fromIndex
- toIndex
- n
- public IntList top(int n, Comparator<? super Integer> cmp)
n
- cmp
- public IntList top(int fromIndex, int toIndex, int n, Comparator<? super Integer> cmp)
fromIndex
- toIndex
- n
- cmp
- public void sort()
sort
in class PrimitiveList<Integer,int[],IntList>
public void parallelSort()
public void reverseSort()
public int binarySearch(int key)
key
- public int binarySearch(int fromIndex, int toIndex, int key)
fromIndex
- toIndex
- key
- public void reverse()
reverse
in class PrimitiveList<Integer,int[],IntList>
public void reverse(int fromIndex, int toIndex)
reverse
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- public void rotate(int distance)
rotate
in class PrimitiveList<Integer,int[],IntList>
distance
- public void shuffle()
shuffle
in class PrimitiveList<Integer,int[],IntList>
public void shuffle(Random rnd)
shuffle
in class PrimitiveList<Integer,int[],IntList>
rnd
- public void swap(int i, int j)
swap
in class PrimitiveList<Integer,int[],IntList>
i
- j
- public IntList copy()
copy
in class PrimitiveList<Integer,int[],IntList>
public IntList copy(int fromIndex, int toIndex)
copy
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- public IntList copy(int from, int to, int step)
copy
in class PrimitiveList<Integer,int[],IntList>
from
- to
- step
- CommonUtil.copyOfRange(int[], int, int, int)
public List<IntList> split(int fromIndex, int toIndex, int chunkSize)
IntList
with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).split
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- chunkSize
- the desired size of each sub sequence (the last may be smaller).public String join(int fromIndex, int toIndex, char delimiter)
join
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- delimiter
- public String join(int fromIndex, int toIndex, String delimiter)
join
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- delimiter
- public IntList trimToSize()
trimToSize
in class PrimitiveList<Integer,int[],IntList>
public void clear()
clear
in class PrimitiveList<Integer,int[],IntList>
public boolean isEmpty()
isEmpty
in class PrimitiveList<Integer,int[],IntList>
public int size()
size
in class PrimitiveList<Integer,int[],IntList>
public List<Integer> boxed(int fromIndex, int toIndex)
fromIndex
- toIndex
- public int[] toArray()
toArray
in class PrimitiveList<Integer,int[],IntList>
public LongList toLongList()
public FloatList toFloatList()
public DoubleList toDoubleList()
public <C extends Collection<Integer>> C toCollection(int fromIndex, int toIndex, IntFunction<? extends C> supplier)
toCollection
in class PrimitiveList<Integer,int[],IntList>
C
- fromIndex
- toIndex
- supplier
- public Multiset<Integer> toMultiset(int fromIndex, int toIndex, IntFunction<Multiset<Integer>> supplier)
toMultiset
in class PrimitiveList<Integer,int[],IntList>
fromIndex
- toIndex
- supplier
- public <K,V,E extends Exception,E2 extends Exception> Map<K,V> toMap(Throwables.IntFunction<? extends K,E> keyMapper, Throwables.IntFunction<? extends V,E2> valueMapper) throws E extends Exception, E2 extends Exception
K
- the key typeV
- the value typeE
- E2
- keyMapper
- valueMapper
- E
- the eE2
- the e2E extends Exception
public <K,V,M extends Map<K,V>,E extends Exception,E2 extends Exception> M toMap(Throwables.IntFunction<? extends K,E> keyMapper, Throwables.IntFunction<? extends V,E2> valueMapper, IntFunction<? extends M> mapFactory) throws E extends Exception, E2 extends Exception
K
- the key typeV
- the value typeM
- E
- E2
- keyMapper
- valueMapper
- mapFactory
- E
- the eE2
- the e2E extends Exception
public <K,V,E extends Exception,E2 extends Exception,E3 extends Exception> Map<K,V> toMap(Throwables.IntFunction<? extends K,E> keyMapper, Throwables.IntFunction<? extends V,E2> valueMapper, Throwables.BinaryOperator<V,E3> mergeFunction) throws E extends Exception, E2 extends Exception, E3 extends Exception
K
- the key typeV
- the value typeE
- E2
- E3
- keyMapper
- valueMapper
- mergeFunction
- E
- the eE2
- the e2E3
- the e3E extends Exception
public <K,V,M extends Map<K,V>,E extends Exception,E2 extends Exception,E3 extends Exception> M toMap(Throwables.IntFunction<? extends K,E> keyMapper, Throwables.IntFunction<? extends V,E2> valueMapper, Throwables.BinaryOperator<V,E3> mergeFunction, IntFunction<? extends M> mapFactory) throws E extends Exception, E2 extends Exception, E3 extends Exception
K
- the key typeV
- the value typeM
- E
- E2
- E3
- keyMapper
- valueMapper
- mergeFunction
- mapFactory
- E
- the eE2
- the e2E3
- the e3E extends Exception
public <K,A,D,E extends Exception> Map<K,D> toMap(Throwables.IntFunction<? extends K,E> keyMapper, Collector<Integer,A,D> downstream) throws E extends Exception
K
- the key typeA
- D
- E
- keyMapper
- downstream
- E
- the eE extends Exception
public <K,A,D,M extends Map<K,D>,E extends Exception> M toMap(Throwables.IntFunction<? extends K,E> keyMapper, Collector<Integer,A,D> downstream, IntFunction<? extends M> mapFactory) throws E extends Exception
K
- the key typeA
- D
- M
- E
- keyMapper
- downstream
- mapFactory
- E
- the eE extends Exception
public IntIterator iterator()
public IntStream stream()
public IntStream stream(int fromIndex, int toIndex)
fromIndex
- toIndex
- public <R,E extends Exception> R apply(Throwables.Function<? super IntList,R,E> func) throws E extends Exception
apply
in class PrimitiveList<Integer,int[],IntList>
R
- E
- func
- E
- the eE extends Exception
public <R,E extends Exception> u.Optional<R> applyIfNotEmpty(Throwables.Function<? super IntList,R,E> func) throws E extends Exception
applyIfNotEmpty
in class PrimitiveList<Integer,int[],IntList>
R
- E
- func
- E
- the eE extends Exception
public <E extends Exception> void accept(Throwables.Consumer<? super IntList,E> action) throws E extends Exception
accept
in class PrimitiveList<Integer,int[],IntList>
E
- action
- E
- the eE extends Exception
public <E extends Exception> If.OrElse acceptIfNotEmpty(Throwables.Consumer<? super IntList,E> action) throws E extends Exception
acceptIfNotEmpty
in class PrimitiveList<Integer,int[],IntList>
E
- action
- E
- the eE extends Exception
public boolean equals(Object obj)
Copyright © 2020. All rights reserved.