Top Description Fields Constructors Methods
org.eclipse.collections.impl.collection.mutable.primitive

public abstract Class AbstractSynchronizedCharCollection

extends Object
implements MutableCharCollection, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.collection.primitive.MutableCharCollection, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.PrimitiveIterable
Known Direct Subclasses
org.eclipse.collections.impl.collection.mutable.primitive.SynchronizedCharCollection, org.eclipse.collections.impl.list.mutable.primitive.SynchronizedCharList, org.eclipse.collections.impl.set.mutable.primitive.SynchronizedCharSet, org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedCharBag
Imports
java.io.Serializable, org.eclipse.collections.api.RichIterable, .CharIterable, .LazyCharIterable, org.eclipse.collections.api.bag.primitive.MutableCharBag, org.eclipse.collections.api.block.function.primitive.LongCharToLongFunction, .CharToObjectFunction, .ObjectCharToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.CharPredicate, org.eclipse.collections.api.block.procedure.primitive.CharProcedure, org.eclipse.collections.api.collection.MutableCollection, org.eclipse.collections.api.collection.primitive.ImmutableCharCollection, .MutableCharCollection, org.eclipse.collections.api.iterator.MutableCharIterator, org.eclipse.collections.api.list.primitive.MutableCharList, org.eclipse.collections.api.set.primitive.MutableCharSet, org.eclipse.collections.impl.lazy.primitive.LazyCharIterableAdapter

This file was automatically generated from template file abstractSynchronizedPrimitiveCollection.stg.
Since
3.1.

Field Summary

Modifier and TypeField and Description
private final MutableCharCollection
private final Object
private static final long

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
allSatisfy(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.allSatisfy.

Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.anySatisfy.

Returns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyCharIterable
asLazy()

Implements org.eclipse.collections.api.CharIterable.asLazy.

Returns a LazyCharIterable adapter wrapping the source CharIterable.

public MutableCharCollection
public MutableCharCollection
public double
public MutableCharIterator
public RichIterable<CharIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.CharIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableCollection<V>
collect(CharToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public boolean
contains(char value)

Implements org.eclipse.collections.api.CharIterable.contains.

Returns true if the value is contained in the CharIterable, and false if it is not.

public boolean
containsAll(char... source)

Overrides default org.eclipse.collections.api.CharIterable.containsAll.

Returns true if all of the values specified in the source array are contained in the CharIterable, and false if they are not.

public boolean
containsAll(CharIterable source)

Overrides default org.eclipse.collections.api.CharIterable.containsAll.

Returns true if all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.

public boolean
containsAny(char... source)

Overrides default org.eclipse.collections.api.CharIterable.containsAny.

Returns true if any of the values specified in the source array are contained in the CharIterable, and false if they are not.

public boolean
containsAny(CharIterable source)

Overrides default org.eclipse.collections.api.CharIterable.containsAny.

Returns true if any of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.

public boolean
containsNone(char... source)

Overrides default org.eclipse.collections.api.CharIterable.containsNone.

Returns true if none of the values specified in the source array are contained in the CharIterable, and false if they are.

public boolean
containsNone(CharIterable source)

Overrides default org.eclipse.collections.api.CharIterable.containsNone.

Returns true if none of the values specified in the source CharIterable are contained in the CharIterable, and false if they are.

public int
count(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.count.

Returns a count of the number of elements in the CharIterable that return true for the specified predicate.

public char
public void
each(CharProcedure procedure)

Implements org.eclipse.collections.api.CharIterable.each.

A synonym for forEach.

protected MutableCharCollection
protected Object
public <T> T
injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.CharIterable.injectInto.

public boolean
isEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Returns true if this iterable has zero items.

public String
makeString()

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public String
makeString(String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public String
makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

public char
public char
public double
public char
public char
public boolean
noneSatisfy(CharPredicate predicate)

Overrides default org.eclipse.collections.api.CharIterable.noneSatisfy.

Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.notEmpty.

The English equivalent of !this.isEmpty()

public long
public long
public MutableCharCollection
reject(CharPredicate predicate)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.reject.

Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public MutableCharCollection
select(CharPredicate predicate)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.select.

Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

public long
public char[]
toArray()

Implements org.eclipse.collections.api.CharIterable.toArray.

Converts the CharIterable to a primitive char array.

public char[]
toArray(char[] target)

Overrides default org.eclipse.collections.api.CharIterable.toArray.

Converts the CharIterable to a primitive char array.

public MutableCharBag
toBag()

Implements org.eclipse.collections.api.CharIterable.toBag.

Converts the CharIterable to a new MutableCharBag.

public ImmutableCharCollection
public MutableCharList
toList()

Implements org.eclipse.collections.api.CharIterable.toList.

Converts the CharIterable to a new MutableCharList.

public MutableCharSet
toSet()

Implements org.eclipse.collections.api.CharIterable.toSet.

Converts the CharIterable to a new MutableCharSet.

public char[]
public MutableCharList
public String
toString()

Overrides java.lang.Object.toString.

Implements org.eclipse.collections.api.PrimitiveIterable.toString.

Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.

public MutableCharCollection
public MutableCharCollection
public MutableCharCollection
public MutableCharCollection
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

collectionback to summary
private final MutableCharCollection collection
lockback to summary
private final Object lock
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AbstractSynchronizedCharCollectionback to summary
protected AbstractSynchronizedCharCollection(MutableCharCollection collection)
AbstractSynchronizedCharCollectionback to summary
protected AbstractSynchronizedCharCollection(MutableCharCollection collection, Object newLock)

Method Detail

addback to summary
public boolean add(char newItem)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.add.

Annotations
@Override
addAllback to summary
public boolean addAll(char... source)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.addAll.

Annotations
@Override
addAllback to summary
public boolean addAll(CharIterable source)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.addAll.

Annotations
@Override
allSatisfyback to summary
public boolean allSatisfy(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.allSatisfy.

Doc from org.eclipse.collections.api.CharIterable.allSatisfy.

Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

Annotations
@Override
anySatisfyback to summary
public boolean anySatisfy(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.anySatisfy.

Doc from org.eclipse.collections.api.CharIterable.anySatisfy.

Returns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

Annotations
@Override
appendStringback to summary
public void appendString(Appendable appendable)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Doc from org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString().

Annotations
@Override
appendStringback to summary
public void appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Doc from org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString(String).

Annotations
@Override
appendStringback to summary
public void appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Doc from org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString(String, String, String).

Annotations
@Override
asLazyback to summary
public LazyCharIterable asLazy()

Implements org.eclipse.collections.api.CharIterable.asLazy.

Doc from org.eclipse.collections.api.CharIterable.asLazy.

Returns a LazyCharIterable adapter wrapping the source CharIterable.

Annotations
@Override
asSynchronizedback to summary
public MutableCharCollection asSynchronized()

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableCharCollection asUnmodifiable()

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.asUnmodifiable.

Annotations
@Override
averageback to summary
public double average()

Implements org.eclipse.collections.api.CharIterable.average.

Annotations
@Override
charIteratorback to summary
public MutableCharIterator charIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.charIterator.

Must be called in a synchronized block.

Annotations
@Override
chunkback to summary
public RichIterable<CharIterable> chunk(int size)

Overrides default org.eclipse.collections.api.CharIterable.chunk.

Doc from org.eclipse.collections.api.CharIterable.chunk.

Partitions elements in fixed size chunks.

Annotations
@Override
clearback to summary
public void clear()

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.clear.

Annotations
@Override
collectback to summary
public <V> MutableCollection<V> collect(CharToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.collect.

Doc from org.eclipse.collections.api.CharIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.

Annotations
@Override
containsback to summary
public boolean contains(char value)

Implements org.eclipse.collections.api.CharIterable.contains.

Doc from org.eclipse.collections.api.CharIterable.contains.

Returns true if the value is contained in the CharIterable, and false if it is not.

Annotations
@Override
containsAllback to summary
public boolean containsAll(char... source)

Overrides default org.eclipse.collections.api.CharIterable.containsAll.

Doc from org.eclipse.collections.api.CharIterable.containsAll.

Returns true if all of the values specified in the source array are contained in the CharIterable, and false if they are not.

Annotations
@Override
containsAllback to summary
public boolean containsAll(CharIterable source)

Overrides default org.eclipse.collections.api.CharIterable.containsAll.

Doc from org.eclipse.collections.api.CharIterable.containsAll.

Returns true if all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.

Annotations
@Override
containsAnyback to summary
public boolean containsAny(char... source)

Overrides default org.eclipse.collections.api.CharIterable.containsAny.

Doc from org.eclipse.collections.api.CharIterable.containsAny.

Returns true if any of the values specified in the source array are contained in the CharIterable, and false if they are not.

Annotations
@Override
containsAnyback to summary
public boolean containsAny(CharIterable source)

Overrides default org.eclipse.collections.api.CharIterable.containsAny.

Doc from org.eclipse.collections.api.CharIterable.containsAny.

Returns true if any of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.

Annotations
@Override
containsNoneback to summary
public boolean containsNone(char... source)

Overrides default org.eclipse.collections.api.CharIterable.containsNone.

Doc from org.eclipse.collections.api.CharIterable.containsNone.

Returns true if none of the values specified in the source array are contained in the CharIterable, and false if they are.

Annotations
@Override
containsNoneback to summary
public boolean containsNone(CharIterable source)

Overrides default org.eclipse.collections.api.CharIterable.containsNone.

Doc from org.eclipse.collections.api.CharIterable.containsNone.

Returns true if none of the values specified in the source CharIterable are contained in the CharIterable, and false if they are.

Annotations
@Override
countback to summary
public int count(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.count.

Doc from org.eclipse.collections.api.CharIterable.count.

Returns a count of the number of elements in the CharIterable that return true for the specified predicate.

Annotations
@Override
detectIfNoneback to summary
public char detectIfNone(CharPredicate predicate, char ifNone)

Implements org.eclipse.collections.api.CharIterable.detectIfNone.

Annotations
@Override
eachback to summary
public void each(CharProcedure procedure)

Implements org.eclipse.collections.api.CharIterable.each.

Doc from org.eclipse.collections.api.CharIterable.each.

A synonym for forEach.

Annotations
@Override
Since
7.0.
getCharCollectionback to summary
protected MutableCharCollection getCharCollection()
getLockback to summary
protected Object getLock()
injectIntoback to summary
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.CharIterable.injectInto.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Doc from org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Returns true if this iterable has zero items.

Annotations
@Override
makeStringback to summary
public String makeString()

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Doc from org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

Annotations
@Override
makeStringback to summary
public String makeString(String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Doc from org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

Annotations
@Override
makeStringback to summary
public String makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Doc from org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

Annotations
@Override
maxback to summary
public char max()

Implements org.eclipse.collections.api.CharIterable.max.

Annotations
@Override
maxIfEmptyback to summary
public char maxIfEmpty(char defaultValue)

Implements org.eclipse.collections.api.CharIterable.maxIfEmpty.

Annotations
@Override
medianback to summary
public double median()

Implements org.eclipse.collections.api.CharIterable.median.

Annotations
@Override
minback to summary
public char min()

Implements org.eclipse.collections.api.CharIterable.min.

Annotations
@Override
minIfEmptyback to summary
public char minIfEmpty(char defaultValue)

Implements org.eclipse.collections.api.CharIterable.minIfEmpty.

Annotations
@Override
noneSatisfyback to summary
public boolean noneSatisfy(CharPredicate predicate)

Overrides default org.eclipse.collections.api.CharIterable.noneSatisfy.

Doc from org.eclipse.collections.api.CharIterable.noneSatisfy.

Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

Annotations
@Override
notEmptyback to summary
public boolean notEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.notEmpty.

Doc from org.eclipse.collections.api.PrimitiveIterable.notEmpty.

The English equivalent of !this.isEmpty()

Annotations
@Override
reduceback to summary
public long reduce(LongCharToLongFunction accumulator)

Overrides default org.eclipse.collections.api.CharIterable.reduce.

Annotations
@Override
reduceIfEmptyback to summary
public long reduceIfEmpty(LongCharToLongFunction accumulator, long defaultValue)

Overrides default org.eclipse.collections.api.CharIterable.reduceIfEmpty.

Annotations
@Override
rejectback to summary
public MutableCharCollection reject(CharPredicate predicate)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.reject.

Doc from org.eclipse.collections.api.CharIterable.reject.

Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.

Annotations
@Override
removeback to summary
public boolean remove(char value)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.remove.

Annotations
@Override
removeAllback to summary
public boolean removeAll(CharIterable source)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.removeAll.

Annotations
@Override
removeAllback to summary
public boolean removeAll(char... source)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.removeAll.

Annotations
@Override
removeIfback to summary
public boolean removeIf(CharPredicate predicate)

Overrides default org.eclipse.collections.api.collection.primitive.MutableCharCollection.removeIf.

Annotations
@Override
retainAllback to summary
public boolean retainAll(CharIterable source)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.retainAll.

Annotations
@Override
retainAllback to summary
public boolean retainAll(char... source)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.retainAll.

Annotations
@Override
selectback to summary
public MutableCharCollection select(CharPredicate predicate)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.select.

Doc from org.eclipse.collections.api.CharIterable.select.

Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.

Annotations
@Override
sizeback to summary
public int size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Doc from org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

Annotations
@Override
sumback to summary
public long sum()

Implements org.eclipse.collections.api.CharIterable.sum.

Annotations
@Override
toArrayback to summary
public char[] toArray()

Implements org.eclipse.collections.api.CharIterable.toArray.

Doc from org.eclipse.collections.api.CharIterable.toArray.

Converts the CharIterable to a primitive char array.

Annotations
@Override
toArrayback to summary
public char[] toArray(char[] target)

Overrides default org.eclipse.collections.api.CharIterable.toArray.

Doc from org.eclipse.collections.api.CharIterable.toArray.

Converts the CharIterable to a primitive char array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.

Annotations
@Override
toBagback to summary
public MutableCharBag toBag()

Implements org.eclipse.collections.api.CharIterable.toBag.

Doc from org.eclipse.collections.api.CharIterable.toBag.

Converts the CharIterable to a new MutableCharBag.

Annotations
@Override
toImmutableback to summary
public ImmutableCharCollection toImmutable()

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.toImmutable.

Annotations
@Override
toListback to summary
public MutableCharList toList()

Implements org.eclipse.collections.api.CharIterable.toList.

Doc from org.eclipse.collections.api.CharIterable.toList.

Converts the CharIterable to a new MutableCharList.

Annotations
@Override
toSetback to summary
public MutableCharSet toSet()

Implements org.eclipse.collections.api.CharIterable.toSet.

Doc from org.eclipse.collections.api.CharIterable.toSet.

Converts the CharIterable to a new MutableCharSet.

Annotations
@Override
toSortedArrayback to summary
public char[] toSortedArray()

Implements org.eclipse.collections.api.CharIterable.toSortedArray.

Annotations
@Override
toSortedListback to summary
public MutableCharList toSortedList()

Implements org.eclipse.collections.api.CharIterable.toSortedList.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements org.eclipse.collections.api.PrimitiveIterable.toString.

Doc from org.eclipse.collections.api.PrimitiveIterable.toString.

Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.

Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
Annotations
@Override
withback to summary
public MutableCharCollection with(char element)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.with.

Annotations
@Override
withAllback to summary
public MutableCharCollection withAll(CharIterable elements)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.withAll.

Annotations
@Override
withoutback to summary
public MutableCharCollection without(char element)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.without.

Annotations
@Override
withoutAllback to summary
public MutableCharCollection withoutAll(CharIterable elements)

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.withoutAll.

Annotations
@Override