Class SynchronizedCharIterable
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.SynchronizedCharIterable
-
- All Implemented Interfaces:
Serializable,CharIterable,PrimitiveIterable
public class SynchronizedCharIterable extends Object implements CharIterable, Serializable
A synchronized view of a CharIterable. 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(CharPredicate predicate)booleananySatisfy(CharPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyCharIterableasLazy()doubleaverage()CharIteratorcharIterator()Must be called in a synchronized block.RichIterable<CharIterable>chunk(int size)<V> RichIterable<V>collect(CharToObjectFunction<? extends V> function)booleancontains(char value)booleancontainsAll(char... source)booleancontainsAll(CharIterable source)booleancontainsAny(char... source)booleancontainsAny(CharIterable source)booleancontainsNone(char... source)booleancontainsNone(CharIterable source)intcount(CharPredicate predicate)chardetectIfNone(CharPredicate predicate, char ifNone)voideach(CharProcedure procedure)<T> TinjectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)booleanisEmpty()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)charmax()charmaxIfEmpty(char defaultValue)doublemedian()charmin()charminIfEmpty(char defaultValue)booleannoneSatisfy(CharPredicate predicate)booleannotEmpty()static SynchronizedCharIterableof(CharIterable iterable)This method will take a CharIterable and wrap it directly in a SynchronizedCharIterable.static SynchronizedCharIterableof(CharIterable iterable, Object lock)This method will take a CharIterable and wrap it directly in a SynchronizedCharIterable.longreduce(LongCharToLongFunction accumulator)longreduceIfEmpty(LongCharToLongFunction accumulator, long defaultValue)CharIterablereject(CharPredicate predicate)CharIterableselect(CharPredicate predicate)intsize()longsum()char[]toArray()char[]toArray(char[] target)MutableCharBagtoBag()MutableCharListtoList()MutableCharSettoSet()char[]toSortedArray()MutableCharListtoSortedList()StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
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 SynchronizedCharIterable of(CharIterable iterable)
This method will take a CharIterable and wrap it directly in a SynchronizedCharIterable.
-
of
public static SynchronizedCharIterable of(CharIterable iterable, Object lock)
This method will take a CharIterable and wrap it directly in a SynchronizedCharIterable. Additionally, a developer specifies which lock to use with the collection.
-
toArray
public char[] toArray()
- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] target)
- Specified by:
toArrayin interfaceCharIterable
-
contains
public boolean contains(char value)
- Specified by:
containsin interfaceCharIterable
-
containsAll
public boolean containsAll(char... source)
- Specified by:
containsAllin interfaceCharIterable
-
containsAll
public boolean containsAll(CharIterable source)
- Specified by:
containsAllin interfaceCharIterable
-
containsAny
public boolean containsAny(char... source)
- Specified by:
containsAnyin interfaceCharIterable
-
containsAny
public boolean containsAny(CharIterable source)
- Specified by:
containsAnyin interfaceCharIterable
-
containsNone
public boolean containsNone(char... source)
- Specified by:
containsNonein interfaceCharIterable
-
containsNone
public boolean containsNone(CharIterable source)
- Specified by:
containsNonein interfaceCharIterable
-
each
public void each(CharProcedure procedure)
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
select
public CharIterable select(CharPredicate predicate)
- Specified by:
selectin interfaceCharIterable
-
reject
public CharIterable reject(CharPredicate predicate)
- Specified by:
rejectin interfaceCharIterable
-
collect
public <V> RichIterable<V> collect(CharToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceCharIterable
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNonein interfaceCharIterable
-
count
public int count(CharPredicate predicate)
- Specified by:
countin interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
- Specified by:
noneSatisfyin interfaceCharIterable
-
toList
public MutableCharList toList()
- Specified by:
toListin interfaceCharIterable
-
toSet
public MutableCharSet toSet()
- Specified by:
toSetin interfaceCharIterable
-
toBag
public MutableCharBag toBag()
- Specified by:
toBagin interfaceCharIterable
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazyin interfaceCharIterable
-
sum
public long sum()
- Specified by:
sumin interfaceCharIterable
-
max
public char max()
- Specified by:
maxin interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char defaultValue)
- Specified by:
maxIfEmptyin interfaceCharIterable
-
min
public char min()
- Specified by:
minin interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char defaultValue)
- Specified by:
minIfEmptyin interfaceCharIterable
-
average
public double average()
- Specified by:
averagein interfaceCharIterable
-
median
public double median()
- Specified by:
medianin interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()
- Specified by:
toSortedArrayin interfaceCharIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedListin interfaceCharIterable
-
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, ObjectCharToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceCharIterable
-
reduce
public long reduce(LongCharToLongFunction accumulator)
- Specified by:
reducein interfaceCharIterable
-
reduceIfEmpty
public long reduceIfEmpty(LongCharToLongFunction accumulator, long defaultValue)
- Specified by:
reduceIfEmptyin interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
- Specified by:
chunkin interfaceCharIterable
-
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
-
charIterator
public CharIterator charIterator()
Must be called in a synchronized block.- Specified by:
charIteratorin interfaceCharIterable
-
-