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:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UnmodifiableByteList(MutableByteList list)
-
Method Summary
Modifier and Type Method Description boolean
addAllAtIndex(int index, byte... source)
boolean
addAllAtIndex(int index, ByteIterable source)
void
addAtIndex(int index, byte element)
LazyByteIterable
asReversed()
MutableByteList
asSynchronized()
MutableByteList
asUnmodifiable()
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.MutableByteList
distinct()
long
dotProduct(ByteList list)
boolean
equals(Object otherList)
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)
MutableByteList
newEmpty()
Creates a new empty mutable version of the same List type.MutableByteList
reject(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.byte
removeAtIndex(int index)
MutableByteList
reverseThis()
MutableByteList
select(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.byte
set(int index, byte element)
MutableByteList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).MutableByteList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).MutableByteList
subList(int fromIndex, int toIndex)
ImmutableByteList
toImmutable()
Returns an immutable copy of this list.MutableByteList
toReversed()
UnmodifiableByteList
with(byte element)
UnmodifiableByteList
withAll(ByteIterable elements)
UnmodifiableByteList
without(byte element)
UnmodifiableByteList
withoutAll(ByteIterable elements)
<T> MutableList<ByteObjectPair<T>>
zip(Iterable<T> iterable)
Returns aMutableList
formed from thisMutableByteList
and aListIterable
by combining corresponding elements in pairs.MutableList<ByteBytePair>
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, count, detectIfNone, each, forEach, 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, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
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
-
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:
List.subList(int fromIndex, int toIndex)
-
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.
-
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.
-