Externalizable
, Serializable
, BooleanIterable
, BooleanValuesMap
, IntBooleanMap
, MutableBooleanValuesMap
, MutableIntBooleanMap
, PrimitiveIterable
, MutableIntKeysMap
, IntKeysMap
public class IntBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableIntBooleanMap, MutableIntKeysMap, Externalizable
Constructor | Description |
---|---|
IntBooleanHashMap() |
|
IntBooleanHashMap(int initialCapacity) |
|
IntBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
IntBooleanHashMap(IntBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableIntBooleanMap |
asSynchronized() |
|
MutableIntBooleanMap |
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(int key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(IntProcedure procedure) |
|
void |
forEachKeyValue(IntBooleanProcedure procedure) |
|
boolean |
get(int key) |
|
boolean |
getIfAbsent(int key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(int key,
boolean value) |
|
boolean |
getIfAbsentPut(int key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(int key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(int key,
IntToBooleanFunction function) |
|
boolean |
getOrThrow(int key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableIntSet |
keySet() |
|
LazyIntIterable |
keysView() |
|
RichIterable<IntBooleanPair> |
keyValuesView() |
|
static IntBooleanHashMap |
newWithKeysValues(int key1,
boolean value1) |
|
static IntBooleanHashMap |
newWithKeysValues(int key1,
boolean value1,
int key2,
boolean value2) |
|
static IntBooleanHashMap |
newWithKeysValues(int key1,
boolean value1,
int key2,
boolean value2,
int key3,
boolean value3) |
|
static IntBooleanHashMap |
newWithKeysValues(int key1,
boolean value1,
int key2,
boolean value2,
int key3,
boolean value3,
int key4,
boolean value4) |
|
void |
put(int key,
boolean value) |
|
void |
putAll(IntBooleanMap map) |
|
void |
readExternal(ObjectInput in) |
|
IntBooleanHashMap |
reject(IntBooleanPredicate predicate) |
|
void |
remove(int key) |
|
void |
removeKey(int key) |
|
boolean |
removeKeyIfAbsent(int key,
boolean value) |
|
IntBooleanHashMap |
select(IntBooleanPredicate predicate) |
|
ImmutableIntBooleanMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(int key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
MutableBooleanCollection |
values() |
|
IntBooleanHashMap |
withKeysValues(int key1,
boolean value1,
int key2,
boolean value2) |
|
IntBooleanHashMap |
withKeysValues(int key1,
boolean value1,
int key2,
boolean value2,
int key3,
boolean value3) |
|
IntBooleanHashMap |
withKeysValues(int key1,
boolean value1,
int key2,
boolean value2,
int key3,
boolean value3,
int key4,
boolean value4) |
|
IntBooleanHashMap |
withKeyValue(int key1,
boolean value1) |
|
IntBooleanHashMap |
withoutAllKeys(IntIterable keys) |
|
IntBooleanHashMap |
withoutKey(int key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, containsAll, toBag, toList, toSet
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, count, detectIfNone, each, forEach, forEachValue, injectInto, isEmpty, noneSatisfy, notEmpty, reject, select, size, toArray
allSatisfy, anySatisfy, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, noneSatisfy, reject, select, toArray, toBag, toList, toSet
forEachValue
isEmpty, notEmpty, size
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public IntBooleanHashMap()
public IntBooleanHashMap(int initialCapacity)
public IntBooleanHashMap(IntBooleanMap map)
@Deprecated public IntBooleanHashMap(int initialCapacity, float loadFactor)
public MutableIntBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableIntBooleanMap
public MutableIntBooleanMap asSynchronized()
asSynchronized
in interface MutableIntBooleanMap
public ImmutableIntBooleanMap toImmutable()
toImmutable
in interface IntBooleanMap
public static IntBooleanHashMap newWithKeysValues(int key1, boolean value1)
public static IntBooleanHashMap newWithKeysValues(int key1, boolean value1, int key2, boolean value2)
public static IntBooleanHashMap newWithKeysValues(int key1, boolean value1, int key2, boolean value2, int key3, boolean value3)
public static IntBooleanHashMap newWithKeysValues(int key1, boolean value1, int key2, boolean value2, int key3, boolean value3, int key4, boolean value4)
public IntBooleanHashMap withKeyValue(int key1, boolean value1)
withKeyValue
in interface MutableIntBooleanMap
public IntBooleanHashMap withKeysValues(int key1, boolean value1, int key2, boolean value2)
public IntBooleanHashMap withKeysValues(int key1, boolean value1, int key2, boolean value2, int key3, boolean value3)
public IntBooleanHashMap withKeysValues(int key1, boolean value1, int key2, boolean value2, int key3, boolean value3, int key4, boolean value4)
public IntBooleanHashMap withoutKey(int key)
withoutKey
in interface MutableIntBooleanMap
public IntBooleanHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys
in interface MutableIntBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableIntKeysMap
public void put(int key, boolean value)
put
in interface MutableIntBooleanMap
public void putAll(IntBooleanMap map)
putAll
in interface MutableIntBooleanMap
public boolean containsKey(int key)
containsKey
in interface IntBooleanMap
containsKey
in interface IntKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(int key)
get
in interface IntBooleanMap
public boolean getIfAbsent(int key, boolean ifAbsent)
getIfAbsent
in interface IntBooleanMap
public boolean getOrThrow(int key)
getOrThrow
in interface IntBooleanMap
public boolean getIfAbsentPut(int key, boolean value)
getIfAbsentPut
in interface MutableIntBooleanMap
public boolean getIfAbsentPut(int key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableIntBooleanMap
public <P> boolean getIfAbsentPutWith(int key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableIntBooleanMap
public boolean getIfAbsentPutWithKey(int key, IntToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableIntBooleanMap
public boolean updateValue(int key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableIntBooleanMap
public void removeKey(int key)
removeKey
in interface MutableIntBooleanMap
removeKey
in interface MutableIntKeysMap
public void remove(int key)
remove
in interface MutableIntBooleanMap
public boolean removeKeyIfAbsent(int key, boolean value)
removeKeyIfAbsent
in interface MutableIntBooleanMap
public boolean equals(Object obj)
IntBooleanMap
Map.equals(Object)
.equals
in interface IntBooleanMap
equals
in class Object
public int hashCode()
IntBooleanMap
Map.hashCode()
.hashCode
in interface IntBooleanMap
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 IntBooleanMap
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(IntProcedure procedure)
forEachKey
in interface IntBooleanMap
forEachKey
in interface IntKeysMap
public void forEachKeyValue(IntBooleanProcedure procedure)
forEachKeyValue
in interface IntBooleanMap
public IntBooleanHashMap select(IntBooleanPredicate predicate)
select
in interface IntBooleanMap
select
in interface MutableIntBooleanMap
public IntBooleanHashMap reject(IntBooleanPredicate predicate)
reject
in interface IntBooleanMap
reject
in interface MutableIntBooleanMap
public LazyIntIterable keysView()
keysView
in interface IntBooleanMap
public RichIterable<IntBooleanPair> keyValuesView()
keyValuesView
in interface IntBooleanMap
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 MutableIntSet keySet()
keySet
in interface IntBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2017. All rights reserved.