Interface MutableByteList
- All Superinterfaces:
ByteIterable
,ByteList
,MutableByteCollection
,OrderedByteIterable
,PrimitiveIterable
,ReversibleByteIterable
- All Known Implementing Classes:
ByteArrayList
,SynchronizedByteList
,UnmodifiableByteList
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAllAtIndex
(int index, byte... source) boolean
addAllAtIndex
(int index, ByteIterable source) void
addAtIndex
(int index, byte element) <V> MutableList<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> MutableList<V>
collectWithIndex
(ByteIntToObjectFunction<? extends V> function) Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.distinct()
default MutableByteList
newEmpty()
Creates a new empty mutable version of the same List type.reject
(BytePredicate predicate) Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.default MutableByteList
rejectWithIndex
(ByteIntPredicate predicate) Returns a new MutableByteList excluding all elements with corresponding indexes matching the specified predicate.byte
removeAtIndex
(int index) select
(BytePredicate predicate) Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.default MutableByteList
selectWithIndex
(ByteIntPredicate predicate) Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.byte
set
(int index, byte element) default MutableByteList
Randomly permutes this list mutating its contents and returns the same list (this).default MutableByteList
shuffleThis
(Random rnd) Randomly permutes this list mutating its contents and returns the same list (this).sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).default MutableByteList
sortThis
(ByteComparator comparator) Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableByteList
sortThisBy
(ByteToObjectFunction<T> function) Sorts the internal data structure of this list based on the natural order of the key returned byfunction
.default <T> MutableByteList
sortThisBy
(ByteToObjectFunction<T> function, Comparator<? super T> comparator) Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.subList
(int fromIndex, int toIndex) default void
swap
(int index1, int index2) default MutableByteList
tap
(ByteProcedure procedure) Returns an immutable copy of this list.with
(byte element) withAll
(ByteIterable elements) without
(byte element) withoutAll
(ByteIterable elements) default <T> MutableList<ByteObjectPair<T>>
Returns aMutableList
formed from thisMutableByteList
and aListIterable
by combining corresponding elements in pairs.default MutableList<ByteBytePair>
zipByte
(ByteIterable iterable) Returns aMutableList
formed from thisMutableByteList
and anotherByteList
by combining corresponding elements in pairs.Methods inherited from interface org.eclipse.collections.api.ByteIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, 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.list.primitive.ByteList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableByteCollection
add, addAll, addAll, byteIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll
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 Details
-
addAtIndex
void addAtIndex(int index, byte element) -
addAllAtIndex
boolean addAllAtIndex(int index, byte... source) -
addAllAtIndex
-
removeAtIndex
byte removeAtIndex(int index) -
set
byte set(int index, byte element) -
swap
default void swap(int index1, int index2) -
select
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 interfaceByteList
- Specified by:
select
in interfaceMutableByteCollection
- Specified by:
select
in interfaceOrderedByteIterable
- Specified by:
select
in interfaceReversibleByteIterable
-
reject
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 interfaceByteList
- Specified by:
reject
in interfaceMutableByteCollection
- Specified by:
reject
in interfaceOrderedByteIterable
- Specified by:
reject
in interfaceReversibleByteIterable
-
with
- Specified by:
with
in interfaceMutableByteCollection
-
without
- Specified by:
without
in interfaceMutableByteCollection
-
withAll
- Specified by:
withAll
in interfaceMutableByteCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableByteCollection
-
tap
- Specified by:
tap
in interfaceByteIterable
- Specified by:
tap
in interfaceByteList
- Specified by:
tap
in interfaceMutableByteCollection
- Since:
- 9.0.
-
selectWithIndex
Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceByteList
- Specified by:
selectWithIndex
in interfaceOrderedByteIterable
- Specified by:
selectWithIndex
in interfaceReversibleByteIterable
- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableByteList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceByteList
- Specified by:
rejectWithIndex
in interfaceOrderedByteIterable
- Specified by:
rejectWithIndex
in interfaceReversibleByteIterable
- Since:
- 11.1.
-
collect
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 interfaceByteList
- Specified by:
collect
in interfaceMutableByteCollection
- Specified by:
collect
in interfaceOrderedByteIterable
- Specified by:
collect
in interfaceReversibleByteIterable
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceByteList
- Specified by:
collectWithIndex
in interfaceOrderedByteIterable
- Specified by:
collectWithIndex
in interfaceReversibleByteIterable
- Since:
- 9.1.
-
reverseThis
MutableByteList reverseThis() -
toReversed
MutableByteList toReversed()- Specified by:
toReversed
in interfaceByteList
- Specified by:
toReversed
in interfaceReversibleByteIterable
-
distinct
MutableByteList distinct()- Specified by:
distinct
in interfaceByteList
- Specified by:
distinct
in interfaceReversibleByteIterable
- Since:
- 6.0.
-
sortThis
MutableByteList sortThis()Sorts this list mutating its contents and returns the same mutable list (this). -
sortThis
Sorts the internal data structure of this list and returns the list itself as a convenience. -
sortThisBy
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
. -
sortThisBy
default <T> MutableByteList sortThisBy(ByteToObjectFunction<T> function, Comparator<? super T> comparator) Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Implements the Fisher-Yates shuffle algorithm using the provided source of randomness. -
asUnmodifiable
MutableByteList asUnmodifiable()- Specified by:
asUnmodifiable
in interfaceMutableByteCollection
-
asSynchronized
MutableByteList asSynchronized()- Specified by:
asSynchronized
in interfaceMutableByteCollection
-
toImmutable
ImmutableByteList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceByteList
- Specified by:
toImmutable
in interfaceMutableByteCollection
-
subList
-
zipByte
Returns aMutableList
formed from thisMutableByteList
and anotherByteList
by combining corresponding elements in pairs. If one of the twoByteList
s is longer than the other, its remaining elements are ignored. -
zip
Returns aMutableList
formed from thisMutableByteList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored. -
newEmpty
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableByteCollection
- Since:
- 9.2.
-