Package com.landawn.abacus.util
Class LongList
- 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 LongList, E> action) acceptIfNotEmpty
(Throwables.Consumer<? super LongList, E> action) Accept if not empty.void
add
(int index, long e) void
add
(long e) boolean
addAll
(int index, long[] a) Adds the all.boolean
Adds the all.boolean
addAll
(long[] a) Adds the all.boolean
Adds the all.<E extends Exception>
booleanallMatch
(int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) <E extends Exception>
booleanallMatch
(Throwables.LongPredicate<E> filter) Returns whether all elements of this List match the provided predicate.<E extends Exception>
booleananyMatch
(int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) <E extends Exception>
booleananyMatch
(Throwables.LongPredicate<E> filter) Returns whether any elements of this List match the provided predicate.<R,
E extends Exception>
Rapply
(Throwables.Function<? super LongList, ? extends R, E> func) <R,
E extends Exception>
u.Optional<R>applyIfNotEmpty
(Throwables.Function<? super LongList, ? extends R, E> func) Apply if not empty.long[]
array()
Returns the original element array without copying.average()
average
(int fromIndex, int toIndex) int
binarySearch
(int fromIndex, int toIndex, long key) This List should be sorted first.int
binarySearch
(long key) This List should be sorted first.boxed()
boxed
(int fromIndex, int toIndex) void
clear()
Clear.boolean
contains
(long e) boolean
containsAll
(long[] a) boolean
boolean
containsAny
(long[] a) boolean
copy()
copy
(int fromIndex, int toIndex) copy
(int fromIndex, int toIndex, int step) static LongList
copyOf
(long[] a) static LongList
copyOf
(long[] a, int fromIndex, int toIndex) <E extends Exception>
intcount
(int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) <E extends Exception>
intcount
(Throwables.LongPredicate<E> filter) long
delete
(int index) final void
deleteAll
(int... indices) void
deleteRange
(int fromIndex, int toIndex) difference
(long[] a) boolean
disjoint
(long[] b) boolean
distinct
(int fromIndex, int toIndex) boolean
void
fill
(int fromIndex, int toIndex, long val) void
fill
(long val) filter
(int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) filter
(int fromIndex, int toIndex, Throwables.LongPredicate<E> filter, int max) filter
(Throwables.LongPredicate<E> filter) filter
(Throwables.LongPredicate<E> filter, int max) <E extends Exception>
u.OptionalLongfindFirst
(Throwables.LongPredicate<E> predicate) <E extends Exception>
u.OptionalIntfindFirstIndex
(Throwables.LongPredicate<E> predicate) Find first index.<E extends Exception>
u.OptionalLongfindLast
(Throwables.LongPredicate<E> predicate) <E extends Exception>
u.OptionalIntfindLastIndex
(Throwables.LongPredicate<E> predicate) Find last index.first()
<E extends Exception>
voidforEach
(int fromIndex, int toIndex, Throwables.LongConsumer<E> action) <E extends Exception>
voidforEach
(Throwables.LongConsumer<E> action) <E extends Exception>
voidforEachIndexed
(int fromIndex, int toIndex, Throwables.IndexedLongConsumer<E> action) <E extends Exception>
voidforEachIndexed
(Throwables.IndexedLongConsumer<E> action) static LongList
from
(Collection<Long> c) static LongList
from
(Collection<Long> c, int fromIndex, int toIndex) static LongList
from
(Collection<Long> c, int fromIndex, int toIndex, long defaultForNull) static LongList
from
(Collection<Long> c, long defaultForNull) long
get
(int index) boolean
Checks for duplicates.int
hashCode()
int
indexOf
(int fromIndex, long e) int
indexOf
(long e) intersection
(long[] 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
(int fromIndex, long e) Last index of.int
lastIndexOf
(long e) Last index of.map
(int fromIndex, int toIndex, Throwables.LongUnaryOperator<E> mapper) map
(Throwables.LongUnaryOperator<E> mapper) mapToObj
(int fromIndex, int toIndex, Throwables.LongFunction<? extends T, E> mapper) Map to obj.mapToObj
(Throwables.LongFunction<? 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.LongPredicate<E> filter) <E extends Exception>
booleannoneMatch
(Throwables.LongPredicate<E> filter) Returns whether no elements of this List match the provided predicate.int
occurrencesOf
(long objectToFind) static LongList
of
(long... a) static LongList
of
(long[] a, int size) void
Parallel sort.static LongList
random
(int len) static LongList
range
(long startInclusive, long endExclusive) static LongList
range
(long startInclusive, long endExclusive, long by) static LongList
rangeClosed
(long startInclusive, long endInclusive) static LongList
rangeClosed
(long startInclusive, long endInclusive, long by) <E extends Exception>
longreduce
(long identity, Throwables.LongBinaryOperator<E> accumulator) This is equivalent to:<E extends Exception>
u.OptionalLongreduce
(Throwables.LongBinaryOperator<E> accumulator) This is equivalent to:boolean
remove
(long e) boolean
removeAll
(long[] a) Removes the all.boolean
Removes the all.boolean
removeAllOccurrences
(long e) Removes the all occurrences.boolean
<E extends Exception>
booleanRemoves the if.static LongList
repeat
(long element, int len) int
replaceAll
(long oldVal, long newVal) <E extends Exception>
voidreplaceAll
(Throwables.LongUnaryOperator<E> operator) <E extends Exception>
booleanreplaceIf
(Throwables.LongPredicate<E> predicate, long newValue) void
replaceRange
(int fromIndex, int toIndex, long[] replacement) boolean
retainAll
(long[] a) boolean
void
reverse()
Reverse.void
reverse
(int fromIndex, int toIndex) void
Reverse sort.void
rotate
(int distance) long
set
(int index, long e) void
shuffle()
Shuffle.void
int
size()
void
sort()
Sort.split
(int fromIndex, int toIndex, int chunkSize) Returns List ofLongList
with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).stream()
stream
(int fromIndex, int toIndex) long
sum()
long
sum
(int fromIndex, int toIndex) void
swap
(int i, int j) symmetricDifference
(long[] a) long[]
toArray()
<C extends Collection<Long>>
CtoCollection
(int fromIndex, int toIndex, IntFunction<? extends C> supplier) To double list.To float list.toMultiset
(int fromIndex, int toIndex, IntFunction<Multiset<Long>> supplier) top
(int n) top
(int fromIndex, int toIndex, int n) top
(int fromIndex, int toIndex, int n, Comparator<? super Long> cmp) top
(int n, Comparator<? super Long> cmp) 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
-
LongList
public LongList() -
LongList
public LongList(int initialCapacity) -
LongList
public LongList(long[] a) The specified array is used as the element array for this list without copying action.- Parameters:
a
-
-
LongList
public LongList(long[] 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
- 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:
-
array
Returns the original element array without copying.- Specified by:
array
in classPrimitiveList<Long,
long[], LongList> - Returns:
-
get
public long get(int index) - Parameters:
index
-- Returns:
-
set
public long set(int index, long e) - Parameters:
index
-e
-- Returns:
-
add
public void add(long e) - Parameters:
e
-
-
add
public void add(int index, long e) - Parameters:
index
-e
-
-
addAll
Adds the all.- Specified by:
addAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
c
-- Returns:
-
addAll
Adds the all.- Specified by:
addAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
index
-c
-- Returns:
-
addAll
public boolean addAll(long[] a) Adds the all.- Specified by:
addAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
addAll
public boolean addAll(int index, long[] a) Adds the all.- Specified by:
addAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
index
-a
-- Returns:
-
remove
public boolean remove(long e) - Parameters:
e
-- Returns:
- true if this list contained the specified element
-
removeAllOccurrences
public boolean removeAllOccurrences(long 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<Long,
long[], LongList> - Parameters:
c
-- Returns:
-
removeAll
public boolean removeAll(long[] a) Removes the all.- Specified by:
removeAll
in classPrimitiveList<Long,
long[], LongList> - 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<Long,
long[], LongList>
-
retainAll
- Specified by:
retainAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
c
-- Returns:
-
retainAll
public boolean retainAll(long[] a) - Specified by:
retainAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
delete
public long delete(int index) - Parameters:
index
-- Returns:
-
deleteAll
- Specified by:
deleteAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
indices
-
-
deleteRange
public void deleteRange(int fromIndex, int toIndex) - Specified by:
deleteRange
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-
-
moveRange
public void moveRange(int fromIndex, int toIndex, int newPositionStartIndex) - Specified by:
moveRange
in classPrimitiveList<Long,
long[], LongList>
-
replaceRange
public void replaceRange(int fromIndex, int toIndex, long[] replacement) - Specified by:
replaceRange
in classPrimitiveList<Long,
long[], LongList>
-
replaceAll
public int replaceAll(long oldVal, long newVal) - Parameters:
oldVal
-newVal
-- Returns:
-
replaceAll
- Type Parameters:
E
-- Parameters:
operator
-- Throws:
E
- the e
-
replaceIf
public <E extends Exception> boolean replaceIf(Throwables.LongPredicate<E> predicate, long newValue) throws E - Type Parameters:
E
-- Parameters:
predicate
-newValue
-- Returns:
- Throws:
E
- the e
-
fill
public void fill(long val) - Parameters:
val
-
-
fill
public void fill(int fromIndex, int toIndex, long val) - Parameters:
fromIndex
-toIndex
-val
-
-
contains
public boolean contains(long e) - Parameters:
e
-- Returns:
-
containsAny
- Specified by:
containsAny
in classPrimitiveList<Long,
long[], LongList> - Parameters:
c
-- Returns:
-
containsAny
public boolean containsAny(long[] a) - Specified by:
containsAny
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
containsAll
- Specified by:
containsAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
c
-- Returns:
-
containsAll
public boolean containsAll(long[] a) - Specified by:
containsAll
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
disjoint
- Specified by:
disjoint
in classPrimitiveList<Long,
long[], LongList> - Parameters:
c
-- Returns:
-
disjoint
public boolean disjoint(long[] b) - Specified by:
disjoint
in classPrimitiveList<Long,
long[], LongList> - Parameters:
b
-- Returns:
-
intersection
- Specified by:
intersection
in classPrimitiveList<Long,
long[], LongList> - Parameters:
b
-- Returns:
- See Also:
-
intersection
- Specified by:
intersection
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
difference
- Specified by:
difference
in classPrimitiveList<Long,
long[], LongList> - Parameters:
b
-- Returns:
- See Also:
-
difference
- Specified by:
difference
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
symmetricDifference
- Specified by:
symmetricDifference
in classPrimitiveList<Long,
long[], LongList> - Parameters:
b
-- Returns:
- this.difference(b).addAll(b.difference(this))
- See Also:
-
symmetricDifference
- Specified by:
symmetricDifference
in classPrimitiveList<Long,
long[], LongList> - Parameters:
a
-- Returns:
-
occurrencesOf
public int occurrencesOf(long objectToFind) - Parameters:
objectToFind
-- Returns:
-
indexOf
public int indexOf(long e) - Parameters:
e
-- Returns:
-
indexOf
public int indexOf(int fromIndex, long e) - Parameters:
fromIndex
-e
-- Returns:
-
lastIndexOf
public int lastIndexOf(long e) Last index of.- Parameters:
e
-- Returns:
-
lastIndexOf
public int lastIndexOf(int fromIndex, long 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 long sum() -
sum
public long 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.LongConsumer<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.IndexedLongConsumer<E> action) throws E - Type Parameters:
E
-- Parameters:
fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
first
-
last
-
findFirst
public <E extends Exception> u.OptionalLong findFirst(Throwables.LongPredicate<E> predicate) throws E - Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
findLast
public <E extends Exception> u.OptionalLong findLast(Throwables.LongPredicate<E> predicate) throws E - Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
findFirstIndex
public <E extends Exception> u.OptionalInt findFirstIndex(Throwables.LongPredicate<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.LongPredicate<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.LongPredicate<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.LongPredicate<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.LongPredicate<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.LongPredicate<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> LongList filter(int fromIndex, int toIndex, Throwables.LongPredicate<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> LongList filter(int fromIndex, int toIndex, Throwables.LongPredicate<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> LongList map(int fromIndex, int toIndex, Throwables.LongUnaryOperator<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.LongFunction<? 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.LongFunction<? 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.OptionalLong reduce(Throwables.LongBinaryOperator<E> accumulator) throws E This is equivalent to:if (isEmpty()) { return OptionalLong.empty(); } long result = elementData[0]; for (int i = 1; i < size; i++) { result = accumulator.applyAsLong(result, elementData[i]); } return OptionalLong.of(result);
- Type Parameters:
E
-- Parameters:
accumulator
-- Returns:
- Throws:
E
- the e
-
reduce
public <E extends Exception> long reduce(long identity, Throwables.LongBinaryOperator<E> accumulator) throws E This is equivalent to:if (isEmpty()) { return identity; } long result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsLong(result, elementData[i]); } return result;
- Type Parameters:
E
-- Parameters:
identity
-accumulator
-- Returns:
- Throws:
E
- the e
-
distinct
- Specified by:
distinct
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-- Returns:
-
hasDuplicates
public boolean hasDuplicates()Checks for duplicates.- Specified by:
hasDuplicates
in classPrimitiveList<Long,
long[], LongList> - Returns:
-
top
- Parameters:
n
-- Returns:
-
top
- Parameters:
fromIndex
-toIndex
-n
-- Returns:
-
top
- Parameters:
n
-cmp
-- Returns:
-
top
- Parameters:
fromIndex
-toIndex
-n
-cmp
-- Returns:
-
isSorted
public boolean isSorted()- Specified by:
isSorted
in classPrimitiveList<Long,
long[], LongList>
-
sort
public void sort()Sort.- Specified by:
sort
in classPrimitiveList<Long,
long[], LongList>
-
parallelSort
public void parallelSort()Parallel sort. -
reverseSort
public void reverseSort()Reverse sort.- Specified by:
reverseSort
in classPrimitiveList<Long,
long[], LongList>
-
binarySearch
public int binarySearch(long key) This List should be sorted first.- Parameters:
key
-- Returns:
-
binarySearch
public int binarySearch(int fromIndex, int toIndex, long key) This List should be sorted first.- Parameters:
fromIndex
-toIndex
-key
-- Returns:
-
reverse
public void reverse()Reverse.- Specified by:
reverse
in classPrimitiveList<Long,
long[], LongList>
-
reverse
public void reverse(int fromIndex, int toIndex) - Specified by:
reverse
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-
-
rotate
public void rotate(int distance) - Specified by:
rotate
in classPrimitiveList<Long,
long[], LongList> - Parameters:
distance
-
-
shuffle
public void shuffle()Shuffle.- Specified by:
shuffle
in classPrimitiveList<Long,
long[], LongList>
-
shuffle
- Specified by:
shuffle
in classPrimitiveList<Long,
long[], LongList> - Parameters:
rnd
-
-
swap
public void swap(int i, int j) - Specified by:
swap
in classPrimitiveList<Long,
long[], LongList> - Parameters:
i
-j
-
-
copy
- Specified by:
copy
in classPrimitiveList<Long,
long[], LongList> - Returns:
- a copy of this List
-
copy
- Specified by:
copy
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-- Returns:
-
copy
- Specified by:
copy
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
split
Returns List ofLongList
with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).- Specified by:
split
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-chunkSize
- the desired size of each sub sequence (the last may be smaller).- Returns:
-
join
- Specified by:
join
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-delimiter
-- Returns:
-
join
- Specified by:
join
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-delimiter
-- Returns:
-
trimToSize
Trim to size.- Specified by:
trimToSize
in classPrimitiveList<Long,
long[], LongList> - Returns:
-
clear
public void clear()Clear.- Specified by:
clear
in classPrimitiveList<Long,
long[], LongList>
-
isEmpty
public boolean isEmpty()Checks if is empty.- Specified by:
isEmpty
in classPrimitiveList<Long,
long[], LongList> - Returns:
- true, if is empty
-
size
public int size()- Specified by:
size
in classPrimitiveList<Long,
long[], LongList>
-
boxed
-
boxed
- Parameters:
fromIndex
-toIndex
-- Returns:
-
toArray
public long[] toArray()- Specified by:
toArray
in classPrimitiveList<Long,
long[], LongList>
-
toFloatList
To float list.- Returns:
-
toDoubleList
To double list.- Returns:
-
toCollection
public <C extends Collection<Long>> C toCollection(int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Specified by:
toCollection
in classPrimitiveList<Long,
long[], LongList> - Type Parameters:
C
-- Parameters:
fromIndex
-toIndex
-supplier
-- Returns:
-
toMultiset
- Specified by:
toMultiset
in classPrimitiveList<Long,
long[], LongList> - Parameters:
fromIndex
-toIndex
-supplier
-- Returns:
-
iterator
-
stream
-
stream
- Parameters:
fromIndex
-toIndex
-- Returns:
-
apply
public <R,E extends Exception> R apply(Throwables.Function<? super LongList, ? extends R, throws EE> func) - Specified by:
apply
in classPrimitiveList<Long,
long[], LongList> - Type Parameters:
R
-E
-- Parameters:
func
-- Returns:
- Throws:
E
- the e
-
applyIfNotEmpty
public <R,E extends Exception> u.Optional<R> applyIfNotEmpty(Throwables.Function<? super LongList, ? extends R, throws EE> func) Apply if not empty.- Specified by:
applyIfNotEmpty
in classPrimitiveList<Long,
long[], LongList> - Type Parameters:
R
-E
-- Parameters:
func
-- Returns:
- Throws:
E
- the e
-
accept
- Specified by:
accept
in classPrimitiveList<Long,
long[], LongList> - Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
acceptIfNotEmpty
public <E extends Exception> If.OrElse acceptIfNotEmpty(Throwables.Consumer<? super LongList, E> action) throws EAccept if not empty.- Specified by:
acceptIfNotEmpty
in classPrimitiveList<Long,
long[], LongList> - Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
hashCode
public int hashCode() -
equals
-
toString
-