Externalizable
, Serializable
, BooleanIterable
, BooleanValuesMap
, DoubleBooleanMap
, MutableBooleanValuesMap
, MutableDoubleBooleanMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableDoubleBooleanMap, MutableDoubleKeysMap, Externalizable
Constructor | Description |
---|---|
DoubleBooleanHashMap() |
|
DoubleBooleanHashMap(int initialCapacity) |
|
DoubleBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
DoubleBooleanHashMap(DoubleBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableDoubleBooleanMap |
asSynchronized() |
|
MutableDoubleBooleanMap |
asUnmodifiable() |
|
MutableBooleanIterator |
booleanIterator() |
Returns a primitive iterator that can be used to iterate over the BooleanIterable in an
imperative style.
|
void |
clear() |
|
void |
compact() |
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
containsKey(double key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleBooleanProcedure procedure) |
|
boolean |
get(double key) |
|
boolean |
getIfAbsent(double key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(double key,
boolean value) |
|
boolean |
getIfAbsentPut(double key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(double key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(double key,
DoubleToBooleanFunction function) |
|
boolean |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleBooleanPair> |
keyValuesView() |
|
static DoubleBooleanHashMap |
newWithKeysValues(double key1,
boolean value1) |
|
static DoubleBooleanHashMap |
newWithKeysValues(double key1,
boolean value1,
double key2,
boolean value2) |
|
static DoubleBooleanHashMap |
newWithKeysValues(double key1,
boolean value1,
double key2,
boolean value2,
double key3,
boolean value3) |
|
static DoubleBooleanHashMap |
newWithKeysValues(double key1,
boolean value1,
double key2,
boolean value2,
double key3,
boolean value3,
double key4,
boolean value4) |
|
void |
put(double key,
boolean value) |
|
void |
putAll(DoubleBooleanMap map) |
|
void |
readExternal(ObjectInput in) |
|
DoubleBooleanHashMap |
reject(DoubleBooleanPredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
boolean |
removeKeyIfAbsent(double key,
boolean value) |
|
DoubleBooleanHashMap |
select(DoubleBooleanPredicate predicate) |
|
ImmutableDoubleBooleanMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(double key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
void |
updateValues(DoubleBooleanToBooleanFunction function) |
Updates the values in-place.
|
MutableBooleanCollection |
values() |
|
DoubleBooleanHashMap |
withKeysValues(double key1,
boolean value1,
double key2,
boolean value2) |
|
DoubleBooleanHashMap |
withKeysValues(double key1,
boolean value1,
double key2,
boolean value2,
double key3,
boolean value3) |
|
DoubleBooleanHashMap |
withKeysValues(double key1,
boolean value1,
double key2,
boolean value2,
double key3,
boolean value3,
double key4,
boolean value4) |
|
DoubleBooleanHashMap |
withKeyValue(double key1,
boolean value1) |
|
DoubleBooleanHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleBooleanHashMap |
withoutKey(double key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, containsAll, toBag, toList, toSet
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, count, detectIfNone, each, forEach, forEachValue, injectInto, isEmpty, noneSatisfy, notEmpty, reject, select, size, toArray
allSatisfy, anySatisfy, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toBag, toList, toSet
forEachValue, tap
isEmpty, notEmpty, size
collect, reject, select
putPair, withAllKeyValues
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public DoubleBooleanHashMap()
public DoubleBooleanHashMap(int initialCapacity)
public DoubleBooleanHashMap(DoubleBooleanMap map)
@Deprecated public DoubleBooleanHashMap(int initialCapacity, float loadFactor)
public MutableDoubleBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleBooleanMap
public MutableDoubleBooleanMap asSynchronized()
asSynchronized
in interface MutableDoubleBooleanMap
public ImmutableDoubleBooleanMap toImmutable()
toImmutable
in interface DoubleBooleanMap
public static DoubleBooleanHashMap newWithKeysValues(double key1, boolean value1)
public static DoubleBooleanHashMap newWithKeysValues(double key1, boolean value1, double key2, boolean value2)
public static DoubleBooleanHashMap newWithKeysValues(double key1, boolean value1, double key2, boolean value2, double key3, boolean value3)
public static DoubleBooleanHashMap newWithKeysValues(double key1, boolean value1, double key2, boolean value2, double key3, boolean value3, double key4, boolean value4)
public DoubleBooleanHashMap withKeyValue(double key1, boolean value1)
withKeyValue
in interface MutableDoubleBooleanMap
public DoubleBooleanHashMap withKeysValues(double key1, boolean value1, double key2, boolean value2)
public DoubleBooleanHashMap withKeysValues(double key1, boolean value1, double key2, boolean value2, double key3, boolean value3)
public DoubleBooleanHashMap withKeysValues(double key1, boolean value1, double key2, boolean value2, double key3, boolean value3, double key4, boolean value4)
public DoubleBooleanHashMap withoutKey(double key)
withoutKey
in interface MutableDoubleBooleanMap
public DoubleBooleanHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableDoubleKeysMap
public void put(double key, boolean value)
put
in interface MutableDoubleBooleanMap
public void putAll(DoubleBooleanMap map)
putAll
in interface MutableDoubleBooleanMap
public void updateValues(DoubleBooleanToBooleanFunction function)
MutableDoubleBooleanMap
updateValues
in interface MutableDoubleBooleanMap
function
- that takes a key and its value and that returns a new value for this keypublic boolean containsKey(double key)
containsKey
in interface DoubleBooleanMap
containsKey
in interface DoubleKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(double key)
get
in interface DoubleBooleanMap
public boolean getIfAbsent(double key, boolean ifAbsent)
getIfAbsent
in interface DoubleBooleanMap
public boolean getOrThrow(double key)
getOrThrow
in interface DoubleBooleanMap
public boolean getIfAbsentPut(double key, boolean value)
getIfAbsentPut
in interface MutableDoubleBooleanMap
public boolean getIfAbsentPut(double key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableDoubleBooleanMap
public <P> boolean getIfAbsentPutWith(double key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleBooleanMap
public boolean getIfAbsentPutWithKey(double key, DoubleToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleBooleanMap
public boolean updateValue(double key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableDoubleBooleanMap
public void removeKey(double key)
removeKey
in interface MutableDoubleBooleanMap
removeKey
in interface MutableDoubleKeysMap
public void remove(double key)
remove
in interface MutableDoubleBooleanMap
public boolean removeKeyIfAbsent(double key, boolean value)
removeKeyIfAbsent
in interface MutableDoubleBooleanMap
public boolean equals(Object obj)
DoubleBooleanMap
Map.equals(Object)
.equals
in interface DoubleBooleanMap
equals
in class Object
public int hashCode()
DoubleBooleanMap
Map.hashCode()
.hashCode
in interface DoubleBooleanMap
hashCode
in class Object
public String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString()); Assert.assertEquals("[1]", IntLists.mutable.with(1).toString()); Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString
in interface DoubleBooleanMap
toString
in interface PrimitiveIterable
toString
in class AbstractBooleanIterable
AbstractCollection.toString()
public MutableBooleanIterator booleanIterator()
BooleanIterable
booleanIterator
in interface BooleanIterable
booleanIterator
in interface MutableBooleanValuesMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleBooleanMap
forEachKey
in interface DoubleKeysMap
public void forEachKeyValue(DoubleBooleanProcedure procedure)
forEachKeyValue
in interface DoubleBooleanMap
public DoubleBooleanHashMap select(DoubleBooleanPredicate predicate)
select
in interface DoubleBooleanMap
select
in interface MutableDoubleBooleanMap
public DoubleBooleanHashMap reject(DoubleBooleanPredicate predicate)
reject
in interface DoubleBooleanMap
reject
in interface MutableDoubleBooleanMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleBooleanMap
public RichIterable<DoubleBooleanPair> keyValuesView()
keyValuesView
in interface DoubleBooleanMap
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public MutableDoubleSet keySet()
keySet
in interface DoubleBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2019. All rights reserved.