Class CharHashBag
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractCharIterable
org.eclipse.collections.impl.bag.mutable.primitive.CharHashBag
- All Implemented Interfaces:
Externalizable,Serializable,CharBag,MutableCharBag,CharIterable,MutableCharCollection,PrimitiveIterable
CharHashBag is similar to
HashBag, and is memory-optimized for char primitives.
This file was automatically generated from template file primitiveHashBag.stg.- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCharHashBag(char... elements) CharHashBag(int size) CharHashBag(CharIterable iterable) CharHashBag(CharHashBag bag) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(char item) booleanaddAll(char... source) booleanaddAll(CharIterable source) voidaddOccurrences(char item, int occurrences) booleanallSatisfy(CharPredicate predicate) booleananySatisfy(CharPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) bottomOccurrences(int count) chunk(int size) voidclear()<V> MutableBag<V>collect(CharToObjectFunction<? extends V> function) booleancontains(char value) intcount(CharPredicate predicate) chardetectIfNone(CharPredicate predicate, char ifNone) voideach(CharProcedure procedure) booleanvoidforEachWithOccurrences(CharIntProcedure procedure) inthashCode()<T> TinjectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function) booleanisEmpty()charmax()charmin()static CharHashBagnewBag(int size) static CharHashBagstatic CharHashBagnewBag(CharIterable source) static CharHashBagnewBagWith(char... source) newEmpty()Creates a new empty CharHashBag.booleannoneSatisfy(CharPredicate predicate) booleannotEmpty()intoccurrencesOf(char item) voidreject(CharPredicate predicate) booleanremove(char item) booleanremoveAll(char... source) booleanremoveAll(CharIterable source) booleanremoveIf(CharPredicate predicate) booleanremoveOccurrences(char item, int occurrences) booleanretainAll(char... source) booleanretainAll(CharIterable source) select(CharPredicate predicate) selectByOccurrences(IntPredicate predicate) intsize()intlongsum()char[]toArray()char[]toArray(char[] array) topOccurrences(int count) with(char element) with(char element1, char element2) with(char element1, char element2, char element3) withAll(CharIterable iterable) without(char element) withoutAll(CharIterable iterable) voidMethods inherited from class org.eclipse.collections.impl.primitive.AbstractCharIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.CharBag
toStringOfItemToCountMethods inherited from interface org.eclipse.collections.api.CharIterable
asLazy, average, averageIfEmpty, collect, 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, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.bag.primitive.MutableCharBag
selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
CharHashBag
public CharHashBag() -
CharHashBag
public CharHashBag(int size) -
CharHashBag
-
CharHashBag
public CharHashBag(char... elements) -
CharHashBag
-
-
Method Details
-
newBag
-
newBagWith
-
newBag
-
newBag
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
sizeDistinct
public int sizeDistinct()- Specified by:
sizeDistinctin interfaceCharBag
-
clear
public void clear()- Specified by:
clearin interfaceMutableCharCollection
-
with
- Specified by:
within interfaceMutableCharBag- Specified by:
within interfaceMutableCharCollection
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableCharBag- Specified by:
withAllin interfaceMutableCharCollection
-
without
- Specified by:
withoutin interfaceMutableCharBag- Specified by:
withoutin interfaceMutableCharCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableCharBag- Specified by:
withoutAllin interfaceMutableCharCollection
-
contains
public boolean contains(char value) - Specified by:
containsin interfaceCharIterable
-
occurrencesOf
public int occurrencesOf(char item) - Specified by:
occurrencesOfin interfaceCharBag
-
forEachWithOccurrences
- Specified by:
forEachWithOccurrencesin interfaceCharBag
-
selectByOccurrences
- Specified by:
selectByOccurrencesin interfaceCharBag- Specified by:
selectByOccurrencesin interfaceMutableCharBag
-
selectUnique
- Specified by:
selectUniquein interfaceCharBag- Specified by:
selectUniquein interfaceMutableCharBag
-
topOccurrences
- Specified by:
topOccurrencesin interfaceCharBag- Specified by:
topOccurrencesin interfaceMutableCharBag
-
bottomOccurrences
- Specified by:
bottomOccurrencesin interfaceCharBag- Specified by:
bottomOccurrencesin interfaceMutableCharBag
-
add
public boolean add(char item) - Specified by:
addin interfaceMutableCharCollection
-
remove
public boolean remove(char item) - Specified by:
removein interfaceMutableCharCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableCharCollection
-
addAll
public boolean addAll(char... source) - Specified by:
addAllin interfaceMutableCharCollection
-
addAll
- Specified by:
addAllin interfaceMutableCharCollection
-
removeAll
public boolean removeAll(char... source) - Specified by:
removeAllin interfaceMutableCharCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableCharCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableCharCollection
-
retainAll
public boolean retainAll(char... source) - Specified by:
retainAllin interfaceMutableCharCollection
-
addOccurrences
public void addOccurrences(char item, int occurrences) - Specified by:
addOccurrencesin interfaceMutableCharBag
-
removeOccurrences
public boolean removeOccurrences(char item, int occurrences) - Specified by:
removeOccurrencesin interfaceMutableCharBag
-
each
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceCharBag- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceMutableCharBag- Specified by:
selectin interfaceMutableCharCollection
-
reject
- Specified by:
rejectin interfaceCharBag- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceMutableCharBag- Specified by:
rejectin interfaceMutableCharCollection
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceCharIterable
-
chunk
- Specified by:
chunkin interfaceCharIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
count
- Specified by:
countin interfaceCharIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceCharIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceCharIterable
-
collect
- Specified by:
collectin interfaceCharBag- Specified by:
collectin interfaceCharIterable- Specified by:
collectin interfaceMutableCharBag- Specified by:
collectin interfaceMutableCharCollection
-
max
public char max()- Specified by:
maxin interfaceCharIterable
-
min
public char min()- Specified by:
minin interfaceCharIterable
-
sum
public long sum()- Specified by:
sumin interfaceCharIterable
-
toArray
public char[] toArray()- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] array) - Specified by:
toArrayin interfaceCharIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableCharBag- Specified by:
asUnmodifiablein interfaceMutableCharCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableCharBag- Specified by:
asSynchronizedin interfaceMutableCharCollection
-
toImmutable
- Specified by:
toImmutablein interfaceCharBag- Specified by:
toImmutablein interfaceMutableCharBag- Specified by:
toImmutablein interfaceMutableCharCollection
-
newEmpty
Creates a new empty CharHashBag.- Specified by:
newEmptyin interfaceMutableCharBag- Specified by:
newEmptyin interfaceMutableCharCollection- Since:
- 9.2.
-
charIterator
- Specified by:
charIteratorin interfaceCharIterable- Specified by:
charIteratorin interfaceMutableCharCollection
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-