public class DoubleHashBag extends AbstractDoubleIterable implements MutableDoubleBag, Externalizable
HashBag, and is memory-optimized for double primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
DoubleHashBag() |
DoubleHashBag(double... elements) |
DoubleHashBag(DoubleHashBag bag) |
DoubleHashBag(DoubleIterable iterable) |
DoubleHashBag(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 DoubleHashBag()
public DoubleHashBag(int size)
public DoubleHashBag(DoubleIterable iterable)
public DoubleHashBag(double... elements)
public DoubleHashBag(DoubleHashBag bag)
public static DoubleHashBag newBag(int size)
public static DoubleHashBag newBagWith(double... source)
public static DoubleHashBag newBag(DoubleIterable source)
public static DoubleHashBag newBag(DoubleBag 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 DoubleBagpublic void clear()
clear in interface MutableDoubleCollectionpublic DoubleHashBag with(double element)
with in interface MutableDoubleBagwith in interface MutableDoubleCollectionpublic DoubleHashBag with(double element1, double element2)
public DoubleHashBag with(double element1, double element2, double element3)
public DoubleHashBag withAll(DoubleIterable iterable)
withAll in interface MutableDoubleBagwithAll in interface MutableDoubleCollectionpublic DoubleHashBag without(double element)
without in interface MutableDoubleBagwithout in interface MutableDoubleCollectionpublic DoubleHashBag withoutAll(DoubleIterable iterable)
withoutAll in interface MutableDoubleBagwithoutAll in interface MutableDoubleCollectionpublic boolean contains(double value)
contains in interface DoubleIterablepublic int occurrencesOf(double item)
occurrencesOf in interface DoubleBagpublic void forEachWithOccurrences(DoubleIntProcedure procedure)
forEachWithOccurrences in interface DoubleBagpublic DoubleHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface DoubleBagselectByOccurrences in interface MutableDoubleBagpublic MutableDoubleSet selectUnique()
selectUnique in interface DoubleBagselectUnique in interface MutableDoubleBagpublic MutableList<DoubleIntPair> topOccurrences(int count)
topOccurrences in interface DoubleBagtopOccurrences in interface MutableDoubleBagpublic MutableList<DoubleIntPair> bottomOccurrences(int count)
bottomOccurrences in interface DoubleBagbottomOccurrences in interface MutableDoubleBagpublic boolean add(double item)
add in interface MutableDoubleCollectionpublic boolean remove(double item)
remove in interface MutableDoubleCollectionpublic boolean removeIf(DoublePredicate predicate)
removeIf in interface MutableDoubleCollectionpublic boolean addAll(double... source)
addAll in interface MutableDoubleCollectionpublic boolean addAll(DoubleIterable source)
addAll in interface MutableDoubleCollectionpublic boolean removeAll(double... source)
removeAll in interface MutableDoubleCollectionpublic boolean removeAll(DoubleIterable source)
removeAll in interface MutableDoubleCollectionpublic boolean retainAll(DoubleIterable source)
retainAll in interface MutableDoubleCollectionpublic boolean retainAll(double... source)
retainAll in interface MutableDoubleCollectionpublic void addOccurrences(double item,
int occurrences)
addOccurrences in interface MutableDoubleBagpublic boolean removeOccurrences(double item,
int occurrences)
removeOccurrences in interface MutableDoubleBagpublic void each(DoubleProcedure procedure)
each in interface DoubleIterablepublic DoubleHashBag select(DoublePredicate predicate)
select in interface DoubleBagselect in interface MutableDoubleBagselect in interface MutableDoubleCollectionselect in interface DoubleIterablepublic DoubleHashBag reject(DoublePredicate predicate)
reject in interface DoubleBagreject in interface MutableDoubleBagreject in interface MutableDoubleCollectionreject in interface DoubleIterablepublic <T> T injectInto(T injectedValue,
ObjectDoubleToObjectFunction<? super T,? extends T> function)
injectInto in interface DoubleIterablepublic RichIterable<DoubleIterable> chunk(int size)
chunk in interface DoubleIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(DoublePredicate predicate)
count in interface DoubleIterablepublic boolean anySatisfy(DoublePredicate predicate)
anySatisfy in interface DoubleIterablepublic boolean allSatisfy(DoublePredicate predicate)
allSatisfy in interface DoubleIterablepublic boolean noneSatisfy(DoublePredicate predicate)
noneSatisfy in interface DoubleIterablepublic double detectIfNone(DoublePredicate predicate, double ifNone)
detectIfNone in interface DoubleIterablepublic <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
collect in interface DoubleBagcollect in interface MutableDoubleBagcollect in interface MutableDoubleCollectioncollect in interface DoubleIterablepublic double max()
max in interface DoubleIterablepublic double min()
min in interface DoubleIterablepublic double sum()
sum in interface DoubleIterablepublic double[] toArray()
toArray in interface DoubleIterablepublic double[] toArray(double[] array)
toArray in interface DoubleIterablepublic MutableDoubleBag asUnmodifiable()
asUnmodifiable in interface MutableDoubleBagasUnmodifiable in interface MutableDoubleCollectionpublic MutableDoubleBag asSynchronized()
asSynchronized in interface MutableDoubleBagasSynchronized in interface MutableDoubleCollectionpublic ImmutableDoubleBag toImmutable()
toImmutable in interface DoubleBagtoImmutable in interface MutableDoubleBagtoImmutable in interface MutableDoubleCollectionpublic DoubleHashBag newEmpty()
newEmpty in interface MutableDoubleBagnewEmpty in interface MutableDoubleCollectionpublic MutableDoubleIterator doubleIterator()
doubleIterator in interface MutableDoubleCollectiondoubleIterator in interface DoubleIterablepublic 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.