public final class BooleanHashBag extends Object implements MutableBooleanBag, Externalizable
HashBag, and is memory-optimized for boolean primitives.| Constructor and Description |
|---|
BooleanHashBag() |
BooleanHashBag(boolean... elements) |
BooleanHashBag(BooleanHashBag bag) |
BooleanHashBag(BooleanIterable iterable) |
newEmpty, selectDuplicates, tapremoveIftoStringOfItemToCountcollect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, reduce, reduceIfEmpty, reject, selectpublic BooleanHashBag()
public BooleanHashBag(BooleanIterable iterable)
public BooleanHashBag(boolean... elements)
public BooleanHashBag(BooleanHashBag bag)
public static BooleanHashBag newBagWith(boolean... source)
public static BooleanHashBag newBag(BooleanIterable 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 BooleanBagpublic void clear()
clear in interface MutableBooleanCollectionpublic BooleanHashBag with(boolean element)
with in interface MutableBooleanBagwith in interface MutableBooleanCollectionpublic BooleanHashBag with(boolean element1, boolean element2)
public BooleanHashBag with(boolean element1, boolean element2, boolean element3)
public BooleanHashBag withAll(BooleanIterable iterable)
withAll in interface MutableBooleanBagwithAll in interface MutableBooleanCollectionpublic BooleanHashBag without(boolean element)
without in interface MutableBooleanBagwithout in interface MutableBooleanCollectionpublic BooleanHashBag withoutAll(BooleanIterable iterable)
withoutAll in interface MutableBooleanBagwithoutAll in interface MutableBooleanCollectionpublic MutableBooleanBag asUnmodifiable()
asUnmodifiable in interface MutableBooleanBagasUnmodifiable in interface MutableBooleanCollectionpublic MutableBooleanBag asSynchronized()
asSynchronized in interface MutableBooleanBagasSynchronized in interface MutableBooleanCollectionpublic ImmutableBooleanBag toImmutable()
toImmutable in interface BooleanBagtoImmutable in interface MutableBooleanBagtoImmutable in interface MutableBooleanCollectionpublic boolean contains(boolean value)
contains in interface BooleanIterablepublic boolean containsAll(boolean... source)
containsAll in interface BooleanIterablepublic boolean containsAll(BooleanIterable source)
containsAll in interface BooleanIterablepublic int occurrencesOf(boolean item)
occurrencesOf in interface BooleanBagpublic void forEachWithOccurrences(BooleanIntProcedure procedure)
forEachWithOccurrences in interface BooleanBagpublic boolean add(boolean item)
add in interface MutableBooleanCollectionpublic boolean remove(boolean item)
remove in interface MutableBooleanCollectionpublic boolean addAll(boolean... source)
addAll in interface MutableBooleanCollectionpublic boolean addAll(BooleanIterable source)
addAll in interface MutableBooleanCollectionpublic boolean removeAll(boolean... source)
removeAll in interface MutableBooleanCollectionpublic boolean removeAll(BooleanIterable source)
removeAll in interface MutableBooleanCollectionpublic boolean retainAll(BooleanIterable elements)
retainAll in interface MutableBooleanCollectionpublic boolean retainAll(boolean... source)
retainAll in interface MutableBooleanCollectionpublic void addOccurrences(boolean item,
int occurrences)
addOccurrences in interface MutableBooleanBagpublic boolean removeOccurrences(boolean item,
int occurrences)
removeOccurrences in interface MutableBooleanBagpublic void each(BooleanProcedure procedure)
each in interface BooleanIterablepublic MutableBooleanBag select(BooleanPredicate predicate)
select in interface BooleanBagselect in interface MutableBooleanBagselect in interface BooleanIterableselect in interface MutableBooleanCollectionpublic MutableBooleanBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface BooleanBagselectByOccurrences in interface MutableBooleanBagpublic MutableList<BooleanIntPair> topOccurrences(int count)
topOccurrences in interface BooleanBagtopOccurrences in interface MutableBooleanBagpublic MutableList<BooleanIntPair> bottomOccurrences(int count)
bottomOccurrences in interface BooleanBagbottomOccurrences in interface MutableBooleanBagpublic MutableBooleanBag reject(BooleanPredicate predicate)
reject in interface BooleanBagreject in interface MutableBooleanBagreject in interface BooleanIterablereject in interface MutableBooleanCollectionpublic <T> T injectInto(T injectedValue,
ObjectBooleanToObjectFunction<? super T,? extends T> function)
injectInto in interface BooleanIterablepublic RichIterable<BooleanIterable> chunk(int size)
chunk in interface BooleanIterablepublic boolean equals(Object otherBag)
equals in interface BooleanBagequals in class Objectpublic int hashCode()
hashCode in interface BooleanBaghashCode in class Objectpublic String toString()
toString in interface PrimitiveIterabletoString in class Objectpublic String makeString()
makeString in interface PrimitiveIterablepublic String makeString(String separator)
makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
makeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(BooleanPredicate predicate)
count in interface BooleanIterablepublic boolean anySatisfy(BooleanPredicate predicate)
anySatisfy in interface BooleanIterablepublic boolean allSatisfy(BooleanPredicate predicate)
allSatisfy in interface BooleanIterablepublic boolean noneSatisfy(BooleanPredicate predicate)
noneSatisfy in interface BooleanIterablepublic boolean detectIfNone(BooleanPredicate predicate, boolean ifNone)
detectIfNone in interface BooleanIterablepublic <V> MutableBag<V> collect(BooleanToObjectFunction<? extends V> function)
collect in interface BooleanBagcollect in interface MutableBooleanBagcollect in interface BooleanIterablecollect in interface MutableBooleanCollectionpublic boolean[] toArray()
toArray in interface BooleanIterablepublic boolean[] toArray(boolean[] array)
toArray in interface BooleanIterablepublic MutableBooleanList toList()
toList in interface BooleanIterablepublic MutableBooleanSet toSet()
toSet in interface BooleanIterablepublic MutableBooleanBag toBag()
toBag in interface BooleanIterablepublic LazyBooleanIterable asLazy()
asLazy in interface BooleanIterablepublic MutableBooleanIterator booleanIterator()
booleanIterator in interface BooleanIterablebooleanIterator in interface MutableBooleanCollectionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic MutableBooleanSet selectUnique()
selectUnique in interface BooleanBagselectUnique in interface MutableBooleanBagCopyright © 2004–2022. All rights reserved.