Class CharHashSet
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractCharIterable
-
- org.eclipse.collections.impl.set.primitive.AbstractCharSet
-
- org.eclipse.collections.impl.set.mutable.primitive.CharHashSet
-
- All Implemented Interfaces:
Externalizable
,Serializable
,CharIterable
,MutableCharCollection
,PrimitiveIterable
,CharSet
,MutableCharSet
public class CharHashSet extends AbstractCharSet implements MutableCharSet, Externalizable
This file was automatically generated from template file primitiveHashSet.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CharHashSet()
CharHashSet(char... elements)
CharHashSet(int initialCapacity)
CharHashSet(CharIterable elements)
CharHashSet(CharHashSet set)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractCharSet
cartesianProduct, equals
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractCharIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.CharSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableCharCollection
removeIf
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableCharSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
-
-
-
Constructor Detail
-
CharHashSet
public CharHashSet()
-
CharHashSet
public CharHashSet(int initialCapacity)
-
CharHashSet
public CharHashSet(char... elements)
-
CharHashSet
public CharHashSet(CharIterable elements)
-
CharHashSet
public CharHashSet(CharHashSet set)
-
-
Method Detail
-
boxed
public MutableSet<Character> boxed()
- Specified by:
boxed
in interfaceMutableCharSet
-
newSet
public static CharHashSet newSet(CharIterable source)
-
newSetWith
public static CharHashSet newSetWith(char... source)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCharSet
- Specified by:
hashCode
in classAbstractCharSet
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
add
public boolean add(char element)
- Specified by:
add
in interfaceMutableCharCollection
-
addAll
public boolean addAll(char... source)
- Specified by:
addAll
in interfaceMutableCharCollection
-
addAll
public boolean addAll(CharIterable source)
- Specified by:
addAll
in interfaceMutableCharCollection
-
remove
public boolean remove(char value)
- Specified by:
remove
in interfaceMutableCharCollection
-
removeAll
public boolean removeAll(CharIterable source)
- Specified by:
removeAll
in interfaceMutableCharCollection
-
removeAll
public boolean removeAll(char... source)
- Specified by:
removeAll
in interfaceMutableCharCollection
-
retainAll
public boolean retainAll(CharIterable source)
- Specified by:
retainAll
in interfaceMutableCharCollection
-
retainAll
public boolean retainAll(char... source)
- Specified by:
retainAll
in interfaceMutableCharCollection
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableCharCollection
-
with
public CharHashSet with(char element)
- Specified by:
with
in interfaceMutableCharCollection
- Specified by:
with
in interfaceMutableCharSet
-
without
public CharHashSet without(char element)
- Specified by:
without
in interfaceMutableCharCollection
- Specified by:
without
in interfaceMutableCharSet
-
withAll
public CharHashSet withAll(CharIterable elements)
- Specified by:
withAll
in interfaceMutableCharCollection
- Specified by:
withAll
in interfaceMutableCharSet
-
withoutAll
public CharHashSet withoutAll(CharIterable elements)
- Specified by:
withoutAll
in interfaceMutableCharCollection
- Specified by:
withoutAll
in interfaceMutableCharSet
-
asUnmodifiable
public MutableCharSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharCollection
- Specified by:
asUnmodifiable
in interfaceMutableCharSet
-
asSynchronized
public MutableCharSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharCollection
- Specified by:
asSynchronized
in interfaceMutableCharSet
-
toImmutable
public ImmutableCharSet toImmutable()
- Specified by:
toImmutable
in interfaceCharSet
- Specified by:
toImmutable
in interfaceMutableCharCollection
- Specified by:
toImmutable
in interfaceMutableCharSet
-
charIterator
public MutableCharIterator charIterator()
- Specified by:
charIterator
in interfaceCharIterable
- Specified by:
charIterator
in interfaceMutableCharCollection
-
toArray
public char[] toArray()
- Specified by:
toArray
in interfaceCharIterable
-
toArray
public char[] toArray(char[] array)
- Specified by:
toArray
in interfaceCharIterable
-
contains
public boolean contains(char value)
- Specified by:
contains
in interfaceCharIterable
-
each
public void each(CharProcedure procedure)
- Specified by:
each
in interfaceCharIterable
- Since:
- 7.0.
-
select
public CharHashSet select(CharPredicate predicate)
- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceCharSet
- Specified by:
select
in interfaceMutableCharCollection
- Specified by:
select
in interfaceMutableCharSet
-
select
public <R extends MutableCharCollection> R select(CharPredicate predicate, R target)
- Specified by:
select
in interfaceCharIterable
- Since:
- 8.1.
-
reject
public CharHashSet reject(CharPredicate predicate)
- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceCharSet
- Specified by:
reject
in interfaceMutableCharCollection
- Specified by:
reject
in interfaceMutableCharSet
-
reject
public <R extends MutableCharCollection> R reject(CharPredicate predicate, R target)
- Specified by:
reject
in interfaceCharIterable
- Since:
- 8.1.
-
collect
public <V> MutableSet<V> collect(CharToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceCharSet
- Specified by:
collect
in interfaceMutableCharCollection
- Specified by:
collect
in interfaceMutableCharSet
-
collect
public <V,R extends Collection<V>> R collect(CharToObjectFunction<? extends V> function, R target)
- Specified by:
collect
in interfaceCharIterable
- Since:
- 8.1.
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNone
in interfaceCharIterable
-
count
public int count(CharPredicate predicate)
- Specified by:
count
in interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfy
in interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfy
in interfaceCharIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceCharIterable
-
max
public char max()
- Specified by:
max
in interfaceCharIterable
-
min
public char min()
- Specified by:
min
in interfaceCharIterable
-
freeze
public CharSet freeze()
- Specified by:
freeze
in interfaceCharSet
- Specified by:
freeze
in interfaceMutableCharSet
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
- Specified by:
chunk
in interfaceCharIterable
-
newEmpty
public CharHashSet newEmpty()
Creates a new empty CharHashSet.- Specified by:
newEmpty
in interfaceMutableCharCollection
- Specified by:
newEmpty
in interfaceMutableCharSet
- Since:
- 9.2.
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
-