public class IntBooleanHashMap extends Object implements MutableIntBooleanMap, Externalizable
| Constructor and Description |
|---|
IntBooleanHashMap() |
IntBooleanHashMap(int initialCapacity) |
IntBooleanHashMap(IntBooleanMap map) |
IntBooleanHashMap(int initialCapacity,
float loadFactor)
Deprecated.
in 5.1.0.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(BooleanPredicate predicate) |
boolean |
anySatisfy(BooleanPredicate predicate) |
void |
appendString(Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyBooleanIterable |
asLazy() |
MutableIntBooleanMap |
asSynchronized() |
MutableIntBooleanMap |
asUnmodifiable() |
BooleanIterator |
booleanIterator() |
void |
clear() |
<V> MutableCollection<V> |
collect(BooleanToObjectFunction<? extends V> function) |
void |
compact()
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
contains(boolean value) |
boolean |
containsAll(boolean... source) |
boolean |
containsAll(BooleanIterable source) |
boolean |
containsKey(int key) |
boolean |
containsValue(boolean value) |
int |
count(BooleanPredicate predicate) |
boolean |
detectIfNone(BooleanPredicate predicate,
boolean value) |
boolean |
equals(Object obj)
Follows the same general contract as
Map.equals(Object). |
void |
forEach(BooleanProcedure procedure) |
void |
forEachKey(IntProcedure procedure) |
void |
forEachKeyValue(IntBooleanProcedure procedure) |
void |
forEachValue(BooleanProcedure 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(). |
<V> V |
injectInto(V injectedValue,
ObjectBooleanToObjectFunction<? super V,? extends V> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
MutableIntSet |
keySet() |
LazyIntIterable |
keysView() |
RichIterable<IntBooleanPair> |
keyValuesView() |
String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
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) |
boolean |
noneSatisfy(BooleanPredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
put(int key,
boolean value) |
void |
putAll(IntBooleanMap map) |
void |
readExternal(ObjectInput in) |
MutableBooleanCollection |
reject(BooleanPredicate predicate) |
IntBooleanHashMap |
reject(IntBooleanPredicate predicate) |
void |
remove(int key) |
void |
removeKey(int key) |
boolean |
removeKeyIfAbsent(int key,
boolean value) |
MutableBooleanCollection |
select(BooleanPredicate predicate) |
IntBooleanHashMap |
select(IntBooleanPredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
boolean[] |
toArray() |
MutableBooleanBag |
toBag() |
ImmutableIntBooleanMap |
toImmutable() |
MutableBooleanList |
toList() |
MutableBooleanSet |
toSet() |
String |
toString()
Returns a string representation of this IntBooleanMap.
|
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) |
public IntBooleanHashMap()
public IntBooleanHashMap(int initialCapacity)
public IntBooleanHashMap(IntBooleanMap map)
@Deprecated public IntBooleanHashMap(int initialCapacity, float loadFactor)
public MutableIntBooleanMap asUnmodifiable()
asUnmodifiable in interface MutableIntBooleanMappublic MutableIntBooleanMap asSynchronized()
asSynchronized in interface MutableIntBooleanMappublic ImmutableIntBooleanMap toImmutable()
toImmutable in interface IntBooleanMappublic 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 MutableIntBooleanMappublic 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 MutableIntBooleanMappublic IntBooleanHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntBooleanMappublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic void compact()
public void clear()
clear in interface MutableIntBooleanMappublic void put(int key,
boolean value)
put in interface MutableIntBooleanMappublic void putAll(IntBooleanMap map)
putAll in interface MutableIntBooleanMappublic boolean containsKey(int key)
containsKey in interface IntBooleanMappublic boolean containsValue(boolean value)
containsValue in interface IntBooleanMappublic boolean contains(boolean value)
contains in interface BooleanIterablepublic boolean containsAll(boolean... source)
containsAll in interface BooleanIterablepublic boolean containsAll(BooleanIterable source)
containsAll in interface BooleanIterablepublic boolean get(int key)
get in interface IntBooleanMappublic boolean getIfAbsent(int key,
boolean ifAbsent)
getIfAbsent in interface IntBooleanMappublic boolean getOrThrow(int key)
getOrThrow in interface IntBooleanMappublic boolean getIfAbsentPut(int key,
boolean value)
getIfAbsentPut in interface MutableIntBooleanMappublic boolean getIfAbsentPut(int key,
BooleanFunction0 function)
getIfAbsentPut in interface MutableIntBooleanMappublic <P> boolean getIfAbsentPutWith(int key,
BooleanFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntBooleanMappublic boolean getIfAbsentPutWithKey(int key,
IntToBooleanFunction function)
getIfAbsentPutWithKey in interface MutableIntBooleanMappublic boolean updateValue(int key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function)
updateValue in interface MutableIntBooleanMappublic void removeKey(int key)
removeKey in interface MutableIntBooleanMappublic void remove(int key)
remove in interface MutableIntBooleanMappublic boolean removeKeyIfAbsent(int key,
boolean value)
removeKeyIfAbsent in interface MutableIntBooleanMappublic boolean equals(Object obj)
IntBooleanMapMap.equals(Object).equals in interface IntBooleanMapequals in class Objectpublic int hashCode()
IntBooleanMapMap.hashCode().hashCode in interface IntBooleanMaphashCode in class Objectpublic String toString()
IntBooleanMaptoString in interface IntBooleanMaptoString in interface PrimitiveIterabletoString in class Objectpublic BooleanIterator booleanIterator()
booleanIterator in interface BooleanIterablepublic void forEach(BooleanProcedure procedure)
forEach in interface BooleanIterablepublic void forEachValue(BooleanProcedure procedure)
forEachValue in interface IntBooleanMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntBooleanMappublic void forEachKeyValue(IntBooleanProcedure procedure)
forEachKeyValue in interface IntBooleanMappublic IntBooleanHashMap select(IntBooleanPredicate predicate)
select in interface IntBooleanMapselect in interface MutableIntBooleanMappublic IntBooleanHashMap reject(IntBooleanPredicate predicate)
reject in interface IntBooleanMapreject in interface MutableIntBooleanMappublic <V> V injectInto(V injectedValue,
ObjectBooleanToObjectFunction<? super V,? extends V> function)
injectInto in interface BooleanIterablepublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic MutableBooleanCollection select(BooleanPredicate predicate)
select in interface BooleanIterableselect in interface MutableIntBooleanMappublic MutableBooleanCollection reject(BooleanPredicate predicate)
reject in interface BooleanIterablereject in interface MutableIntBooleanMappublic boolean detectIfNone(BooleanPredicate predicate, boolean value)
detectIfNone in interface BooleanIterablepublic <V> MutableCollection<V> collect(BooleanToObjectFunction<? extends V> function)
collect in interface BooleanIterablecollect in interface MutableIntBooleanMappublic int count(BooleanPredicate predicate)
count in interface BooleanIterablepublic boolean anySatisfy(BooleanPredicate predicate)
anySatisfy in interface BooleanIterablepublic boolean allSatisfy(BooleanPredicate predicate)
allSatisfy in interface BooleanIterablepublic boolean noneSatisfy(BooleanPredicate predicate)
noneSatisfy in interface BooleanIterablepublic boolean[] toArray()
toArray in interface BooleanIterablepublic MutableBooleanList toList()
toList in interface BooleanIterablepublic MutableBooleanSet toSet()
toSet in interface BooleanIterablepublic MutableBooleanBag toBag()
toBag in interface BooleanIterablepublic LazyBooleanIterable asLazy()
asLazy in interface BooleanIterablepublic LazyIntIterable keysView()
keysView in interface IntBooleanMappublic RichIterable<IntBooleanPair> keyValuesView()
keyValuesView in interface IntBooleanMappublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic MutableIntSet keySet()
keySet in interface IntBooleanMappublic MutableBooleanCollection values()
values in interface IntBooleanMapCopyright © 2004–2017. All rights reserved.