java.io.Externalizable
, java.io.Serializable
, BooleanIterable
, BooleanValuesMap
, MutableBooleanValuesMap
, MutableShortBooleanMap
, ShortBooleanMap
, PrimitiveIterable
, MutableShortKeysMap
, ShortKeysMap
public class ShortBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableShortBooleanMap, MutableShortKeysMap, java.io.Externalizable
Constructor | Description |
---|---|
ShortBooleanHashMap() |
|
ShortBooleanHashMap(int initialCapacity) |
|
ShortBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
ShortBooleanHashMap(ShortBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableShortBooleanMap |
asSynchronized() |
|
MutableShortBooleanMap |
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(short key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(ShortProcedure procedure) |
|
void |
forEachKeyValue(ShortBooleanProcedure procedure) |
|
boolean |
get(short key) |
|
boolean |
getIfAbsent(short key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(short key,
boolean value) |
|
boolean |
getIfAbsentPut(short key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(short key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(short key,
ShortToBooleanFunction function) |
|
boolean |
getOrThrow(short key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableShortSet |
keySet() |
|
LazyShortIterable |
keysView() |
|
RichIterable<ShortBooleanPair> |
keyValuesView() |
|
static ShortBooleanHashMap |
newWithKeysValues(short key1,
boolean value1) |
|
static ShortBooleanHashMap |
newWithKeysValues(short key1,
boolean value1,
short key2,
boolean value2) |
|
static ShortBooleanHashMap |
newWithKeysValues(short key1,
boolean value1,
short key2,
boolean value2,
short key3,
boolean value3) |
|
static ShortBooleanHashMap |
newWithKeysValues(short key1,
boolean value1,
short key2,
boolean value2,
short key3,
boolean value3,
short key4,
boolean value4) |
|
void |
put(short key,
boolean value) |
|
void |
putAll(ShortBooleanMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
ShortBooleanHashMap |
reject(ShortBooleanPredicate predicate) |
|
void |
remove(short key) |
|
void |
removeKey(short key) |
|
boolean |
removeKeyIfAbsent(short key,
boolean value) |
|
ShortBooleanHashMap |
select(ShortBooleanPredicate predicate) |
|
ImmutableShortBooleanMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(short key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
MutableBooleanCollection |
values() |
|
ShortBooleanHashMap |
withKeysValues(short key1,
boolean value1,
short key2,
boolean value2) |
|
ShortBooleanHashMap |
withKeysValues(short key1,
boolean value1,
short key2,
boolean value2,
short key3,
boolean value3) |
|
ShortBooleanHashMap |
withKeysValues(short key1,
boolean value1,
short key2,
boolean value2,
short key3,
boolean value3,
short key4,
boolean value4) |
|
ShortBooleanHashMap |
withKeyValue(short key1,
boolean value1) |
|
ShortBooleanHashMap |
withoutAllKeys(ShortIterable keys) |
|
ShortBooleanHashMap |
withoutKey(short key) |
|
void |
writeExternal(java.io.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, reject, select, toArray, toBag, toList, toSet
forEachValue, tap
collect, reject, select
putPair
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
isEmpty, notEmpty, size
public ShortBooleanHashMap()
public ShortBooleanHashMap(int initialCapacity)
public ShortBooleanHashMap(ShortBooleanMap map)
@Deprecated public ShortBooleanHashMap(int initialCapacity, float loadFactor)
public MutableShortBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableShortBooleanMap
public MutableShortBooleanMap asSynchronized()
asSynchronized
in interface MutableShortBooleanMap
public ImmutableShortBooleanMap toImmutable()
toImmutable
in interface ShortBooleanMap
public static ShortBooleanHashMap newWithKeysValues(short key1, boolean value1)
public static ShortBooleanHashMap newWithKeysValues(short key1, boolean value1, short key2, boolean value2)
public static ShortBooleanHashMap newWithKeysValues(short key1, boolean value1, short key2, boolean value2, short key3, boolean value3)
public static ShortBooleanHashMap newWithKeysValues(short key1, boolean value1, short key2, boolean value2, short key3, boolean value3, short key4, boolean value4)
public ShortBooleanHashMap withKeyValue(short key1, boolean value1)
withKeyValue
in interface MutableShortBooleanMap
public ShortBooleanHashMap withKeysValues(short key1, boolean value1, short key2, boolean value2)
public ShortBooleanHashMap withKeysValues(short key1, boolean value1, short key2, boolean value2, short key3, boolean value3)
public ShortBooleanHashMap withKeysValues(short key1, boolean value1, short key2, boolean value2, short key3, boolean value3, short key4, boolean value4)
public ShortBooleanHashMap withoutKey(short key)
withoutKey
in interface MutableShortBooleanMap
public ShortBooleanHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys
in interface MutableShortBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableShortKeysMap
public void put(short key, boolean value)
put
in interface MutableShortBooleanMap
public void putAll(ShortBooleanMap map)
putAll
in interface MutableShortBooleanMap
public boolean containsKey(short key)
containsKey
in interface ShortBooleanMap
containsKey
in interface ShortKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(short key)
get
in interface ShortBooleanMap
public boolean getIfAbsent(short key, boolean ifAbsent)
getIfAbsent
in interface ShortBooleanMap
public boolean getOrThrow(short key)
getOrThrow
in interface ShortBooleanMap
public boolean getIfAbsentPut(short key, boolean value)
getIfAbsentPut
in interface MutableShortBooleanMap
public boolean getIfAbsentPut(short key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableShortBooleanMap
public <P> boolean getIfAbsentPutWith(short key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableShortBooleanMap
public boolean getIfAbsentPutWithKey(short key, ShortToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableShortBooleanMap
public boolean updateValue(short key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableShortBooleanMap
public void removeKey(short key)
removeKey
in interface MutableShortBooleanMap
removeKey
in interface MutableShortKeysMap
public void remove(short key)
remove
in interface MutableShortBooleanMap
public boolean removeKeyIfAbsent(short key, boolean value)
removeKeyIfAbsent
in interface MutableShortBooleanMap
public boolean equals(java.lang.Object obj)
ShortBooleanMap
Map.equals(Object)
.equals
in interface ShortBooleanMap
equals
in class java.lang.Object
public int hashCode()
ShortBooleanMap
Map.hashCode()
.hashCode
in interface ShortBooleanMap
hashCode
in class java.lang.Object
public java.lang.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 PrimitiveIterable
toString
in interface ShortBooleanMap
toString
in class AbstractBooleanIterable
AbstractCollection.toString()
public MutableBooleanIterator booleanIterator()
BooleanIterable
booleanIterator
in interface BooleanIterable
booleanIterator
in interface MutableBooleanValuesMap
public void forEachKey(ShortProcedure procedure)
forEachKey
in interface ShortBooleanMap
forEachKey
in interface ShortKeysMap
public void forEachKeyValue(ShortBooleanProcedure procedure)
forEachKeyValue
in interface ShortBooleanMap
public ShortBooleanHashMap select(ShortBooleanPredicate predicate)
select
in interface MutableShortBooleanMap
select
in interface ShortBooleanMap
public ShortBooleanHashMap reject(ShortBooleanPredicate predicate)
reject
in interface MutableShortBooleanMap
reject
in interface ShortBooleanMap
public LazyShortIterable keysView()
keysView
in interface ShortBooleanMap
public RichIterable<ShortBooleanPair> keyValuesView()
keyValuesView
in interface ShortBooleanMap
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public MutableShortSet keySet()
keySet
in interface ShortBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2018. All rights reserved.