Externalizable
, Serializable
, BooleanIterable
, BooleanValuesMap
, CharBooleanMap
, MutableBooleanValuesMap
, MutableCharBooleanMap
, PrimitiveIterable
, MutableCharKeysMap
, CharKeysMap
public class CharBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableCharBooleanMap, MutableCharKeysMap, Externalizable
Constructor | Description |
---|---|
CharBooleanHashMap() |
|
CharBooleanHashMap(int initialCapacity) |
|
CharBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
CharBooleanHashMap(CharBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableCharBooleanMap |
asSynchronized() |
|
MutableCharBooleanMap |
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(char key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(CharProcedure procedure) |
|
void |
forEachKeyValue(CharBooleanProcedure procedure) |
|
boolean |
get(char key) |
|
boolean |
getIfAbsent(char key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(char key,
boolean value) |
|
boolean |
getIfAbsentPut(char key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(char key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(char key,
CharToBooleanFunction function) |
|
boolean |
getOrThrow(char key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableCharSet |
keySet() |
|
LazyCharIterable |
keysView() |
|
RichIterable<CharBooleanPair> |
keyValuesView() |
|
static CharBooleanHashMap |
newWithKeysValues(char key1,
boolean value1) |
|
static CharBooleanHashMap |
newWithKeysValues(char key1,
boolean value1,
char key2,
boolean value2) |
|
static CharBooleanHashMap |
newWithKeysValues(char key1,
boolean value1,
char key2,
boolean value2,
char key3,
boolean value3) |
|
static CharBooleanHashMap |
newWithKeysValues(char key1,
boolean value1,
char key2,
boolean value2,
char key3,
boolean value3,
char key4,
boolean value4) |
|
void |
put(char key,
boolean value) |
|
void |
putAll(CharBooleanMap map) |
|
void |
readExternal(ObjectInput in) |
|
CharBooleanHashMap |
reject(CharBooleanPredicate predicate) |
|
void |
remove(char key) |
|
void |
removeKey(char key) |
|
boolean |
removeKeyIfAbsent(char key,
boolean value) |
|
CharBooleanHashMap |
select(CharBooleanPredicate predicate) |
|
ImmutableCharBooleanMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(char key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
MutableBooleanCollection |
values() |
|
CharBooleanHashMap |
withKeysValues(char key1,
boolean value1,
char key2,
boolean value2) |
|
CharBooleanHashMap |
withKeysValues(char key1,
boolean value1,
char key2,
boolean value2,
char key3,
boolean value3) |
|
CharBooleanHashMap |
withKeysValues(char key1,
boolean value1,
char key2,
boolean value2,
char key3,
boolean value3,
char key4,
boolean value4) |
|
CharBooleanHashMap |
withKeyValue(char key1,
boolean value1) |
|
CharBooleanHashMap |
withoutAllKeys(CharIterable keys) |
|
CharBooleanHashMap |
withoutKey(char 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 CharBooleanHashMap()
public CharBooleanHashMap(int initialCapacity)
public CharBooleanHashMap(CharBooleanMap map)
@Deprecated public CharBooleanHashMap(int initialCapacity, float loadFactor)
public MutableCharBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableCharBooleanMap
public MutableCharBooleanMap asSynchronized()
asSynchronized
in interface MutableCharBooleanMap
public ImmutableCharBooleanMap toImmutable()
toImmutable
in interface CharBooleanMap
public static CharBooleanHashMap newWithKeysValues(char key1, boolean value1)
public static CharBooleanHashMap newWithKeysValues(char key1, boolean value1, char key2, boolean value2)
public static CharBooleanHashMap newWithKeysValues(char key1, boolean value1, char key2, boolean value2, char key3, boolean value3)
public static CharBooleanHashMap newWithKeysValues(char key1, boolean value1, char key2, boolean value2, char key3, boolean value3, char key4, boolean value4)
public CharBooleanHashMap withKeyValue(char key1, boolean value1)
withKeyValue
in interface MutableCharBooleanMap
public CharBooleanHashMap withKeysValues(char key1, boolean value1, char key2, boolean value2)
public CharBooleanHashMap withKeysValues(char key1, boolean value1, char key2, boolean value2, char key3, boolean value3)
public CharBooleanHashMap withKeysValues(char key1, boolean value1, char key2, boolean value2, char key3, boolean value3, char key4, boolean value4)
public CharBooleanHashMap withoutKey(char key)
withoutKey
in interface MutableCharBooleanMap
public CharBooleanHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys
in interface MutableCharBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableCharKeysMap
public void put(char key, boolean value)
put
in interface MutableCharBooleanMap
public void putAll(CharBooleanMap map)
putAll
in interface MutableCharBooleanMap
public boolean containsKey(char key)
containsKey
in interface CharBooleanMap
containsKey
in interface CharKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(char key)
get
in interface CharBooleanMap
public boolean getIfAbsent(char key, boolean ifAbsent)
getIfAbsent
in interface CharBooleanMap
public boolean getOrThrow(char key)
getOrThrow
in interface CharBooleanMap
public boolean getIfAbsentPut(char key, boolean value)
getIfAbsentPut
in interface MutableCharBooleanMap
public boolean getIfAbsentPut(char key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableCharBooleanMap
public <P> boolean getIfAbsentPutWith(char key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableCharBooleanMap
public boolean getIfAbsentPutWithKey(char key, CharToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableCharBooleanMap
public boolean updateValue(char key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableCharBooleanMap
public void removeKey(char key)
removeKey
in interface MutableCharBooleanMap
removeKey
in interface MutableCharKeysMap
public void remove(char key)
remove
in interface MutableCharBooleanMap
public boolean removeKeyIfAbsent(char key, boolean value)
removeKeyIfAbsent
in interface MutableCharBooleanMap
public boolean equals(Object obj)
CharBooleanMap
Map.equals(Object)
.equals
in interface CharBooleanMap
equals
in class Object
public int hashCode()
CharBooleanMap
Map.hashCode()
.hashCode
in interface CharBooleanMap
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 CharBooleanMap
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(CharProcedure procedure)
forEachKey
in interface CharBooleanMap
forEachKey
in interface CharKeysMap
public void forEachKeyValue(CharBooleanProcedure procedure)
forEachKeyValue
in interface CharBooleanMap
public CharBooleanHashMap select(CharBooleanPredicate predicate)
select
in interface CharBooleanMap
select
in interface MutableCharBooleanMap
public CharBooleanHashMap reject(CharBooleanPredicate predicate)
reject
in interface CharBooleanMap
reject
in interface MutableCharBooleanMap
public LazyCharIterable keysView()
keysView
in interface CharBooleanMap
public RichIterable<CharBooleanPair> keyValuesView()
keyValuesView
in interface CharBooleanMap
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 MutableCharSet keySet()
keySet
in interface CharBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2017. All rights reserved.