Externalizable
, Serializable
, BooleanIterable
, BooleanValuesMap
, FloatBooleanMap
, MutableBooleanValuesMap
, MutableFloatBooleanMap
, PrimitiveIterable
, MutableFloatKeysMap
, FloatKeysMap
public class FloatBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableFloatBooleanMap, MutableFloatKeysMap, Externalizable
Constructor | Description |
---|---|
FloatBooleanHashMap() |
|
FloatBooleanHashMap(int initialCapacity) |
|
FloatBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
FloatBooleanHashMap(FloatBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableFloatBooleanMap |
asSynchronized() |
|
MutableFloatBooleanMap |
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(float key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(FloatProcedure procedure) |
|
void |
forEachKeyValue(FloatBooleanProcedure procedure) |
|
boolean |
get(float key) |
|
boolean |
getIfAbsent(float key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(float key,
boolean value) |
|
boolean |
getIfAbsentPut(float key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(float key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(float key,
FloatToBooleanFunction function) |
|
boolean |
getOrThrow(float key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableFloatSet |
keySet() |
|
LazyFloatIterable |
keysView() |
|
RichIterable<FloatBooleanPair> |
keyValuesView() |
|
static FloatBooleanHashMap |
newWithKeysValues(float key1,
boolean value1) |
|
static FloatBooleanHashMap |
newWithKeysValues(float key1,
boolean value1,
float key2,
boolean value2) |
|
static FloatBooleanHashMap |
newWithKeysValues(float key1,
boolean value1,
float key2,
boolean value2,
float key3,
boolean value3) |
|
static FloatBooleanHashMap |
newWithKeysValues(float key1,
boolean value1,
float key2,
boolean value2,
float key3,
boolean value3,
float key4,
boolean value4) |
|
void |
put(float key,
boolean value) |
|
void |
putAll(FloatBooleanMap map) |
|
void |
readExternal(ObjectInput in) |
|
FloatBooleanHashMap |
reject(FloatBooleanPredicate predicate) |
|
void |
remove(float key) |
|
void |
removeKey(float key) |
|
boolean |
removeKeyIfAbsent(float key,
boolean value) |
|
FloatBooleanHashMap |
select(FloatBooleanPredicate predicate) |
|
ImmutableFloatBooleanMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(float key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
void |
updateValues(FloatBooleanToBooleanFunction function) |
Updates the values in-place.
|
MutableBooleanCollection |
values() |
|
FloatBooleanHashMap |
withKeysValues(float key1,
boolean value1,
float key2,
boolean value2) |
|
FloatBooleanHashMap |
withKeysValues(float key1,
boolean value1,
float key2,
boolean value2,
float key3,
boolean value3) |
|
FloatBooleanHashMap |
withKeysValues(float key1,
boolean value1,
float key2,
boolean value2,
float key3,
boolean value3,
float key4,
boolean value4) |
|
FloatBooleanHashMap |
withKeyValue(float key1,
boolean value1) |
|
FloatBooleanHashMap |
withoutAllKeys(FloatIterable keys) |
|
FloatBooleanHashMap |
withoutKey(float 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 FloatBooleanHashMap()
public FloatBooleanHashMap(int initialCapacity)
public FloatBooleanHashMap(FloatBooleanMap map)
@Deprecated public FloatBooleanHashMap(int initialCapacity, float loadFactor)
public MutableFloatBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableFloatBooleanMap
public MutableFloatBooleanMap asSynchronized()
asSynchronized
in interface MutableFloatBooleanMap
public ImmutableFloatBooleanMap toImmutable()
toImmutable
in interface FloatBooleanMap
public static FloatBooleanHashMap newWithKeysValues(float key1, boolean value1)
public static FloatBooleanHashMap newWithKeysValues(float key1, boolean value1, float key2, boolean value2)
public static FloatBooleanHashMap newWithKeysValues(float key1, boolean value1, float key2, boolean value2, float key3, boolean value3)
public static FloatBooleanHashMap newWithKeysValues(float key1, boolean value1, float key2, boolean value2, float key3, boolean value3, float key4, boolean value4)
public FloatBooleanHashMap withKeyValue(float key1, boolean value1)
withKeyValue
in interface MutableFloatBooleanMap
public FloatBooleanHashMap withKeysValues(float key1, boolean value1, float key2, boolean value2)
public FloatBooleanHashMap withKeysValues(float key1, boolean value1, float key2, boolean value2, float key3, boolean value3)
public FloatBooleanHashMap withKeysValues(float key1, boolean value1, float key2, boolean value2, float key3, boolean value3, float key4, boolean value4)
public FloatBooleanHashMap withoutKey(float key)
withoutKey
in interface MutableFloatBooleanMap
public FloatBooleanHashMap withoutAllKeys(FloatIterable keys)
withoutAllKeys
in interface MutableFloatBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableFloatKeysMap
public void put(float key, boolean value)
put
in interface MutableFloatBooleanMap
public void putAll(FloatBooleanMap map)
putAll
in interface MutableFloatBooleanMap
public void updateValues(FloatBooleanToBooleanFunction function)
MutableFloatBooleanMap
updateValues
in interface MutableFloatBooleanMap
function
- that takes a key and its value and that returns a new value for this keypublic boolean containsKey(float key)
containsKey
in interface FloatBooleanMap
containsKey
in interface FloatKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(float key)
get
in interface FloatBooleanMap
public boolean getIfAbsent(float key, boolean ifAbsent)
getIfAbsent
in interface FloatBooleanMap
public boolean getOrThrow(float key)
getOrThrow
in interface FloatBooleanMap
public boolean getIfAbsentPut(float key, boolean value)
getIfAbsentPut
in interface MutableFloatBooleanMap
public boolean getIfAbsentPut(float key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableFloatBooleanMap
public <P> boolean getIfAbsentPutWith(float key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableFloatBooleanMap
public boolean getIfAbsentPutWithKey(float key, FloatToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableFloatBooleanMap
public boolean updateValue(float key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableFloatBooleanMap
public void removeKey(float key)
removeKey
in interface MutableFloatBooleanMap
removeKey
in interface MutableFloatKeysMap
public void remove(float key)
remove
in interface MutableFloatBooleanMap
public boolean removeKeyIfAbsent(float key, boolean value)
removeKeyIfAbsent
in interface MutableFloatBooleanMap
public boolean equals(Object obj)
FloatBooleanMap
Map.equals(Object)
.equals
in interface FloatBooleanMap
equals
in class Object
public int hashCode()
FloatBooleanMap
Map.hashCode()
.hashCode
in interface FloatBooleanMap
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 FloatBooleanMap
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(FloatProcedure procedure)
forEachKey
in interface FloatBooleanMap
forEachKey
in interface FloatKeysMap
public void forEachKeyValue(FloatBooleanProcedure procedure)
forEachKeyValue
in interface FloatBooleanMap
public FloatBooleanHashMap select(FloatBooleanPredicate predicate)
select
in interface FloatBooleanMap
select
in interface MutableFloatBooleanMap
public FloatBooleanHashMap reject(FloatBooleanPredicate predicate)
reject
in interface FloatBooleanMap
reject
in interface MutableFloatBooleanMap
public LazyFloatIterable keysView()
keysView
in interface FloatBooleanMap
public RichIterable<FloatBooleanPair> keyValuesView()
keyValuesView
in interface FloatBooleanMap
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 MutableFloatSet keySet()
keySet
in interface FloatBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2019. All rights reserved.