Class UnmodifiableByteList
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableByteCollection
org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableByteList
- All Implemented Interfaces:
Serializable
,ByteIterable
,MutableByteCollection
,ByteList
,MutableByteList
,OrderedByteIterable
,ReversibleByteIterable
,PrimitiveIterable
public class UnmodifiableByteList
extends AbstractUnmodifiableByteCollection
implements MutableByteList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAllAtIndex
(int index, byte... source) boolean
addAllAtIndex
(int index, ByteIterable source) void
addAtIndex
(int index, byte element) int
binarySearch
(byte value) <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.<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.<V,
R extends Collection<V>>
RcollectWithIndex
(ByteIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.distinct()
long
dotProduct
(ByteList list) boolean
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex
(ByteIntProcedure procedure) byte
get
(int index) byte
getFirst()
byte
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf
(byte value) <T> T
injectIntoWithIndex
(T injectedValue, ObjectByteIntToObjectFunction<? super T, ? extends T> function) int
lastIndexOf
(byte value) 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.rejectWithIndex
(ByteIntPredicate predicate) Returns a new MutableByteList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableByteCollection>
RrejectWithIndex
(ByteIntPredicate predicate, R target) Returns a new MutableByteCollection 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.selectWithIndex
(ByteIntPredicate predicate) Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.<R extends MutableByteCollection>
RselectWithIndex
(ByteIntPredicate predicate, R target) Returns a new MutableByteCollection including all elements with corresponding indexes matching the specified predicate.byte
set
(int index, byte element) 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).subList
(int fromIndex, int toIndex) Returns an immutable copy of this list.with
(byte element) withAll
(ByteIterable elements) without
(byte element) withoutAll
(ByteIterable elements) <T> MutableList<ByteObjectPair<T>>
Returns aMutableList
formed from thisMutableByteList
and aListIterable
by combining corresponding elements in pairs.zipByte
(ByteIterable iterable) Returns aMutableList
formed from thisMutableByteList
and anotherByteList
by combining corresponding elements in pairs.Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableByteCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, byteIterator, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
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
forEachInBoth
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.list.primitive.MutableByteList
shuffleThis, sortThis, sortThisBy, sortThisBy, swap, tap
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
UnmodifiableByteList
-
-
Method Details
-
get
public byte get(int index) -
getFirst
public byte getFirst()- Specified by:
getFirst
in interfaceOrderedByteIterable
-
getLast
public byte getLast()- Specified by:
getLast
in interfaceReversibleByteIterable
-
indexOf
public int indexOf(byte value) - Specified by:
indexOf
in interfaceOrderedByteIterable
-
lastIndexOf
public int lastIndexOf(byte value) - Specified by:
lastIndexOf
in interfaceByteList
-
addAtIndex
public void addAtIndex(int index, byte element) - Specified by:
addAtIndex
in interfaceMutableByteList
-
addAllAtIndex
public boolean addAllAtIndex(int index, byte... source) - Specified by:
addAllAtIndex
in interfaceMutableByteList
-
addAllAtIndex
- Specified by:
addAllAtIndex
in interfaceMutableByteList
-
removeAtIndex
public byte removeAtIndex(int index) - Specified by:
removeAtIndex
in interfaceMutableByteList
-
set
public byte set(int index, byte element) - Specified by:
set
in interfaceMutableByteList
-
with
- Specified by:
with
in interfaceMutableByteCollection
- Specified by:
with
in interfaceMutableByteList
- Overrides:
with
in classAbstractUnmodifiableByteCollection
-
without
- Specified by:
without
in interfaceMutableByteCollection
- Specified by:
without
in interfaceMutableByteList
- Overrides:
without
in classAbstractUnmodifiableByteCollection
-
withAll
- Specified by:
withAll
in interfaceMutableByteCollection
- Specified by:
withAll
in interfaceMutableByteList
- Overrides:
withAll
in classAbstractUnmodifiableByteCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableByteCollection
- Specified by:
withoutAll
in interfaceMutableByteList
- Overrides:
withoutAll
in classAbstractUnmodifiableByteCollection
-
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 interfaceMutableByteList
- Specified by:
select
in interfaceOrderedByteIterable
- Specified by:
select
in interfaceReversibleByteIterable
- Overrides:
select
in classAbstractUnmodifiableByteCollection
-
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 interfaceMutableByteList
- Specified by:
reject
in interfaceOrderedByteIterable
- Specified by:
reject
in interfaceReversibleByteIterable
- Overrides:
reject
in classAbstractUnmodifiableByteCollection
-
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 interfaceMutableByteList
- Specified by:
collect
in interfaceOrderedByteIterable
- Specified by:
collect
in interfaceReversibleByteIterable
- Overrides:
collect
in classAbstractUnmodifiableByteCollection
-
sortThis
Description copied from interface:MutableByteList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableByteList
-
shuffleThis
Description copied from interface:MutableByteList
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness.- Specified by:
shuffleThis
in interfaceMutableByteList
-
binarySearch
public int binarySearch(byte value) - Specified by:
binarySearch
in interfaceByteList
-
dotProduct
- Specified by:
dotProduct
in interfaceByteList
-
equals
Description copied from interface:ByteList
Follows the same general contract asList.equals(Object)
. -
hashCode
public int hashCode()Description copied from interface:ByteList
Follows the same general contract asList.hashCode()
. -
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableByteCollection
- Specified by:
asUnmodifiable
in interfaceMutableByteList
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableByteCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableByteCollection
- Specified by:
asSynchronized
in interfaceMutableByteList
- Overrides:
asSynchronized
in classAbstractUnmodifiableByteCollection
-
toImmutable
Description copied from interface:MutableByteList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceByteList
- Specified by:
toImmutable
in interfaceMutableByteCollection
- Specified by:
toImmutable
in interfaceMutableByteList
- Overrides:
toImmutable
in classAbstractUnmodifiableByteCollection
-
newEmpty
Description copied from interface:MutableByteList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableByteCollection
- Specified by:
newEmpty
in interfaceMutableByteList
- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThis
in interfaceMutableByteList
-
toReversed
- Specified by:
toReversed
in interfaceByteList
- Specified by:
toReversed
in interfaceMutableByteList
- Specified by:
toReversed
in interfaceReversibleByteIterable
-
forEachWithIndex
- Specified by:
forEachWithIndex
in interfaceOrderedByteIterable
-
asReversed
- Specified by:
asReversed
in interfaceReversibleByteIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndex
in interfaceOrderedByteIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleByteIterable
-
distinct
- Specified by:
distinct
in interfaceByteList
- Specified by:
distinct
in interfaceMutableByteList
- Specified by:
distinct
in interfaceReversibleByteIterable
- Since:
- 6.0.
-
subList
- Specified by:
subList
in interfaceByteList
- Specified by:
subList
in interfaceMutableByteList
- See Also:
-
zipByte
Description copied from interface:MutableByteList
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.- Specified by:
zipByte
in interfaceByteList
- Specified by:
zipByte
in interfaceMutableByteList
- Since:
- 9.1.
-
zip
Description copied from interface:MutableByteList
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.- Specified by:
zip
in interfaceByteList
- Specified by:
zip
in interfaceMutableByteList
- Since:
- 9.1.
-
selectWithIndex
Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceByteList
- Specified by:
selectWithIndex
in interfaceMutableByteList
- Specified by:
selectWithIndex
in interfaceOrderedByteIterable
- Specified by:
selectWithIndex
in interfaceReversibleByteIterable
- Since:
- 11.1.
-
selectWithIndex
Returns a new MutableByteCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedByteIterable
- 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 interfaceMutableByteList
- Specified by:
rejectWithIndex
in interfaceOrderedByteIterable
- Specified by:
rejectWithIndex
in interfaceReversibleByteIterable
- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableByteCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedByteIterable
- Since:
- 11.1.
-
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 interfaceMutableByteList
- Specified by:
collectWithIndex
in interfaceOrderedByteIterable
- Specified by:
collectWithIndex
in interfaceReversibleByteIterable
- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(ByteIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedByteIterable
- Since:
- 9.1.
-