Interface MutableByteList
- All Superinterfaces:
ByteIterable,ByteList,MutableByteCollection,OrderedByteIterable,PrimitiveIterable,ReversibleByteIterable
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllAtIndex(int index, byte... source) booleanaddAllAtIndex(int index, ByteIterable source) voidaddAtIndex(int index, byte element) boxed()<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 MutableByteListnewEmpty()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 MutableByteListrejectWithIndex(ByteIntPredicate predicate) Returns a new MutableByteList excluding all elements with corresponding indexes matching the specified predicate.byteremoveAtIndex(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 MutableByteListselectWithIndex(ByteIntPredicate predicate) Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.byteset(int index, byte element) default MutableByteListRandomly permutes this list mutating its contents and returns the same list (this).default MutableByteListshuffleThis(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 MutableByteListsortThis(ByteComparator comparator) Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableByteListsortThisBy(ByteToObjectFunction<T> function) Sorts the internal data structure of this list based on the natural order of the key returned byfunction.default <T> MutableByteListsortThisBy(ByteToObjectFunction<T> function, Comparator<? super T> comparator) Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.subList(int fromIndex, int toIndex) default voidswap(int index1, int index2) default MutableByteListtap(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 aMutableListformed from thisMutableByteListand aListIterableby combining corresponding elements in pairs.default MutableList<ByteBytePair>zipByte(ByteIterable iterable) Returns aMutableListformed from thisMutableByteListand anotherByteListby 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.ByteList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOfMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableByteCollection
add, addAll, addAll, byteIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAllMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedByteIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndex, toStackMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringMethods 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) -
boxed
MutableList<Byte> boxed() -
swap
default void swap(int index1, int index2) -
select
Description copied from interface:ByteIterableReturns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteList- Specified by:
selectin interfaceMutableByteCollection- Specified by:
selectin interfaceOrderedByteIterable- Specified by:
selectin interfaceReversibleByteIterable
-
reject
Description copied from interface:ByteIterableReturns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteList- Specified by:
rejectin interfaceMutableByteCollection- Specified by:
rejectin interfaceOrderedByteIterable- Specified by:
rejectin interfaceReversibleByteIterable
-
with
- Specified by:
within interfaceMutableByteCollection
-
without
- Specified by:
withoutin interfaceMutableByteCollection
-
withAll
- Specified by:
withAllin interfaceMutableByteCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableByteCollection
-
tap
- Specified by:
tapin interfaceByteIterable- Specified by:
tapin interfaceByteList- Specified by:
tapin interfaceMutableByteCollection- Since:
- 9.0.
-
selectWithIndex
Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceByteList- Specified by:
selectWithIndexin interfaceOrderedByteIterable- Specified by:
selectWithIndexin interfaceReversibleByteIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableByteList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceByteList- Specified by:
rejectWithIndexin interfaceOrderedByteIterable- Specified by:
rejectWithIndexin interfaceReversibleByteIterable- Since:
- 11.1.
-
collect
Description copied from interface:ByteIterableReturns 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:
collectin interfaceByteIterable- Specified by:
collectin interfaceByteList- Specified by:
collectin interfaceMutableByteCollection- Specified by:
collectin interfaceOrderedByteIterable- Specified by:
collectin interfaceReversibleByteIterable
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceByteList- Specified by:
collectWithIndexin interfaceOrderedByteIterable- Specified by:
collectWithIndexin interfaceReversibleByteIterable- Since:
- 9.1.
-
reverseThis
MutableByteList reverseThis() -
toReversed
MutableByteList toReversed()- Specified by:
toReversedin interfaceByteList- Specified by:
toReversedin interfaceReversibleByteIterable
-
distinct
MutableByteList distinct()- Specified by:
distinctin interfaceByteList- Specified by:
distinctin 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 byfunctionusing the providedcomparator. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas 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:
asUnmodifiablein interfaceMutableByteCollection
-
asSynchronized
MutableByteList asSynchronized()- Specified by:
asSynchronizedin interfaceMutableByteCollection
-
toImmutable
ImmutableByteList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutablein interfaceByteList- Specified by:
toImmutablein interfaceMutableByteCollection
-
subList
-
zipByte
Returns aMutableListformed from thisMutableByteListand anotherByteListby combining corresponding elements in pairs. If one of the twoByteLists is longer than the other, its remaining elements are ignored. -
zip
Returns aMutableListformed from thisMutableByteListand aListIterableby 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:
newEmptyin interfaceMutableByteCollection- Since:
- 9.2.
-