Class SynchronizedByteList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.SynchronizedByteList
-
- All Implemented Interfaces:
Serializable,ByteIterable,MutableByteCollection,ByteList,MutableByteList,OrderedByteIterable,ReversibleByteIterable,PrimitiveIterable
public class SynchronizedByteList extends AbstractSynchronizedByteCollection implements MutableByteList
A synchronized view of aMutableByteList. It is imperative that the user manually synchronize on the on the collection when iterating over it using an iterator or stream.This file was automatically generated from template file synchronizedPrimitiveList.stg.
- Since:
- 3.1.
- See Also:
MutableByteList.asSynchronized(),MutableList.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedByteList(MutableByteList list)SynchronizedByteList(MutableByteList list, Object newLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllAtIndex(int index, byte... source)booleanaddAllAtIndex(int index, ByteIterable source)voidaddAtIndex(int index, byte element)LazyByteIterableasLazy()LazyByteIterableasReversed()MutableByteListasSynchronized()MutableByteListasUnmodifiable()intbinarySearch(byte value)MutableList<Byte>boxed()<V> MutableList<V>collect(ByteToObjectFunction<? extends V> function)<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.MutableByteListdistinct()longdotProduct(ByteList list)booleanequals(Object otherList)voidforEachInBoth(ByteList other, ByteByteProcedure procedure)voidforEachWithIndex(ByteIntProcedure procedure)byteget(int index)bytegetFirst()bytegetLast()inthashCode()intindexOf(byte value)<T> TinjectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T,? extends T> function)intlastIndexOf(byte value)MutableByteListnewEmpty()MutableByteListreject(BytePredicate predicate)MutableByteListrejectWithIndex(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.byteremoveAtIndex(int index)MutableByteListreverseThis()MutableByteListselect(BytePredicate predicate)MutableByteListselectWithIndex(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.byteset(int index, byte element)MutableByteListshuffleThis()MutableByteListshuffleThis(Random rnd)MutableByteListsortThis()MutableByteListsortThis(ByteComparator comparator)<T> MutableByteListsortThisBy(ByteToObjectFunction<T> function)<T> MutableByteListsortThisBy(ByteToObjectFunction<T> function, Comparator<? super T> comparator)MutableByteListsubList(int fromIndex, int toIndex)ImmutableByteListtoImmutable()MutableByteListtoReversed()SynchronizedByteListwith(byte element)SynchronizedByteListwithAll(ByteIterable elements)SynchronizedByteListwithout(byte element)SynchronizedByteListwithoutAll(ByteIterable elements)<T> MutableList<ByteObjectPair<T>>zip(Iterable<T> iterable)MutableList<ByteBytePair>zipByte(ByteIterable iterable)-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, 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, 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.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
swap, tap
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
SynchronizedByteList
public SynchronizedByteList(MutableByteList list)
-
SynchronizedByteList
public SynchronizedByteList(MutableByteList list, Object newLock)
-
-
Method Detail
-
getFirst
public byte getFirst()
- Specified by:
getFirstin interfaceOrderedByteIterable
-
getLast
public byte getLast()
- Specified by:
getLastin interfaceReversibleByteIterable
-
indexOf
public int indexOf(byte value)
- Specified by:
indexOfin interfaceOrderedByteIterable
-
lastIndexOf
public int lastIndexOf(byte value)
- Specified by:
lastIndexOfin interfaceByteList
-
addAtIndex
public void addAtIndex(int index, byte element)- Specified by:
addAtIndexin interfaceMutableByteList
-
addAllAtIndex
public boolean addAllAtIndex(int index, byte... source)- Specified by:
addAllAtIndexin interfaceMutableByteList
-
addAllAtIndex
public boolean addAllAtIndex(int index, ByteIterable source)- Specified by:
addAllAtIndexin interfaceMutableByteList
-
removeAtIndex
public byte removeAtIndex(int index)
- Specified by:
removeAtIndexin interfaceMutableByteList
-
set
public byte set(int index, byte element)- Specified by:
setin interfaceMutableByteList
-
with
public SynchronizedByteList with(byte element)
- Specified by:
within interfaceMutableByteCollection- Specified by:
within interfaceMutableByteList- Overrides:
within classAbstractSynchronizedByteCollection
-
without
public SynchronizedByteList without(byte element)
- Specified by:
withoutin interfaceMutableByteCollection- Specified by:
withoutin interfaceMutableByteList- Overrides:
withoutin classAbstractSynchronizedByteCollection
-
withAll
public SynchronizedByteList withAll(ByteIterable elements)
- Specified by:
withAllin interfaceMutableByteCollection- Specified by:
withAllin interfaceMutableByteList- Overrides:
withAllin classAbstractSynchronizedByteCollection
-
withoutAll
public SynchronizedByteList withoutAll(ByteIterable elements)
- Specified by:
withoutAllin interfaceMutableByteCollection- Specified by:
withoutAllin interfaceMutableByteList- Overrides:
withoutAllin classAbstractSynchronizedByteCollection
-
select
public MutableByteList select(BytePredicate predicate)
- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteList- Specified by:
selectin interfaceMutableByteCollection- Specified by:
selectin interfaceMutableByteList- Specified by:
selectin interfaceOrderedByteIterable- Specified by:
selectin interfaceReversibleByteIterable- Overrides:
selectin classAbstractSynchronizedByteCollection
-
boxed
public MutableList<Byte> boxed()
- Specified by:
boxedin interfaceMutableByteList
-
reject
public MutableByteList reject(BytePredicate predicate)
- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteList- Specified by:
rejectin interfaceMutableByteCollection- Specified by:
rejectin interfaceMutableByteList- Specified by:
rejectin interfaceOrderedByteIterable- Specified by:
rejectin interfaceReversibleByteIterable- Overrides:
rejectin classAbstractSynchronizedByteCollection
-
collect
public <V> MutableList<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceByteList- Specified by:
collectin interfaceMutableByteCollection- Specified by:
collectin interfaceMutableByteList- Specified by:
collectin interfaceOrderedByteIterable- Specified by:
collectin interfaceReversibleByteIterable- Overrides:
collectin classAbstractSynchronizedByteCollection
-
sortThis
public MutableByteList sortThis()
- Specified by:
sortThisin interfaceMutableByteList
-
sortThis
public MutableByteList sortThis(ByteComparator comparator)
- Specified by:
sortThisin interfaceMutableByteList
-
sortThisBy
public <T> MutableByteList sortThisBy(ByteToObjectFunction<T> function)
- Specified by:
sortThisByin interfaceMutableByteList
-
sortThisBy
public <T> MutableByteList sortThisBy(ByteToObjectFunction<T> function, Comparator<? super T> comparator)
- Specified by:
sortThisByin interfaceMutableByteList
-
shuffleThis
public MutableByteList shuffleThis()
- Specified by:
shuffleThisin interfaceMutableByteList
-
shuffleThis
public MutableByteList shuffleThis(Random rnd)
- Specified by:
shuffleThisin interfaceMutableByteList
-
binarySearch
public int binarySearch(byte value)
- Specified by:
binarySearchin interfaceByteList
-
dotProduct
public long dotProduct(ByteList list)
- Specified by:
dotProductin interfaceByteList
-
equals
public boolean equals(Object otherList)
-
hashCode
public int hashCode()
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazyin interfaceByteIterable- Overrides:
asLazyin classAbstractSynchronizedByteCollection
-
asUnmodifiable
public MutableByteList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableByteCollection- Specified by:
asUnmodifiablein interfaceMutableByteList- Overrides:
asUnmodifiablein classAbstractSynchronizedByteCollection
-
asSynchronized
public MutableByteList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableByteCollection- Specified by:
asSynchronizedin interfaceMutableByteList- Overrides:
asSynchronizedin classAbstractSynchronizedByteCollection
-
toImmutable
public ImmutableByteList toImmutable()
- Specified by:
toImmutablein interfaceByteList- Specified by:
toImmutablein interfaceMutableByteCollection- Specified by:
toImmutablein interfaceMutableByteList- Overrides:
toImmutablein classAbstractSynchronizedByteCollection
-
newEmpty
public MutableByteList newEmpty()
- Specified by:
newEmptyin interfaceMutableByteCollection- Specified by:
newEmptyin interfaceMutableByteList- Since:
- 9.2.
-
reverseThis
public MutableByteList reverseThis()
- Specified by:
reverseThisin interfaceMutableByteList
-
toReversed
public MutableByteList toReversed()
- Specified by:
toReversedin interfaceByteList- Specified by:
toReversedin interfaceMutableByteList- Specified by:
toReversedin interfaceReversibleByteIterable
-
asReversed
public LazyByteIterable asReversed()
- Specified by:
asReversedin interfaceReversibleByteIterable
-
forEachInBoth
public void forEachInBoth(ByteList other, ByteByteProcedure procedure)
- Specified by:
forEachInBothin interfaceByteList
-
forEachWithIndex
public void forEachWithIndex(ByteIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedByteIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndexin interfaceOrderedByteIterable- Specified by:
injectIntoWithIndexin interfaceReversibleByteIterable
-
distinct
public MutableByteList distinct()
- Specified by:
distinctin interfaceByteList- Specified by:
distinctin interfaceMutableByteList- Specified by:
distinctin interfaceReversibleByteIterable- Since:
- 6.0.
-
subList
public MutableByteList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceByteList- Specified by:
subListin interfaceMutableByteList
-
zipByte
public MutableList<ByteBytePair> zipByte(ByteIterable iterable)
- Specified by:
zipBytein interfaceByteList- Specified by:
zipBytein interfaceMutableByteList- Since:
- 9.1.
-
zip
public <T> MutableList<ByteObjectPair<T>> zip(Iterable<T> iterable)
- Specified by:
zipin interfaceByteList- Specified by:
zipin interfaceMutableByteList- Since:
- 9.1.
-
selectWithIndex
public MutableByteList selectWithIndex(ByteIntPredicate predicate)
Returns a new MutableByteList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceByteList- Specified by:
selectWithIndexin interfaceMutableByteList- Specified by:
selectWithIndexin interfaceOrderedByteIterable- Specified by:
selectWithIndexin interfaceReversibleByteIterable- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableByteCollection> R selectWithIndex(ByteIntPredicate predicate, R target)
Returns a new MutableByteCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedByteIterable- Since:
- 11.1.
-
rejectWithIndex
public MutableByteList rejectWithIndex(ByteIntPredicate predicate)
Returns a new MutableByteList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceByteList- Specified by:
rejectWithIndexin interfaceMutableByteList- Specified by:
rejectWithIndexin interfaceOrderedByteIterable- Specified by:
rejectWithIndexin interfaceReversibleByteIterable- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableByteCollection> R rejectWithIndex(ByteIntPredicate predicate, R target)
Returns a new MutableByteCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedByteIterable- Since:
- 11.1.
-
collectWithIndex
public <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.- Specified by:
collectWithIndexin interfaceByteList- Specified by:
collectWithIndexin interfaceMutableByteList- Specified by:
collectWithIndexin interfaceOrderedByteIterable- Specified by:
collectWithIndexin 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:
collectWithIndexin interfaceOrderedByteIterable- Since:
- 9.1.
-
-