public class CharHashBag extends AbstractCharIterable implements MutableCharBag, Externalizable
HashBag, and is memory-optimized for char primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
CharHashBag() |
CharHashBag(char... elements) |
CharHashBag(CharHashBag bag) |
CharHashBag(CharIterable iterable) |
CharHashBag(int size) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringselectDuplicates, taptoStringOfItemToCountasLazy, 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, toSortedListByappendString, appendString, makeString, makeString, makeString, toStringpublic CharHashBag()
public CharHashBag(int size)
public CharHashBag(CharIterable iterable)
public CharHashBag(char... elements)
public CharHashBag(CharHashBag bag)
public static CharHashBag newBag(int size)
public static CharHashBag newBagWith(char... source)
public static CharHashBag newBag(CharIterable source)
public static CharHashBag newBag(CharBag source)
public boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic int size()
size in interface PrimitiveIterablepublic int sizeDistinct()
sizeDistinct in interface CharBagpublic void clear()
clear in interface MutableCharCollectionpublic CharHashBag with(char element)
with in interface MutableCharBagwith in interface MutableCharCollectionpublic CharHashBag with(char element1, char element2)
public CharHashBag with(char element1, char element2, char element3)
public CharHashBag withAll(CharIterable iterable)
withAll in interface MutableCharBagwithAll in interface MutableCharCollectionpublic CharHashBag without(char element)
without in interface MutableCharBagwithout in interface MutableCharCollectionpublic CharHashBag withoutAll(CharIterable iterable)
withoutAll in interface MutableCharBagwithoutAll in interface MutableCharCollectionpublic boolean contains(char value)
contains in interface CharIterablepublic int occurrencesOf(char item)
occurrencesOf in interface CharBagpublic void forEachWithOccurrences(CharIntProcedure procedure)
forEachWithOccurrences in interface CharBagpublic CharHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface CharBagselectByOccurrences in interface MutableCharBagpublic MutableCharSet selectUnique()
selectUnique in interface CharBagselectUnique in interface MutableCharBagpublic MutableList<CharIntPair> topOccurrences(int count)
topOccurrences in interface CharBagtopOccurrences in interface MutableCharBagpublic MutableList<CharIntPair> bottomOccurrences(int count)
bottomOccurrences in interface CharBagbottomOccurrences in interface MutableCharBagpublic boolean add(char item)
add in interface MutableCharCollectionpublic boolean remove(char item)
remove in interface MutableCharCollectionpublic boolean removeIf(CharPredicate predicate)
removeIf in interface MutableCharCollectionpublic boolean addAll(char... source)
addAll in interface MutableCharCollectionpublic boolean addAll(CharIterable source)
addAll in interface MutableCharCollectionpublic boolean removeAll(char... source)
removeAll in interface MutableCharCollectionpublic boolean removeAll(CharIterable source)
removeAll in interface MutableCharCollectionpublic boolean retainAll(CharIterable source)
retainAll in interface MutableCharCollectionpublic boolean retainAll(char... source)
retainAll in interface MutableCharCollectionpublic void addOccurrences(char item,
int occurrences)
addOccurrences in interface MutableCharBagpublic boolean removeOccurrences(char item,
int occurrences)
removeOccurrences in interface MutableCharBagpublic void each(CharProcedure procedure)
each in interface CharIterablepublic CharHashBag select(CharPredicate predicate)
select in interface CharBagselect in interface MutableCharBagselect in interface CharIterableselect in interface MutableCharCollectionpublic CharHashBag reject(CharPredicate predicate)
reject in interface CharBagreject in interface MutableCharBagreject in interface CharIterablereject in interface MutableCharCollectionpublic <T> T injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function)
injectInto in interface CharIterablepublic RichIterable<CharIterable> chunk(int size)
chunk in interface CharIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(CharPredicate predicate)
count in interface CharIterablepublic boolean anySatisfy(CharPredicate predicate)
anySatisfy in interface CharIterablepublic boolean allSatisfy(CharPredicate predicate)
allSatisfy in interface CharIterablepublic boolean noneSatisfy(CharPredicate predicate)
noneSatisfy in interface CharIterablepublic char detectIfNone(CharPredicate predicate, char ifNone)
detectIfNone in interface CharIterablepublic <V> MutableBag<V> collect(CharToObjectFunction<? extends V> function)
collect in interface CharBagcollect in interface MutableCharBagcollect in interface CharIterablecollect in interface MutableCharCollectionpublic char max()
max in interface CharIterablepublic char min()
min in interface CharIterablepublic long sum()
sum in interface CharIterablepublic char[] toArray()
toArray in interface CharIterablepublic char[] toArray(char[] array)
toArray in interface CharIterablepublic MutableCharBag asUnmodifiable()
asUnmodifiable in interface MutableCharBagasUnmodifiable in interface MutableCharCollectionpublic MutableCharBag asSynchronized()
asSynchronized in interface MutableCharBagasSynchronized in interface MutableCharCollectionpublic ImmutableCharBag toImmutable()
toImmutable in interface CharBagtoImmutable in interface MutableCharBagtoImmutable in interface MutableCharCollectionpublic CharHashBag newEmpty()
newEmpty in interface MutableCharBagnewEmpty in interface MutableCharCollectionpublic MutableCharIterator charIterator()
charIterator in interface CharIterablecharIterator in interface MutableCharCollectionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2004–2022. All rights reserved.