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

public Class CharHashSet

extends AbstractCharSet
implements MutableCharSet, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.set.primitive.MutableCharSet, org.eclipse.collections.api.set.primitive.CharSet, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableCharCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, .Serializable, java.util.Arrays, .Collection, .NoSuchElementException, org.eclipse.collections.api.CharIterable, .RichIterable, org.eclipse.collections.api.block.function.primitive.CharToObjectFunction, .ObjectCharToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.CharPredicate, org.eclipse.collections.api.block.procedure.primitive.CharProcedure, org.eclipse.collections.api.collection.primitive.MutableCharCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.CharSets, org.eclipse.collections.api.iterator.CharIterator, .MutableCharIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.set.ImmutableSet, .MutableSet, org.eclipse.collections.api.set.primitive.ImmutableCharSet, .MutableCharSet, .CharSet, org.eclipse.collections.impl.set.immutable.primitive.ImmutableCharSetSerializationProxy, .AbstractImmutableCharSet, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.impl.set.primitive.AbstractCharSet

This file was automatically generated from template file primitiveHashSet.stg.
Since
3.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private class

Field Summary

Modifier and TypeField and Description
private static final int
private transient boolean
private static final int
private static final char
private static final int
private static final int
private int
private int
private static final char
private static final long
private char[]
private int
private int

Constructor Summary

AccessConstructor and Description
public
public
CharHashSet(int initialCapacity)

public
CharHashSet(char... elements)

public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
protected void
allocateTable(int sizeToAllocate)

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, 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 MutableCharSet
public MutableCharSet
public MutableSet<Character>
public MutableCharIterator
charIterator()

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

Returns a primitive iterator that can be used to iterate over the CharIterable in an imperative style.

public RichIterable<CharIterable>
chunk(int size)

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

Partitions elements in fixed size chunks.

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

Implements org.eclipse.collections.api.set.primitive.MutableCharSet.collect, org.eclipse.collections.api.set.primitive.CharSet.collect, 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.

public <V, R extends Collection<V>> R
collect(CharToObjectFunction<? extends V> function, R target)

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

Same as collect(CharToObjectFunction) , only the results are added to the target Collection.

public void
compact()
Deprecated since 12.0 - Use trimToSize() instead

Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.

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.

private void
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.

public CharSet
public int
public <T> T
injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function)

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

private static boolean
private static boolean
isNonSentinel(char value)

private int
mask(int spread)

public char
private int
public char
public CharHashSet
newEmpty()

Overrides default org.eclipse.collections.api.set.primitive.MutableCharSet.newEmpty.

Creates a new empty CharHashSet.

public static CharHashSet
public static CharHashSet
newSetWith(char... source)

pack-priv int
probe(char element)

pack-priv int
probeThree(char element, int removedIndex)

pack-priv int
probeTwo(char element, int removedIndex)

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

private void
rehash(int newCapacity)

private void
public CharHashSet
reject(CharPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableCharSet.reject, org.eclipse.collections.api.set.primitive.CharSet.reject, 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.

public <R extends MutableCharCollection> R
reject(CharPredicate predicate, R target)

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

Same as reject(CharPredicate) , only the results are added to the target MutableCharCollection.

public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public CharHashSet
select(CharPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableCharSet.select, org.eclipse.collections.api.set.primitive.CharSet.select, 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.

public <R extends MutableCharCollection> R
select(CharPredicate predicate, R target)

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

Same as select(CharPredicate) , only the results are added to the target MutableCharCollection.

public int
size()

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

Returns the number of items in this iterable.

private int
pack-priv int
spreadAndMask(char element)

pack-priv int
spreadTwoAndMask(char element)

public long
public char[]
toArray()

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

Converts the CharIterable to a primitive char array.

public char[]
toArray(char[] array)

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

Converts the CharIterable to a primitive char array.

public ImmutableCharSet
public boolean
public CharHashSet
public CharHashSet
public CharHashSet
public CharHashSet
public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.set.primitive.AbstractCharSet:
cartesianProductequals