Class BooleanHashBag
java.lang.Object
org.eclipse.collections.impl.bag.mutable.primitive.BooleanHashBag
- All Implemented Interfaces:
Externalizable,Serializable,BooleanBag,MutableBooleanBag,BooleanIterable,MutableBooleanCollection,PrimitiveIterable
BooleanHashBag is similar to
HashBag, and is memory-optimized for boolean primitives.- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanHashBag(boolean... elements) BooleanHashBag(BooleanIterable iterable) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(boolean item) booleanaddAll(boolean... source) booleanaddAll(BooleanIterable source) voidaddOccurrences(boolean item, int occurrences) booleanallSatisfy(BooleanPredicate predicate) booleananySatisfy(BooleanPredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()bottomOccurrences(int count) chunk(int size) voidclear()<V> MutableBag<V>collect(BooleanToObjectFunction<? extends V> function) booleancontains(boolean value) booleancontainsAll(boolean... source) booleancontainsAll(BooleanIterable source) intcount(BooleanPredicate predicate) booleandetectIfNone(BooleanPredicate predicate, boolean ifNone) voideach(BooleanProcedure procedure) booleanvoidforEachWithOccurrences(BooleanIntProcedure procedure) inthashCode()<T> TinjectInto(T injectedValue, ObjectBooleanToObjectFunction<? super T, ? extends T> function) booleanisEmpty()makeString(String separator) makeString(String start, String separator, String end) static BooleanHashBagnewBag(BooleanIterable source) static BooleanHashBagnewBagWith(boolean... source) booleannoneSatisfy(BooleanPredicate predicate) booleannotEmpty()intoccurrencesOf(boolean item) voidreject(BooleanPredicate predicate) booleanremove(boolean item) booleanremoveAll(boolean... source) booleanremoveAll(BooleanIterable source) booleanremoveOccurrences(boolean item, int occurrences) booleanretainAll(boolean... source) booleanretainAll(BooleanIterable elements) select(BooleanPredicate predicate) selectByOccurrences(IntPredicate predicate) intsize()intboolean[]toArray()boolean[]toArray(boolean[] array) toBag()toList()topOccurrences(int count) toSet()toString()with(boolean element) with(boolean element1, boolean element2) with(boolean element1, boolean element2, boolean element3) withAll(BooleanIterable iterable) without(boolean element) withoutAll(BooleanIterable iterable) voidMethods inherited from interface org.eclipse.collections.api.bag.primitive.BooleanBag
toStringOfItemToCountMethods inherited from interface org.eclipse.collections.api.BooleanIterable
collect, 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, selectMethods inherited from interface org.eclipse.collections.api.bag.primitive.MutableBooleanBag
newEmpty, selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableBooleanCollection
removeIf
-
Constructor Details
-
BooleanHashBag
public BooleanHashBag() -
BooleanHashBag
-
BooleanHashBag
public BooleanHashBag(boolean... elements) -
BooleanHashBag
-
-
Method Details
-
newBagWith
-
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 interfaceBooleanBag
-
clear
public void clear()- Specified by:
clearin interfaceMutableBooleanCollection
-
with
- Specified by:
within interfaceMutableBooleanBag- Specified by:
within interfaceMutableBooleanCollection
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableBooleanBag- Specified by:
withAllin interfaceMutableBooleanCollection
-
without
- Specified by:
withoutin interfaceMutableBooleanBag- Specified by:
withoutin interfaceMutableBooleanCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableBooleanBag- Specified by:
withoutAllin interfaceMutableBooleanCollection
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableBooleanBag- Specified by:
asUnmodifiablein interfaceMutableBooleanCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableBooleanBag- Specified by:
asSynchronizedin interfaceMutableBooleanCollection
-
toImmutable
- Specified by:
toImmutablein interfaceBooleanBag- Specified by:
toImmutablein interfaceMutableBooleanBag- Specified by:
toImmutablein interfaceMutableBooleanCollection
-
contains
public boolean contains(boolean value) - Specified by:
containsin interfaceBooleanIterable
-
containsAll
public boolean containsAll(boolean... source) - Specified by:
containsAllin interfaceBooleanIterable
-
containsAll
- Specified by:
containsAllin interfaceBooleanIterable
-
occurrencesOf
public int occurrencesOf(boolean item) - Specified by:
occurrencesOfin interfaceBooleanBag
-
forEachWithOccurrences
- Specified by:
forEachWithOccurrencesin interfaceBooleanBag
-
add
public boolean add(boolean item) - Specified by:
addin interfaceMutableBooleanCollection
-
remove
public boolean remove(boolean item) - Specified by:
removein interfaceMutableBooleanCollection
-
addAll
public boolean addAll(boolean... source) - Specified by:
addAllin interfaceMutableBooleanCollection
-
addAll
- Specified by:
addAllin interfaceMutableBooleanCollection
-
removeAll
public boolean removeAll(boolean... source) - Specified by:
removeAllin interfaceMutableBooleanCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableBooleanCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableBooleanCollection
-
retainAll
public boolean retainAll(boolean... source) - Specified by:
retainAllin interfaceMutableBooleanCollection
-
addOccurrences
public void addOccurrences(boolean item, int occurrences) - Specified by:
addOccurrencesin interfaceMutableBooleanBag
-
removeOccurrences
public boolean removeOccurrences(boolean item, int occurrences) - Specified by:
removeOccurrencesin interfaceMutableBooleanBag
-
each
- Specified by:
eachin interfaceBooleanIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceBooleanBag- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceMutableBooleanBag- Specified by:
selectin interfaceMutableBooleanCollection
-
selectByOccurrences
- Specified by:
selectByOccurrencesin interfaceBooleanBag- Specified by:
selectByOccurrencesin interfaceMutableBooleanBag
-
topOccurrences
- Specified by:
topOccurrencesin interfaceBooleanBag- Specified by:
topOccurrencesin interfaceMutableBooleanBag
-
bottomOccurrences
- Specified by:
bottomOccurrencesin interfaceBooleanBag- Specified by:
bottomOccurrencesin interfaceMutableBooleanBag
-
reject
- Specified by:
rejectin interfaceBooleanBag- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceMutableBooleanBag- Specified by:
rejectin interfaceMutableBooleanCollection
-
injectInto
public <T> T injectInto(T injectedValue, ObjectBooleanToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceBooleanIterable
-
chunk
- Specified by:
chunkin interfaceBooleanIterable
-
equals
- Specified by:
equalsin interfaceBooleanBag- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceBooleanBag- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
count
- Specified by:
countin interfaceBooleanIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceBooleanIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceBooleanIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceBooleanIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceBooleanIterable
-
collect
- Specified by:
collectin interfaceBooleanBag- Specified by:
collectin interfaceBooleanIterable- Specified by:
collectin interfaceMutableBooleanBag- Specified by:
collectin interfaceMutableBooleanCollection
-
toArray
public boolean[] toArray()- Specified by:
toArrayin interfaceBooleanIterable
-
toArray
public boolean[] toArray(boolean[] array) - Specified by:
toArrayin interfaceBooleanIterable
-
toList
- Specified by:
toListin interfaceBooleanIterable
-
toSet
- Specified by:
toSetin interfaceBooleanIterable
-
toBag
- Specified by:
toBagin interfaceBooleanIterable
-
asLazy
- Specified by:
asLazyin interfaceBooleanIterable
-
booleanIterator
- Specified by:
booleanIteratorin interfaceBooleanIterable- Specified by:
booleanIteratorin interfaceMutableBooleanCollection
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
selectUnique
- Specified by:
selectUniquein interfaceBooleanBag- Specified by:
selectUniquein interfaceMutableBooleanBag
-