Class DoubleHashBag
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractDoubleIterable
org.eclipse.collections.impl.bag.mutable.primitive.DoubleHashBag
- All Implemented Interfaces:
Externalizable,Serializable,DoubleBag,MutableDoubleBag,MutableDoubleCollection,DoubleIterable,PrimitiveIterable
public class DoubleHashBag
extends AbstractDoubleIterable
implements MutableDoubleBag, Externalizable
DoubleHashBag is similar to
HashBag, and is memory-optimized for double primitives.
This file was automatically generated from template file primitiveHashBag.stg.- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleHashBag(double... elements) DoubleHashBag(int size) DoubleHashBag(DoubleIterable iterable) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(double item) booleanaddAll(double... source) booleanaddAll(DoubleIterable source) voidaddOccurrences(double item, int occurrences) booleanallSatisfy(DoublePredicate predicate) booleananySatisfy(DoublePredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) bottomOccurrences(int count) chunk(int size) voidclear()<V> MutableBag<V>collect(DoubleToObjectFunction<? extends V> function) booleancontains(double value) intcount(DoublePredicate predicate) doubledetectIfNone(DoublePredicate predicate, double ifNone) voideach(DoubleProcedure procedure) booleanvoidforEachWithOccurrences(DoubleIntProcedure procedure) inthashCode()<T> TinjectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function) booleanisEmpty()doublemax()doublemin()static DoubleHashBagnewBag(int size) static DoubleHashBagstatic DoubleHashBagnewBag(DoubleIterable source) static DoubleHashBagnewBagWith(double... source) newEmpty()Creates a new empty DoubleHashBag.booleannoneSatisfy(DoublePredicate predicate) booleannotEmpty()intoccurrencesOf(double item) voidreject(DoublePredicate predicate) booleanremove(double item) booleanremoveAll(double... source) booleanremoveAll(DoubleIterable source) booleanremoveIf(DoublePredicate predicate) booleanremoveOccurrences(double item, int occurrences) booleanretainAll(double... source) booleanretainAll(DoubleIterable source) select(DoublePredicate predicate) selectByOccurrences(IntPredicate predicate) intsize()intdoublesum()double[]toArray()double[]toArray(double[] array) topOccurrences(int count) with(double element) with(double element1, double element2) with(double element1, double element2, double element3) withAll(DoubleIterable iterable) without(double element) withoutAll(DoubleIterable iterable) voidMethods inherited from class org.eclipse.collections.impl.primitive.AbstractDoubleIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.DoubleBag
toStringOfItemToCountMethods inherited from interface org.eclipse.collections.api.DoubleIterable
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.MutableDoubleBag
selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
DoubleHashBag
public DoubleHashBag() -
DoubleHashBag
public DoubleHashBag(int size) -
DoubleHashBag
-
DoubleHashBag
public DoubleHashBag(double... elements) -
DoubleHashBag
-
-
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 interfaceDoubleBag
-
clear
public void clear()- Specified by:
clearin interfaceMutableDoubleCollection
-
with
- Specified by:
within interfaceMutableDoubleBag- Specified by:
within interfaceMutableDoubleCollection
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableDoubleBag- Specified by:
withAllin interfaceMutableDoubleCollection
-
without
- Specified by:
withoutin interfaceMutableDoubleBag- Specified by:
withoutin interfaceMutableDoubleCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableDoubleBag- Specified by:
withoutAllin interfaceMutableDoubleCollection
-
contains
public boolean contains(double value) - Specified by:
containsin interfaceDoubleIterable
-
occurrencesOf
public int occurrencesOf(double item) - Specified by:
occurrencesOfin interfaceDoubleBag
-
forEachWithOccurrences
- Specified by:
forEachWithOccurrencesin interfaceDoubleBag
-
selectByOccurrences
- Specified by:
selectByOccurrencesin interfaceDoubleBag- Specified by:
selectByOccurrencesin interfaceMutableDoubleBag
-
selectUnique
- Specified by:
selectUniquein interfaceDoubleBag- Specified by:
selectUniquein interfaceMutableDoubleBag
-
topOccurrences
- Specified by:
topOccurrencesin interfaceDoubleBag- Specified by:
topOccurrencesin interfaceMutableDoubleBag
-
bottomOccurrences
- Specified by:
bottomOccurrencesin interfaceDoubleBag- Specified by:
bottomOccurrencesin interfaceMutableDoubleBag
-
add
public boolean add(double item) - Specified by:
addin interfaceMutableDoubleCollection
-
remove
public boolean remove(double item) - Specified by:
removein interfaceMutableDoubleCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableDoubleCollection
-
addAll
public boolean addAll(double... source) - Specified by:
addAllin interfaceMutableDoubleCollection
-
addAll
- Specified by:
addAllin interfaceMutableDoubleCollection
-
removeAll
public boolean removeAll(double... source) - Specified by:
removeAllin interfaceMutableDoubleCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableDoubleCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableDoubleCollection
-
retainAll
public boolean retainAll(double... source) - Specified by:
retainAllin interfaceMutableDoubleCollection
-
addOccurrences
public void addOccurrences(double item, int occurrences) - Specified by:
addOccurrencesin interfaceMutableDoubleBag
-
removeOccurrences
public boolean removeOccurrences(double item, int occurrences) - Specified by:
removeOccurrencesin interfaceMutableDoubleBag
-
each
- Specified by:
eachin interfaceDoubleIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceDoubleBag- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceMutableDoubleBag- Specified by:
selectin interfaceMutableDoubleCollection
-
reject
- Specified by:
rejectin interfaceDoubleBag- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceMutableDoubleBag- Specified by:
rejectin interfaceMutableDoubleCollection
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceDoubleIterable
-
chunk
- Specified by:
chunkin interfaceDoubleIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
count
- Specified by:
countin interfaceDoubleIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceDoubleIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceDoubleIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceDoubleIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceDoubleIterable
-
collect
- Specified by:
collectin interfaceDoubleBag- Specified by:
collectin interfaceDoubleIterable- Specified by:
collectin interfaceMutableDoubleBag- Specified by:
collectin interfaceMutableDoubleCollection
-
max
public double max()- Specified by:
maxin interfaceDoubleIterable
-
min
public double min()- Specified by:
minin interfaceDoubleIterable
-
sum
public double sum()- Specified by:
sumin interfaceDoubleIterable
-
toArray
public double[] toArray()- Specified by:
toArrayin interfaceDoubleIterable
-
toArray
public double[] toArray(double[] array) - Specified by:
toArrayin interfaceDoubleIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableDoubleBag- Specified by:
asUnmodifiablein interfaceMutableDoubleCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableDoubleBag- Specified by:
asSynchronizedin interfaceMutableDoubleCollection
-
toImmutable
- Specified by:
toImmutablein interfaceDoubleBag- Specified by:
toImmutablein interfaceMutableDoubleBag- Specified by:
toImmutablein interfaceMutableDoubleCollection
-
newEmpty
Creates a new empty DoubleHashBag.- Specified by:
newEmptyin interfaceMutableDoubleBag- Specified by:
newEmptyin interfaceMutableDoubleCollection- Since:
- 9.2.
-
doubleIterator
- Specified by:
doubleIteratorin interfaceDoubleIterable- Specified by:
doubleIteratorin interfaceMutableDoubleCollection
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-