Class SynchronizedShortIterable
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.SynchronizedShortIterable
-
- All Implemented Interfaces:
Serializable,PrimitiveIterable,ShortIterable
public class SynchronizedShortIterable extends Object implements ShortIterable, Serializable
A synchronized view of a ShortIterable. This file was automatically generated from template file synchronizedPrimitiveIterable.stg.- Since:
- 5.0.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(ShortPredicate predicate)booleananySatisfy(ShortPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyShortIterableasLazy()doubleaverage()RichIterable<ShortIterable>chunk(int size)<V> RichIterable<V>collect(ShortToObjectFunction<? extends V> function)booleancontains(short value)booleancontainsAll(short... source)booleancontainsAll(ShortIterable source)booleancontainsAny(short... source)booleancontainsAny(ShortIterable source)booleancontainsNone(short... source)booleancontainsNone(ShortIterable source)intcount(ShortPredicate predicate)shortdetectIfNone(ShortPredicate predicate, short ifNone)voideach(ShortProcedure procedure)<T> TinjectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)booleanisEmpty()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)shortmax()shortmaxIfEmpty(short defaultValue)doublemedian()shortmin()shortminIfEmpty(short defaultValue)booleannoneSatisfy(ShortPredicate predicate)booleannotEmpty()static SynchronizedShortIterableof(ShortIterable iterable)This method will take a ShortIterable and wrap it directly in a SynchronizedShortIterable.static SynchronizedShortIterableof(ShortIterable iterable, Object lock)This method will take a ShortIterable and wrap it directly in a SynchronizedShortIterable.longreduce(LongShortToLongFunction accumulator)longreduceIfEmpty(LongShortToLongFunction accumulator, long defaultValue)ShortIterablereject(ShortPredicate predicate)ShortIterableselect(ShortPredicate predicate)ShortIteratorshortIterator()Must be called in a synchronized block.intsize()longsum()short[]toArray()short[]toArray(short[] target)MutableShortBagtoBag()MutableShortListtoList()MutableShortSettoSet()short[]toSortedArray()MutableShortListtoSortedList()StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reject, select, summaryStatistics, tap, toSortedList, toSortedListBy, toSortedListBy
-
-
-
-
Method Detail
-
of
public static SynchronizedShortIterable of(ShortIterable iterable)
This method will take a ShortIterable and wrap it directly in a SynchronizedShortIterable.
-
of
public static SynchronizedShortIterable of(ShortIterable iterable, Object lock)
This method will take a ShortIterable and wrap it directly in a SynchronizedShortIterable. Additionally, a developer specifies which lock to use with the collection.
-
toArray
public short[] toArray()
- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] target)
- Specified by:
toArrayin interfaceShortIterable
-
contains
public boolean contains(short value)
- Specified by:
containsin interfaceShortIterable
-
containsAll
public boolean containsAll(short... source)
- Specified by:
containsAllin interfaceShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
- Specified by:
containsAllin interfaceShortIterable
-
containsAny
public boolean containsAny(short... source)
- Specified by:
containsAnyin interfaceShortIterable
-
containsAny
public boolean containsAny(ShortIterable source)
- Specified by:
containsAnyin interfaceShortIterable
-
containsNone
public boolean containsNone(short... source)
- Specified by:
containsNonein interfaceShortIterable
-
containsNone
public boolean containsNone(ShortIterable source)
- Specified by:
containsNonein interfaceShortIterable
-
each
public void each(ShortProcedure procedure)
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
select
public ShortIterable select(ShortPredicate predicate)
- Specified by:
selectin interfaceShortIterable
-
reject
public ShortIterable reject(ShortPredicate predicate)
- Specified by:
rejectin interfaceShortIterable
-
collect
public <V> RichIterable<V> collect(ShortToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceShortIterable
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNonein interfaceShortIterable
-
count
public int count(ShortPredicate predicate)
- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
public boolean noneSatisfy(ShortPredicate predicate)
- Specified by:
noneSatisfyin interfaceShortIterable
-
toList
public MutableShortList toList()
- Specified by:
toListin interfaceShortIterable
-
toSet
public MutableShortSet toSet()
- Specified by:
toSetin interfaceShortIterable
-
toBag
public MutableShortBag toBag()
- Specified by:
toBagin interfaceShortIterable
-
asLazy
public LazyShortIterable asLazy()
- Specified by:
asLazyin interfaceShortIterable
-
sum
public long sum()
- Specified by:
sumin interfaceShortIterable
-
max
public short max()
- Specified by:
maxin interfaceShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue)
- Specified by:
maxIfEmptyin interfaceShortIterable
-
min
public short min()
- Specified by:
minin interfaceShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue)
- Specified by:
minIfEmptyin interfaceShortIterable
-
average
public double average()
- Specified by:
averagein interfaceShortIterable
-
median
public double median()
- Specified by:
medianin interfaceShortIterable
-
toSortedArray
public short[] toSortedArray()
- Specified by:
toSortedArrayin interfaceShortIterable
-
toSortedList
public MutableShortList toSortedList()
- Specified by:
toSortedListin interfaceShortIterable
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceShortIterable
-
reduce
public long reduce(LongShortToLongFunction accumulator)
- Specified by:
reducein interfaceShortIterable
-
reduceIfEmpty
public long reduceIfEmpty(LongShortToLongFunction accumulator, long defaultValue)
- Specified by:
reduceIfEmptyin interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
- Specified by:
chunkin interfaceShortIterable
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
shortIterator
public ShortIterator shortIterator()
Must be called in a synchronized block.- Specified by:
shortIteratorin interfaceShortIterable
-
-