public final class ByteList extends PrimitiveList<java.lang.Byte,byte[],ByteList>
Constructor and Description |
---|
ByteList() |
ByteList(byte[] a)
The specified array is used as the element array for this list without copying action.
|
ByteList(byte[] a,
int size) |
ByteList(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
<E extends java.lang.Exception> |
accept(Try.Consumer<? super ByteList,E> action) |
void |
add(byte e) |
void |
add(int index,
byte e) |
boolean |
addAll(byte[] a) |
boolean |
addAll(ByteList c) |
boolean |
addAll(int index,
byte[] a) |
boolean |
addAll(int index,
ByteList c) |
<E extends java.lang.Exception> |
allMatch(int fromIndex,
int toIndex,
Try.BytePredicate<E> filter) |
<E extends java.lang.Exception> |
allMatch(Try.BytePredicate<E> filter)
Returns whether all elements of this List match the provided predicate.
|
<E extends java.lang.Exception> |
anyMatch(int fromIndex,
int toIndex,
Try.BytePredicate<E> filter) |
<E extends java.lang.Exception> |
anyMatch(Try.BytePredicate<E> filter)
Returns whether any elements of this List match the provided predicate.
|
<R,E extends java.lang.Exception> |
apply(Try.Function<? super ByteList,R,E> func) |
byte[] |
array()
Returns the original element array without copying.
|
OptionalDouble |
average() |
OptionalDouble |
average(int fromIndex,
int toIndex) |
int |
binarySearch(byte key)
This List should be sorted first.
|
int |
binarySearch(int fromIndex,
int toIndex,
byte key)
This List should be sorted first.
|
java.util.List<java.lang.Byte> |
boxed() |
java.util.List<java.lang.Byte> |
boxed(int fromIndex,
int toIndex) |
void |
clear() |
boolean |
contains(byte e) |
boolean |
containsAll(byte[] a) |
boolean |
containsAll(ByteList c) |
boolean |
containsAny(byte[] a) |
boolean |
containsAny(ByteList c) |
ByteList |
copy() |
ByteList |
copy(int fromIndex,
int toIndex) |
ByteList |
copy(int from,
int to,
int step) |
<E extends java.lang.Exception> |
count(int fromIndex,
int toIndex,
Try.BytePredicate<E> filter) |
<E extends java.lang.Exception> |
count(Try.BytePredicate<E> filter) |
byte |
delete(int index) |
void |
deleteAll(int... indices) |
ByteList |
difference(byte[] a) |
ByteList |
difference(ByteList b) |
boolean |
disjoint(byte[] b) |
boolean |
disjoint(ByteList c) |
ByteList |
distinct(int fromIndex,
int toIndex) |
boolean |
equals(java.lang.Object obj) |
void |
fill(byte val) |
void |
fill(int fromIndex,
int toIndex,
byte val) |
<E extends java.lang.Exception> |
filter(int fromIndex,
int toIndex,
Try.BytePredicate<E> filter) |
<E extends java.lang.Exception> |
filter(int fromIndex,
int toIndex,
Try.BytePredicate<E> filter,
int max) |
<E extends java.lang.Exception> |
filter(Try.BytePredicate<E> filter) |
<E extends java.lang.Exception> |
filter(Try.BytePredicate<E> filter,
int max) |
<E extends java.lang.Exception> |
findFirst(Try.BytePredicate<E> predicate) |
<E extends java.lang.Exception> |
findFirstIndex(Try.BytePredicate<E> predicate) |
<E extends java.lang.Exception> |
findLast(Try.BytePredicate<E> predicate) |
<E extends java.lang.Exception> |
findLastIndex(Try.BytePredicate<E> predicate) |
OptionalByte |
first() |
<E extends java.lang.Exception> |
forEach(int fromIndex,
int toIndex,
Try.ByteConsumer<E> action) |
<E extends java.lang.Exception> |
forEach(Try.ByteConsumer<E> action) |
static ByteList |
from(java.util.Collection<java.lang.Byte> c) |
static ByteList |
from(java.util.Collection<java.lang.Byte> c,
byte defaultValueForNull) |
byte |
get(int index) |
boolean |
hasDuplicates() |
int |
hashCode() |
int |
indexOf(byte e) |
int |
indexOf(int fromIndex,
byte e) |
ByteList |
intersection(byte[] a) |
ByteList |
intersection(ByteList b) |
boolean |
isEmpty() |
ByteIterator |
iterator() |
java.lang.String |
join(int fromIndex,
int toIndex,
char delimiter) |
java.lang.String |
join(int fromIndex,
int toIndex,
java.lang.String delimiter) |
OptionalByte |
kthLargest(int k) |
OptionalByte |
kthLargest(int fromIndex,
int toIndex,
int k) |
OptionalByte |
last() |
int |
lastIndexOf(byte e) |
int |
lastIndexOf(int fromIndex,
byte e) |
<E extends java.lang.Exception> |
map(int fromIndex,
int toIndex,
Try.ByteUnaryOperator<E> mapper) |
<E extends java.lang.Exception> |
map(Try.ByteUnaryOperator<E> mapper) |
<T,E extends java.lang.Exception> |
mapToObj(int fromIndex,
int toIndex,
Try.ByteFunction<? extends T,E> mapper) |
<T,E extends java.lang.Exception> |
mapToObj(Try.ByteFunction<? extends T,E> mapper) |
OptionalByte |
max() |
OptionalByte |
max(int fromIndex,
int toIndex) |
OptionalByte |
median() |
OptionalByte |
median(int fromIndex,
int toIndex) |
OptionalByte |
min() |
OptionalByte |
min(int fromIndex,
int toIndex) |
<E extends java.lang.Exception> |
noneMatch(int fromIndex,
int toIndex,
Try.BytePredicate<E> filter) |
<E extends java.lang.Exception> |
noneMatch(Try.BytePredicate<E> filter)
Returns whether no elements of this List match the provided predicate.
|
int |
occurrencesOf(byte objectToFind) |
static ByteList |
of(byte... a) |
static ByteList |
of(byte[] a,
int size) |
void |
parallelSort() |
static ByteList |
random(int len) |
static ByteList |
range(byte startInclusive,
byte endExclusive) |
static ByteList |
range(byte startInclusive,
byte endExclusive,
byte by) |
static ByteList |
rangeClosed(byte startInclusive,
byte endInclusive) |
static ByteList |
rangeClosed(byte startInclusive,
byte endInclusive,
byte by) |
<E extends java.lang.Exception> |
reduce(byte identity,
Try.ByteBinaryOperator<E> accumulator)
This is equivalent to:
|
<E extends java.lang.Exception> |
reduce(Try.ByteBinaryOperator<E> accumulator)
This is equivalent to:
|
boolean |
remove(byte e) |
boolean |
removeAll(byte[] a) |
boolean |
removeAll(ByteList c) |
boolean |
removeAllOccurrences(byte e) |
<E extends java.lang.Exception> |
removeIf(Try.BytePredicate<E> p) |
static ByteList |
repeat(byte element,
int len) |
int |
replaceAll(byte oldVal,
byte newVal) |
<E extends java.lang.Exception> |
replaceAll(Try.ByteUnaryOperator<E> operator) |
<E extends java.lang.Exception> |
replaceIf(Try.BytePredicate<E> predicate,
byte newValue) |
boolean |
retainAll(byte[] a) |
boolean |
retainAll(ByteList c) |
void |
reverse() |
void |
reverse(int fromIndex,
int toIndex) |
void |
reverseSort() |
void |
rotate(int distance) |
byte |
set(int index,
byte e) |
void |
shuffle() |
void |
shuffle(java.util.Random rnd) |
int |
size() |
void |
sort() |
java.util.List<ByteList> |
split(int fromIndex,
int toIndex,
int size) |
ByteStream |
stream() |
ByteStream |
stream(int fromIndex,
int toIndex) |
int |
sum() |
int |
sum(int fromIndex,
int toIndex) |
void |
swap(int i,
int j) |
ByteList |
symmetricDifference(byte[] a) |
ByteList |
symmetricDifference(ByteList b) |
<C extends java.util.Collection<java.lang.Byte>> |
toCollection(int fromIndex,
int toIndex,
IntFunction<C> supplier) |
IntList |
toIntList() |
<K,A,D,E extends java.lang.Exception> |
toMap(Try.ByteFunction<? extends K,E> classifier,
Collector<java.lang.Byte,A,D> downstream) |
<K,A,D,M extends java.util.Map<K,D>,E extends java.lang.Exception> |
toMap(Try.ByteFunction<? extends K,E> classifier,
Collector<java.lang.Byte,A,D> downstream,
IntFunction<M> mapFactory) |
<K,V,E extends java.lang.Exception,E2 extends java.lang.Exception> |
toMap(Try.ByteFunction<? extends K,E> keyExtractor,
Try.ByteFunction<? extends V,E2> valueMapper) |
<K,V,M extends java.util.Map<K,V>,E extends java.lang.Exception,E2 extends java.lang.Exception> |
toMap(Try.ByteFunction<? extends K,E> keyExtractor,
Try.ByteFunction<? extends V,E2> valueMapper,
IntFunction<M> mapFactory) |
<K,V,E extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> |
toMap(Try.ByteFunction<? extends K,E> keyExtractor,
Try.ByteFunction<? extends V,E2> valueMapper,
Try.BinaryOperator<V,E3> mergeFunction) |
<K,V,M extends java.util.Map<K,V>,E extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> |
toMap(Try.ByteFunction<? extends K,E> keyExtractor,
Try.ByteFunction<? extends V,E2> valueMapper,
Try.BinaryOperator<V,E3> mergeFunction,
IntFunction<M> mapFactory) |
Multiset<java.lang.Byte> |
toMultiset(int fromIndex,
int toIndex,
IntFunction<Multiset<java.lang.Byte>> supplier) |
java.lang.String |
toString() |
ByteList |
trimToSize() |
distinct, join, join, join, join, println, split, toCollection, toList, toList, toMultiset, toMultiset, toMultiset, toSet, toSet
public ByteList()
public ByteList(int initialCapacity)
public ByteList(byte[] a)
a
- public ByteList(byte[] a, int size)
@SafeVarargs public static ByteList of(byte... a)
public static ByteList of(byte[] a, int size)
public static ByteList from(java.util.Collection<java.lang.Byte> c)
public static ByteList from(java.util.Collection<java.lang.Byte> c, byte defaultValueForNull)
public static ByteList range(byte startInclusive, byte endExclusive)
public static ByteList range(byte startInclusive, byte endExclusive, byte by)
public static ByteList rangeClosed(byte startInclusive, byte endInclusive)
public static ByteList rangeClosed(byte startInclusive, byte endInclusive, byte by)
public static ByteList repeat(byte element, int len)
public static ByteList random(int len)
public byte[] array()
public byte get(int index)
public byte set(int index, byte e)
index
- e
- public void add(byte e)
public void add(int index, byte e)
public boolean addAll(ByteList c)
public boolean addAll(int index, ByteList c)
public boolean addAll(byte[] a)
addAll
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public boolean addAll(int index, byte[] a)
addAll
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public boolean remove(byte e)
e
- public boolean removeAllOccurrences(byte e)
e
- removeAllOccurrences
- public boolean removeAll(ByteList c)
public boolean removeAll(byte[] a)
removeAll
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public <E extends java.lang.Exception> boolean removeIf(Try.BytePredicate<E> p) throws E extends java.lang.Exception
E extends java.lang.Exception
public boolean retainAll(ByteList c)
public boolean retainAll(byte[] a)
public byte delete(int index)
index
- @SafeVarargs public final void deleteAll(int... indices)
deleteAll
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public int replaceAll(byte oldVal, byte newVal)
public <E extends java.lang.Exception> void replaceAll(Try.ByteUnaryOperator<E> operator) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> boolean replaceIf(Try.BytePredicate<E> predicate, byte newValue) throws E extends java.lang.Exception
E extends java.lang.Exception
public void fill(byte val)
public void fill(int fromIndex, int toIndex, byte val)
public boolean contains(byte e)
public boolean containsAll(ByteList c)
public boolean containsAll(byte[] a)
containsAll
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public boolean containsAny(ByteList c)
public boolean containsAny(byte[] a)
containsAny
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public boolean disjoint(ByteList c)
public boolean disjoint(byte[] b)
disjoint
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public ByteList intersection(ByteList b)
b
- IntList.intersection(IntList)
public ByteList intersection(byte[] a)
public ByteList difference(ByteList b)
b
- IntList.difference(IntList)
public ByteList difference(byte[] a)
public ByteList symmetricDifference(ByteList b)
b
- IntList.symmetricDifference(IntList)
public ByteList symmetricDifference(byte[] a)
public int occurrencesOf(byte objectToFind)
public int indexOf(byte e)
public int indexOf(int fromIndex, byte e)
public int lastIndexOf(byte e)
public int lastIndexOf(int fromIndex, byte e)
fromIndex
- the start index to traverse backwards from. Inclusive.e
- public OptionalByte min()
public OptionalByte min(int fromIndex, int toIndex)
public OptionalByte median()
public OptionalByte median(int fromIndex, int toIndex)
public OptionalByte max()
public OptionalByte max(int fromIndex, int toIndex)
public OptionalByte kthLargest(int k)
public OptionalByte kthLargest(int fromIndex, int toIndex, int k)
public int sum()
public int sum(int fromIndex, int toIndex)
public OptionalDouble average()
public OptionalDouble average(int fromIndex, int toIndex)
public <E extends java.lang.Exception> void forEach(Try.ByteConsumer<E> action) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> void forEach(int fromIndex, int toIndex, Try.ByteConsumer<E> action) throws E extends java.lang.Exception
E extends java.lang.Exception
public OptionalByte first()
public OptionalByte last()
public <E extends java.lang.Exception> OptionalByte findFirst(Try.BytePredicate<E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> OptionalByte findLast(Try.BytePredicate<E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> OptionalInt findFirstIndex(Try.BytePredicate<E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> OptionalInt findLastIndex(Try.BytePredicate<E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> boolean allMatch(Try.BytePredicate<E> filter) throws E extends java.lang.Exception
filter
- E extends java.lang.Exception
public <E extends java.lang.Exception> boolean allMatch(int fromIndex, int toIndex, Try.BytePredicate<E> filter) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> boolean anyMatch(Try.BytePredicate<E> filter) throws E extends java.lang.Exception
filter
- E extends java.lang.Exception
public <E extends java.lang.Exception> boolean anyMatch(int fromIndex, int toIndex, Try.BytePredicate<E> filter) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> boolean noneMatch(Try.BytePredicate<E> filter) throws E extends java.lang.Exception
filter
- E extends java.lang.Exception
public <E extends java.lang.Exception> boolean noneMatch(int fromIndex, int toIndex, Try.BytePredicate<E> filter) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> int count(Try.BytePredicate<E> filter) throws E extends java.lang.Exception
filter
- E extends java.lang.Exception
public <E extends java.lang.Exception> int count(int fromIndex, int toIndex, Try.BytePredicate<E> filter) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> ByteList filter(Try.BytePredicate<E> filter) throws E extends java.lang.Exception
filter
- E extends java.lang.Exception
public <E extends java.lang.Exception> ByteList filter(int fromIndex, int toIndex, Try.BytePredicate<E> filter) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> ByteList filter(Try.BytePredicate<E> filter, int max) throws E extends java.lang.Exception
filter
- E extends java.lang.Exception
public <E extends java.lang.Exception> ByteList filter(int fromIndex, int toIndex, Try.BytePredicate<E> filter, int max) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> ByteList map(Try.ByteUnaryOperator<E> mapper) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> ByteList map(int fromIndex, int toIndex, Try.ByteUnaryOperator<E> mapper) throws E extends java.lang.Exception
E extends java.lang.Exception
public <T,E extends java.lang.Exception> java.util.List<T> mapToObj(Try.ByteFunction<? extends T,E> mapper) throws E extends java.lang.Exception
E extends java.lang.Exception
public <T,E extends java.lang.Exception> java.util.List<T> mapToObj(int fromIndex, int toIndex, Try.ByteFunction<? extends T,E> mapper) throws E extends java.lang.Exception
E extends java.lang.Exception
public <E extends java.lang.Exception> OptionalByte reduce(Try.ByteBinaryOperator<E> accumulator) throws E extends java.lang.Exception
if (isEmpty()) {
return OptionalByte.empty();
}
byte result = elementData[0];
for (int i = 1; i < size; i++) {
result = accumulator.applyAsByte(result, elementData[i]);
}
return OptionalByte.of(result);
accumulator
- E extends java.lang.Exception
public <E extends java.lang.Exception> byte reduce(byte identity, Try.ByteBinaryOperator<E> accumulator) throws E extends java.lang.Exception
if (isEmpty()) {
return identity;
}
byte result = identity;
for (int i = 0; i < size; i++) {
result = accumulator.applyAsByte(result, elementData[i]);
}
return result;
identity
- accumulator
- E extends java.lang.Exception
public boolean hasDuplicates()
hasDuplicates
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public ByteList distinct(int fromIndex, int toIndex)
distinct
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void sort()
sort
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void parallelSort()
public void reverseSort()
public int binarySearch(byte key)
key
- public int binarySearch(int fromIndex, int toIndex, byte key)
fromIndex
- toIndex
- key
- public void reverse()
reverse
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void reverse(int fromIndex, int toIndex)
reverse
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void rotate(int distance)
rotate
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void shuffle()
shuffle
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void shuffle(java.util.Random rnd)
shuffle
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void swap(int i, int j)
swap
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public ByteList copy()
copy
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public ByteList copy(int fromIndex, int toIndex)
copy
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public ByteList copy(int from, int to, int step)
copy
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
from
- to
- step
- N.copyOfRange(int[], int, int, int)
public java.util.List<ByteList> split(int fromIndex, int toIndex, int size)
split
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public java.lang.String join(int fromIndex, int toIndex, char delimiter)
join
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public java.lang.String join(int fromIndex, int toIndex, java.lang.String delimiter)
join
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public ByteList trimToSize()
trimToSize
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public void clear()
clear
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public boolean isEmpty()
isEmpty
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public int size()
size
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public java.util.List<java.lang.Byte> boxed()
public java.util.List<java.lang.Byte> boxed(int fromIndex, int toIndex)
public IntList toIntList()
public <C extends java.util.Collection<java.lang.Byte>> C toCollection(int fromIndex, int toIndex, IntFunction<C> supplier)
toCollection
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public Multiset<java.lang.Byte> toMultiset(int fromIndex, int toIndex, IntFunction<Multiset<java.lang.Byte>> supplier)
toMultiset
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
public <K,V,E extends java.lang.Exception,E2 extends java.lang.Exception> java.util.Map<K,V> toMap(Try.ByteFunction<? extends K,E> keyExtractor, Try.ByteFunction<? extends V,E2> valueMapper) throws E extends java.lang.Exception, E2 extends java.lang.Exception
E extends java.lang.Exception
public <K,V,M extends java.util.Map<K,V>,E extends java.lang.Exception,E2 extends java.lang.Exception> M toMap(Try.ByteFunction<? extends K,E> keyExtractor, Try.ByteFunction<? extends V,E2> valueMapper, IntFunction<M> mapFactory) throws E extends java.lang.Exception, E2 extends java.lang.Exception
E extends java.lang.Exception
public <K,V,E extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> java.util.Map<K,V> toMap(Try.ByteFunction<? extends K,E> keyExtractor, Try.ByteFunction<? extends V,E2> valueMapper, Try.BinaryOperator<V,E3> mergeFunction) throws E extends java.lang.Exception, E2 extends java.lang.Exception, E3 extends java.lang.Exception
E extends java.lang.Exception
public <K,V,M extends java.util.Map<K,V>,E extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> M toMap(Try.ByteFunction<? extends K,E> keyExtractor, Try.ByteFunction<? extends V,E2> valueMapper, Try.BinaryOperator<V,E3> mergeFunction, IntFunction<M> mapFactory) throws E extends java.lang.Exception, E2 extends java.lang.Exception, E3 extends java.lang.Exception
E extends java.lang.Exception
public <K,A,D,E extends java.lang.Exception> java.util.Map<K,D> toMap(Try.ByteFunction<? extends K,E> classifier, Collector<java.lang.Byte,A,D> downstream) throws E extends java.lang.Exception
E extends java.lang.Exception
public <K,A,D,M extends java.util.Map<K,D>,E extends java.lang.Exception> M toMap(Try.ByteFunction<? extends K,E> classifier, Collector<java.lang.Byte,A,D> downstream, IntFunction<M> mapFactory) throws E extends java.lang.Exception
E extends java.lang.Exception
public ByteIterator iterator()
public ByteStream stream()
public ByteStream stream(int fromIndex, int toIndex)
public <R,E extends java.lang.Exception> R apply(Try.Function<? super ByteList,R,E> func) throws E extends java.lang.Exception
apply
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
E extends java.lang.Exception
public <E extends java.lang.Exception> void accept(Try.Consumer<? super ByteList,E> action) throws E extends java.lang.Exception
accept
in class PrimitiveList<java.lang.Byte,byte[],ByteList>
E extends java.lang.Exception
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object