java.io.Externalizable, java.io.Serializable, MutableDoubleCollection, DoubleIterable, PrimitiveIterable, DoubleSet, MutableDoubleSetpublic class DoubleHashSet extends AbstractDoubleSet implements MutableDoubleSet, java.io.Externalizable
| Constructor | Description |
|---|---|
DoubleHashSet() |
|
DoubleHashSet(double... elements) |
|
DoubleHashSet(int initialCapacity) |
|
DoubleHashSet(DoubleHashSet set) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(double element) |
|
boolean |
addAll(double... source) |
|
boolean |
addAll(DoubleIterable source) |
|
boolean |
allSatisfy(DoublePredicate predicate) |
Returns true if all of the elements in the DoubleIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(DoublePredicate predicate) |
Returns true if any of the elements in the DoubleIterable return true for the
specified predicate, otherwise returns false.
|
void |
appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end) |
Prints a string representation of this collection onto the given
Appendable. |
MutableDoubleSet |
asSynchronized() |
|
MutableDoubleSet |
asUnmodifiable() |
|
RichIterable<DoubleIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
void |
clear() |
|
<V> MutableSet<V> |
collect(DoubleToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
<V,R extends java.util.Collection<V>> |
collect(DoubleToObjectFunction<? extends V> function,
R target) |
Same as
DoubleIterable.collect(DoubleToObjectFunction) , only the results are added to the target Collection. |
void |
compact() |
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
contains(double value) |
Returns true if the value is contained in the DoubleIterable, and false if it is not.
|
int |
count(DoublePredicate predicate) |
Returns a count of the number of elements in the DoubleIterable that return true for the
specified predicate.
|
double |
detectIfNone(DoublePredicate predicate,
double ifNone) |
|
MutableDoubleIterator |
doubleIterator() |
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an
imperative style.
|
void |
each(DoubleProcedure procedure) |
A synonym for forEach.
|
void |
forEach(DoubleProcedure procedure) |
Applies the DoubleProcedure to each element in the DoubleIterable.
|
DoubleSet |
freeze() |
Returns a frozen copy of this set.
|
int |
hashCode() |
Follows the same general contract as
Set.hashCode(). |
<T> T |
injectInto(T injectedValue,
ObjectDoubleToObjectFunction<? super T,? extends T> function) |
|
double |
max() |
|
double |
min() |
|
DoubleHashSet |
newEmpty() |
Creates a new empty DoubleHashSet.
|
static DoubleHashSet |
newSet(DoubleIterable source) |
|
static DoubleHashSet |
newSetWith(double... source) |
|
boolean |
noneSatisfy(DoublePredicate predicate) |
Returns true if none of the elements in the DoubleIterable return true for the
specified predicate, otherwise returns false.
|
void |
readExternal(java.io.ObjectInput in) |
|
DoubleHashSet |
reject(DoublePredicate predicate) |
Returns a new DoubleIterable with all of the elements in the DoubleIterable that
return false for the specified predicate.
|
<R extends MutableDoubleCollection> |
reject(DoublePredicate predicate,
R target) |
Same as
DoubleIterable.reject(DoublePredicate) , only the results are added to the target MutableDoubleCollection. |
boolean |
remove(double value) |
|
boolean |
removeAll(double... source) |
|
boolean |
removeAll(DoubleIterable source) |
|
boolean |
retainAll(double... source) |
|
boolean |
retainAll(DoubleIterable source) |
|
DoubleHashSet |
select(DoublePredicate predicate) |
Returns a new DoubleIterable with all of the elements in the DoubleIterable that
return true for the specified predicate.
|
<R extends MutableDoubleCollection> |
select(DoublePredicate predicate,
R target) |
Same as
DoubleIterable.select(DoublePredicate) , only the results are added to the target MutableDoubleCollection. |
int |
size() |
Returns the number of items in this iterable.
|
double |
sum() |
|
double[] |
toArray() |
Converts the DoubleIterable to a primitive double array.
|
ImmutableDoubleSet |
toImmutable() |
Returns an immutable copy of this set.
|
DoubleHashSet |
with(double element) |
|
DoubleHashSet |
withAll(DoubleIterable elements) |
|
DoubleHashSet |
without(double element) |
|
DoubleHashSet |
withoutAll(DoubleIterable elements) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringequalsasLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, flatCollect, maxIfEmpty, median, medianIfEmpty, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedListremoveIftapappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic DoubleHashSet()
public DoubleHashSet(int initialCapacity)
public DoubleHashSet(double... elements)
public DoubleHashSet(DoubleHashSet set)
public static DoubleHashSet newSet(DoubleIterable source)
public static DoubleHashSet newSetWith(double... source)
public int hashCode()
DoubleSetSet.hashCode().hashCode in interface DoubleSethashCode in class AbstractDoubleSetpublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic boolean add(double element)
add in interface MutableDoubleCollectionpublic boolean addAll(double... source)
addAll in interface MutableDoubleCollectionpublic boolean addAll(DoubleIterable source)
addAll in interface MutableDoubleCollectionpublic boolean remove(double value)
remove in interface MutableDoubleCollectionpublic boolean removeAll(DoubleIterable source)
removeAll in interface MutableDoubleCollectionpublic boolean removeAll(double... source)
removeAll in interface MutableDoubleCollectionpublic boolean retainAll(DoubleIterable source)
retainAll in interface MutableDoubleCollectionCollection.retainAll(Collection)public boolean retainAll(double... source)
retainAll in interface MutableDoubleCollectionCollection.retainAll(Collection)public void clear()
clear in interface MutableDoubleCollectionpublic DoubleHashSet with(double element)
with in interface MutableDoubleCollectionwith in interface MutableDoubleSetpublic DoubleHashSet without(double element)
without in interface MutableDoubleCollectionwithout in interface MutableDoubleSetpublic DoubleHashSet withAll(DoubleIterable elements)
withAll in interface MutableDoubleCollectionwithAll in interface MutableDoubleSetpublic DoubleHashSet withoutAll(DoubleIterable elements)
withoutAll in interface MutableDoubleCollectionwithoutAll in interface MutableDoubleSetpublic MutableDoubleSet asUnmodifiable()
asUnmodifiable in interface MutableDoubleCollectionasUnmodifiable in interface MutableDoubleSetpublic MutableDoubleSet asSynchronized()
asSynchronized in interface MutableDoubleCollectionasSynchronized in interface MutableDoubleSetpublic ImmutableDoubleSet toImmutable()
MutableDoubleSettoImmutable in interface DoubleSettoImmutable in interface MutableDoubleCollectiontoImmutable in interface MutableDoubleSetpublic MutableDoubleIterator doubleIterator()
DoubleIterabledoubleIterator in interface DoubleIterabledoubleIterator in interface MutableDoubleCollectionpublic double[] toArray()
DoubleIterabletoArray in interface DoubleIterablepublic boolean contains(double value)
DoubleIterablecontains in interface DoubleIterablepublic void forEach(DoubleProcedure procedure)
DoubleIterableforEach in interface DoubleIterablepublic void each(DoubleProcedure procedure)
DoubleIterableeach in interface DoubleIterablepublic DoubleHashSet select(DoublePredicate predicate)
DoubleIterableselect in interface DoubleIterableselect in interface DoubleSetselect in interface MutableDoubleCollectionselect in interface MutableDoubleSetpublic <R extends MutableDoubleCollection> R select(DoublePredicate predicate, R target)
DoubleIterableDoubleIterable.select(DoublePredicate) , only the results are added to the target MutableDoubleCollection.select in interface DoubleIterablepublic DoubleHashSet reject(DoublePredicate predicate)
DoubleIterablereject in interface DoubleIterablereject in interface DoubleSetreject in interface MutableDoubleCollectionreject in interface MutableDoubleSetpublic <R extends MutableDoubleCollection> R reject(DoublePredicate predicate, R target)
DoubleIterableDoubleIterable.reject(DoublePredicate) , only the results are added to the target MutableDoubleCollection.reject in interface DoubleIterablepublic <V> MutableSet<V> collect(DoubleToObjectFunction<? extends V> function)
DoubleIterablecollect in interface DoubleIterablecollect in interface DoubleSetcollect in interface MutableDoubleCollectioncollect in interface MutableDoubleSetpublic <V,R extends java.util.Collection<V>> R collect(DoubleToObjectFunction<? extends V> function, R target)
DoubleIterableDoubleIterable.collect(DoubleToObjectFunction) , only the results are added to the target Collection.collect in interface DoubleIterablepublic double detectIfNone(DoublePredicate predicate, double ifNone)
detectIfNone in interface DoubleIterablepublic int count(DoublePredicate predicate)
DoubleIterablecount in interface DoubleIterablepublic boolean anySatisfy(DoublePredicate predicate)
DoubleIterableanySatisfy in interface DoubleIterablepublic boolean allSatisfy(DoublePredicate predicate)
DoubleIterableallSatisfy in interface DoubleIterablepublic boolean noneSatisfy(DoublePredicate predicate)
DoubleIterablenoneSatisfy in interface DoubleIterablepublic double sum()
sum in interface DoubleIterablepublic double max()
max in interface DoubleIterablepublic double min()
min in interface DoubleIterablepublic DoubleSet freeze()
MutableDoubleSetfreeze in interface DoubleSetfreeze in interface MutableDoubleSetpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic <T> T injectInto(T injectedValue,
ObjectDoubleToObjectFunction<? super T,? extends T> function)
injectInto in interface DoubleIterablepublic RichIterable<DoubleIterable> chunk(int size)
DoubleIterablechunk in interface DoubleIterablesize - the number of elements per chunkRichIterable containing DoubleIterables of size size, except the last will be
truncated if the elements don't divide evenly.public DoubleHashSet newEmpty()
newEmpty in interface MutableDoubleCollectionnewEmpty in interface MutableDoubleSetpublic void compact()
Copyright © 2004–2018. All rights reserved.