Class SynchronizedLongIterable
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.SynchronizedLongIterable
-
- All Implemented Interfaces:
Serializable,LongIterable,PrimitiveIterable
public class SynchronizedLongIterable extends Object implements LongIterable, Serializable
A synchronized view of a LongIterable. 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(LongPredicate predicate)booleananySatisfy(LongPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyLongIterableasLazy()doubleaverage()RichIterable<LongIterable>chunk(int size)<V> RichIterable<V>collect(LongToObjectFunction<? extends V> function)booleancontains(long value)booleancontainsAll(long... source)booleancontainsAll(LongIterable source)booleancontainsAny(long... source)booleancontainsAny(LongIterable source)booleancontainsNone(long... source)booleancontainsNone(LongIterable source)intcount(LongPredicate predicate)longdetectIfNone(LongPredicate predicate, long ifNone)voideach(LongProcedure procedure)<T> TinjectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)booleanisEmpty()LongIteratorlongIterator()Must be called in a synchronized block.StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)longmax()longmaxIfEmpty(long defaultValue)doublemedian()longmin()longminIfEmpty(long defaultValue)booleannoneSatisfy(LongPredicate predicate)booleannotEmpty()static SynchronizedLongIterableof(LongIterable iterable)This method will take a LongIterable and wrap it directly in a SynchronizedLongIterable.static SynchronizedLongIterableof(LongIterable iterable, Object lock)This method will take a LongIterable and wrap it directly in a SynchronizedLongIterable.longreduce(LongLongToLongFunction accumulator)longreduceIfEmpty(LongLongToLongFunction accumulator, long defaultValue)LongIterablereject(LongPredicate predicate)LongIterableselect(LongPredicate predicate)intsize()longsum()long[]toArray()long[]toArray(long[] target)MutableLongBagtoBag()MutableLongListtoList()MutableLongSettoSet()long[]toSortedArray()MutableLongListtoSortedList()StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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 SynchronizedLongIterable of(LongIterable iterable)
This method will take a LongIterable and wrap it directly in a SynchronizedLongIterable.
-
of
public static SynchronizedLongIterable of(LongIterable iterable, Object lock)
This method will take a LongIterable and wrap it directly in a SynchronizedLongIterable. Additionally, a developer specifies which lock to use with the collection.
-
toArray
public long[] toArray()
- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value)
- Specified by:
containsin interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAllin interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAllin interfaceLongIterable
-
containsAny
public boolean containsAny(long... source)
- Specified by:
containsAnyin interfaceLongIterable
-
containsAny
public boolean containsAny(LongIterable source)
- Specified by:
containsAnyin interfaceLongIterable
-
containsNone
public boolean containsNone(long... source)
- Specified by:
containsNonein interfaceLongIterable
-
containsNone
public boolean containsNone(LongIterable source)
- Specified by:
containsNonein interfaceLongIterable
-
each
public void each(LongProcedure procedure)
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
select
public LongIterable select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable
-
reject
public LongIterable reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable
-
collect
public <V> RichIterable<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNonein interfaceLongIterable
-
count
public int count(LongPredicate predicate)
- Specified by:
countin interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfyin interfaceLongIterable
-
toList
public MutableLongList toList()
- Specified by:
toListin interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSetin interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBagin interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazyin interfaceLongIterable
-
sum
public long sum()
- Specified by:
sumin interfaceLongIterable
-
max
public long max()
- Specified by:
maxin interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmptyin interfaceLongIterable
-
min
public long min()
- Specified by:
minin interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmptyin interfaceLongIterable
-
average
public double average()
- Specified by:
averagein interfaceLongIterable
-
median
public double median()
- Specified by:
medianin interfaceLongIterable
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArrayin interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedListin interfaceLongIterable
-
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, ObjectLongToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceLongIterable
-
reduce
public long reduce(LongLongToLongFunction accumulator)
- Specified by:
reducein interfaceLongIterable
-
reduceIfEmpty
public long reduceIfEmpty(LongLongToLongFunction accumulator, long defaultValue)
- Specified by:
reduceIfEmptyin interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunkin interfaceLongIterable
-
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
-
longIterator
public LongIterator longIterator()
Must be called in a synchronized block.- Specified by:
longIteratorin interfaceLongIterable
-
-