Interface ByteList
-
- All Superinterfaces:
ByteIterable
,OrderedByteIterable
,PrimitiveIterable
,ReversibleByteIterable
- All Known Subinterfaces:
ImmutableByteList
,MutableByteList
- All Known Implementing Classes:
ByteArrayList
,ImmutableByteArrayList
,ImmutableByteEmptyList
,ImmutableByteSingletonList
,SynchronizedByteList
,UnmodifiableByteList
public interface ByteList extends ReversibleByteIterable
This file was automatically generated from template file primitiveList.stg.- Since:
- 3.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
binarySearch(byte value)
<V> ListIterable<V>
collect(ByteToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.default <V> ListIterable<V>
collectWithIndex(ByteIntToObjectFunction<? extends V> function)
Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.ByteList
distinct()
long
dotProduct(ByteList list)
boolean
equals(java.lang.Object o)
Follows the same general contract asList.equals(Object)
.default void
forEachInBoth(ByteList other, ByteByteProcedure procedure)
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.byte
get(int index)
int
hashCode()
Follows the same general contract asList.hashCode()
.int
lastIndexOf(byte value)
ByteList
reject(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.default ByteList
rejectWithIndex(ByteIntPredicate predicate)
Returns a new ByteList excluding all elements with corresponding indexes matching the specified predicate.ByteList
select(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.default ByteList
selectWithIndex(ByteIntPredicate predicate)
Returns a new ByteList including all elements with corresponding indexes matching the specified predicate.ByteList
subList(int fromIndex, int toIndex)
default ByteList
tap(ByteProcedure procedure)
ImmutableByteList
toImmutable()
Returns an immutable copy of this list.ByteList
toReversed()
default <T> ListIterable<ByteObjectPair<T>>
zip(java.lang.Iterable<T> iterable)
Returns aListIterable
formed from thisByteList
and aListIterable
by combining corresponding elements in pairs.default ListIterable<ByteBytePair>
zipByte(ByteIterable iterable)
Returns aListIterable
formed from thisByteList
and anotherByteList
by combining corresponding elements in pairs.-
Methods inherited from interface org.eclipse.collections.api.ByteIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, byteIterator, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedByteIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.ReversibleByteIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
get
byte get(int index)
-
dotProduct
long dotProduct(ByteList list)
-
binarySearch
int binarySearch(byte value)
-
lastIndexOf
int lastIndexOf(byte value)
-
select
ByteList select(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
select
in interfaceByteIterable
- Specified by:
select
in interfaceOrderedByteIterable
- Specified by:
select
in interfaceReversibleByteIterable
-
reject
ByteList reject(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
reject
in interfaceByteIterable
- Specified by:
reject
in interfaceOrderedByteIterable
- Specified by:
reject
in interfaceReversibleByteIterable
-
tap
default ByteList tap(ByteProcedure procedure)
- Specified by:
tap
in interfaceByteIterable
- Since:
- 9.0.
-
forEachInBoth
default void forEachInBoth(ByteList other, ByteByteProcedure procedure)
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.- Since:
- 11.1
-
selectWithIndex
default ByteList selectWithIndex(ByteIntPredicate predicate)
Returns a new ByteList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedByteIterable
- Specified by:
selectWithIndex
in interfaceReversibleByteIterable
- Since:
- 11.1.
-
rejectWithIndex
default ByteList rejectWithIndex(ByteIntPredicate predicate)
Returns a new ByteList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedByteIterable
- Specified by:
rejectWithIndex
in interfaceReversibleByteIterable
- Since:
- 11.1.
-
collect
<V> ListIterable<V> collect(ByteToObjectFunction<? extends V> function)
Description copied from interface:ByteIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceByteIterable
- Specified by:
collect
in interfaceOrderedByteIterable
- Specified by:
collect
in interfaceReversibleByteIterable
-
collectWithIndex
default <V> ListIterable<V> collectWithIndex(ByteIntToObjectFunction<? extends V> function)
Returns a new ListIterable using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedByteIterable
- Specified by:
collectWithIndex
in interfaceReversibleByteIterable
- Since:
- 9.1.
-
equals
boolean equals(java.lang.Object o)
Follows the same general contract asList.equals(Object)
.- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
Follows the same general contract asList.hashCode()
.- Overrides:
hashCode
in classjava.lang.Object
-
toImmutable
ImmutableByteList toImmutable()
Returns an immutable copy of this list. If the list is immutable, it returns itself.
-
distinct
ByteList distinct()
- Specified by:
distinct
in interfaceReversibleByteIterable
- Since:
- 6.0.
-
toReversed
ByteList toReversed()
- Specified by:
toReversed
in interfaceReversibleByteIterable
- Since:
- 5.0.
-
subList
ByteList subList(int fromIndex, int toIndex)
- Since:
- 5.0.
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipByte
default ListIterable<ByteBytePair> zipByte(ByteIterable iterable)
Returns aListIterable
formed from thisByteList
and anotherByteList
by combining corresponding elements in pairs. If one of the twoByteList
s is longer than the other, its remaining elements are ignored.- Since:
- 9.1.
-
zip
default <T> ListIterable<ByteObjectPair<T>> zip(java.lang.Iterable<T> iterable)
Returns aListIterable
formed from thisByteList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Since:
- 9.1.
-
-