java.io.Externalizable, java.io.Serializable, BooleanIterable, BooleanValuesMap, CharBooleanMap, MutableBooleanValuesMap, MutableCharBooleanMap, PrimitiveIterable, MutableCharKeysMap, CharKeysMappublic class CharBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableCharBooleanMap, MutableCharKeysMap, java.io.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(java.lang.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(java.io.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() |
|
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(char key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
void |
updateValues(CharBooleanToBooleanFunction function) |
Updates the values in-place.
|
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(java.io.ObjectOutput out) |
asLazy, containsAll, toBag, toList, toSetallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, count, detectIfNone, each, forEach, forEachValue, injectInto, isEmpty, noneSatisfy, notEmpty, reject, select, size, toArrayallSatisfy, 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, toSetforEachValue, tapisEmpty, notEmpty, sizecollect, reject, selectputPair, withAllKeyValuesappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic CharBooleanHashMap()
public CharBooleanHashMap(int initialCapacity)
public CharBooleanHashMap(CharBooleanMap map)
@Deprecated
public CharBooleanHashMap(int initialCapacity,
float loadFactor)
public MutableCharBooleanMap asUnmodifiable()
asUnmodifiable in interface MutableCharBooleanMappublic MutableCharBooleanMap asSynchronized()
asSynchronized in interface MutableCharBooleanMappublic ImmutableCharBooleanMap toImmutable()
toImmutable in interface CharBooleanMappublic 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 MutableCharBooleanMappublic 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 MutableCharBooleanMappublic CharBooleanHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys in interface MutableCharBooleanMappublic void compact()
public void clear()
clear in interface MutableBooleanValuesMapclear in interface MutableCharKeysMappublic void put(char key,
boolean value)
put in interface MutableCharBooleanMappublic void putAll(CharBooleanMap map)
putAll in interface MutableCharBooleanMappublic void updateValues(CharBooleanToBooleanFunction function)
MutableCharBooleanMapupdateValues in interface MutableCharBooleanMapfunction - that takes a key and its value and that returns a new value for this keypublic boolean containsKey(char key)
containsKey in interface CharBooleanMapcontainsKey in interface CharKeysMappublic boolean containsValue(boolean value)
containsValue in interface BooleanValuesMappublic boolean get(char key)
get in interface CharBooleanMappublic boolean getIfAbsent(char key,
boolean ifAbsent)
getIfAbsent in interface CharBooleanMappublic boolean getOrThrow(char key)
getOrThrow in interface CharBooleanMappublic boolean getIfAbsentPut(char key,
boolean value)
getIfAbsentPut in interface MutableCharBooleanMappublic boolean getIfAbsentPut(char key,
BooleanFunction0 function)
getIfAbsentPut in interface MutableCharBooleanMappublic <P> boolean getIfAbsentPutWith(char key,
BooleanFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableCharBooleanMappublic boolean getIfAbsentPutWithKey(char key,
CharToBooleanFunction function)
getIfAbsentPutWithKey in interface MutableCharBooleanMappublic boolean updateValue(char key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function)
updateValue in interface MutableCharBooleanMappublic void removeKey(char key)
removeKey in interface MutableCharBooleanMapremoveKey in interface MutableCharKeysMappublic void remove(char key)
remove in interface MutableCharBooleanMappublic boolean removeKeyIfAbsent(char key,
boolean value)
removeKeyIfAbsent in interface MutableCharBooleanMappublic boolean equals(java.lang.Object obj)
CharBooleanMapMap.equals(Object).equals in interface CharBooleanMapequals in class java.lang.Objectpublic int hashCode()
CharBooleanMapMap.hashCode().hashCode in interface CharBooleanMaphashCode in class java.lang.Objectpublic 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 CharBooleanMaptoString in interface PrimitiveIterabletoString in class AbstractBooleanIterableAbstractCollection.toString()public MutableBooleanIterator booleanIterator()
BooleanIterablebooleanIterator in interface BooleanIterablebooleanIterator in interface MutableBooleanValuesMappublic void forEachKey(CharProcedure procedure)
forEachKey in interface CharBooleanMapforEachKey in interface CharKeysMappublic void forEachKeyValue(CharBooleanProcedure procedure)
forEachKeyValue in interface CharBooleanMappublic CharBooleanHashMap select(CharBooleanPredicate predicate)
select in interface CharBooleanMapselect in interface MutableCharBooleanMappublic CharBooleanHashMap reject(CharBooleanPredicate predicate)
reject in interface CharBooleanMapreject in interface MutableCharBooleanMappublic LazyCharIterable keysView()
keysView in interface CharBooleanMappublic RichIterable<CharBooleanPair> keyValuesView()
keyValuesView in interface CharBooleanMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic MutableCharSet keySet()
keySet in interface CharBooleanMappublic MutableBooleanCollection values()
values in interface BooleanValuesMapCopyright © 2004–2020. All rights reserved.