Class SynchronizedIntIterable
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.SynchronizedIntIterable
-
- All Implemented Interfaces:
Serializable,IntIterable,PrimitiveIterable
public class SynchronizedIntIterable extends Object implements IntIterable, Serializable
A synchronized view of a IntIterable. 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(IntPredicate predicate)booleananySatisfy(IntPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyIntIterableasLazy()doubleaverage()RichIterable<IntIterable>chunk(int size)<V> RichIterable<V>collect(IntToObjectFunction<? extends V> function)booleancontains(int value)booleancontainsAll(int... source)booleancontainsAll(IntIterable source)booleancontainsAny(int... source)booleancontainsAny(IntIterable source)booleancontainsNone(int... source)booleancontainsNone(IntIterable source)intcount(IntPredicate predicate)intdetectIfNone(IntPredicate predicate, int ifNone)voideach(IntProcedure procedure)<T> TinjectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)IntIteratorintIterator()Must be called in a synchronized block.booleanisEmpty()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)intmax()intmaxIfEmpty(int defaultValue)doublemedian()intmin()intminIfEmpty(int defaultValue)booleannoneSatisfy(IntPredicate predicate)booleannotEmpty()static SynchronizedIntIterableof(IntIterable iterable)This method will take a IntIterable and wrap it directly in a SynchronizedIntIterable.static SynchronizedIntIterableof(IntIterable iterable, Object lock)This method will take a IntIterable and wrap it directly in a SynchronizedIntIterable.longreduce(LongIntToLongFunction accumulator)longreduceIfEmpty(LongIntToLongFunction accumulator, long defaultValue)IntIterablereject(IntPredicate predicate)IntIterableselect(IntPredicate predicate)intsize()longsum()int[]toArray()int[]toArray(int[] target)MutableIntBagtoBag()MutableIntListtoList()MutableIntSettoSet()int[]toSortedArray()MutableIntListtoSortedList()StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
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 SynchronizedIntIterable of(IntIterable iterable)
This method will take a IntIterable and wrap it directly in a SynchronizedIntIterable.
-
of
public static SynchronizedIntIterable of(IntIterable iterable, Object lock)
This method will take a IntIterable and wrap it directly in a SynchronizedIntIterable. Additionally, a developer specifies which lock to use with the collection.
-
toArray
public int[] toArray()
- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArrayin interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
containsin interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAllin interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAllin interfaceIntIterable
-
containsAny
public boolean containsAny(int... source)
- Specified by:
containsAnyin interfaceIntIterable
-
containsAny
public boolean containsAny(IntIterable source)
- Specified by:
containsAnyin interfaceIntIterable
-
containsNone
public boolean containsNone(int... source)
- Specified by:
containsNonein interfaceIntIterable
-
containsNone
public boolean containsNone(IntIterable source)
- Specified by:
containsNonein interfaceIntIterable
-
each
public void each(IntProcedure procedure)
- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
select
public IntIterable select(IntPredicate predicate)
- Specified by:
selectin interfaceIntIterable
-
reject
public IntIterable reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntIterable
-
collect
public <V> RichIterable<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntIterable
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNonein interfaceIntIterable
-
count
public int count(IntPredicate predicate)
- Specified by:
countin interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfyin interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toListin interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSetin interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBagin interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazyin interfaceIntIterable
-
sum
public long sum()
- Specified by:
sumin interfaceIntIterable
-
max
public int max()
- Specified by:
maxin interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmptyin interfaceIntIterable
-
min
public int min()
- Specified by:
minin interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmptyin interfaceIntIterable
-
average
public double average()
- Specified by:
averagein interfaceIntIterable
-
median
public double median()
- Specified by:
medianin interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArrayin interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedListin interfaceIntIterable
-
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, ObjectIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceIntIterable
-
reduce
public long reduce(LongIntToLongFunction accumulator)
- Specified by:
reducein interfaceIntIterable
-
reduceIfEmpty
public long reduceIfEmpty(LongIntToLongFunction accumulator, long defaultValue)
- Specified by:
reduceIfEmptyin interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunkin interfaceIntIterable
-
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
-
intIterator
public IntIterator intIterator()
Must be called in a synchronized block.- Specified by:
intIteratorin interfaceIntIterable
-
-