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 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 int size()
PrimitiveIterable
size
in interface PrimitiveIterable
public boolean isEmpty()
PrimitiveIterable
isEmpty
in interface PrimitiveIterable
public boolean notEmpty()
PrimitiveIterable
notEmpty
in interface PrimitiveIterable
public void compact()
public void clear()
clear
in interface MutableIntBooleanMap
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
public boolean containsValue(boolean value)
containsValue
in interface IntBooleanMap
public boolean contains(boolean value)
contains
in interface BooleanIterable
public boolean containsAll(boolean... source)
containsAll
in interface BooleanIterable
public boolean containsAll(BooleanIterable source)
containsAll
in interface BooleanIterable
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
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()
IntBooleanMap
toString
in interface IntBooleanMap
toString
in interface PrimitiveIterable
toString
in class Object
public BooleanIterator booleanIterator()
booleanIterator
in interface BooleanIterable
public void forEach(BooleanProcedure procedure)
forEach
in interface BooleanIterable
public void forEachValue(BooleanProcedure procedure)
forEachValue
in interface IntBooleanMap
public void forEachKey(IntProcedure procedure)
forEachKey
in interface IntBooleanMap
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 <V> V injectInto(V injectedValue, ObjectBooleanToObjectFunction<? super V,? extends V> function)
injectInto
in interface BooleanIterable
public String makeString()
PrimitiveIterable
PrimitiveIterable.makeString(String)
and defaulting
the separator parameter to the characters ", " (comma and space).makeString
in interface PrimitiveIterable
public String makeString(String separator)
PrimitiveIterable
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString
in interface PrimitiveIterable
public String makeString(String start, String separator, String end)
PrimitiveIterable
makeString
in interface PrimitiveIterable
public void appendString(Appendable appendable)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString()
.appendString
in interface PrimitiveIterable
public void appendString(Appendable appendable, String separator)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String)
.appendString
in interface PrimitiveIterable
public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public MutableBooleanCollection select(BooleanPredicate predicate)
select
in interface BooleanIterable
select
in interface MutableIntBooleanMap
public MutableBooleanCollection reject(BooleanPredicate predicate)
reject
in interface BooleanIterable
reject
in interface MutableIntBooleanMap
public boolean detectIfNone(BooleanPredicate predicate, boolean value)
detectIfNone
in interface BooleanIterable
public <V> MutableCollection<V> collect(BooleanToObjectFunction<? extends V> function)
collect
in interface BooleanIterable
collect
in interface MutableIntBooleanMap
public int count(BooleanPredicate predicate)
count
in interface BooleanIterable
public boolean anySatisfy(BooleanPredicate predicate)
anySatisfy
in interface BooleanIterable
public boolean allSatisfy(BooleanPredicate predicate)
allSatisfy
in interface BooleanIterable
public boolean noneSatisfy(BooleanPredicate predicate)
noneSatisfy
in interface BooleanIterable
public boolean[] toArray()
toArray
in interface BooleanIterable
public MutableBooleanList toList()
toList
in interface BooleanIterable
public MutableBooleanSet toSet()
toSet
in interface BooleanIterable
public MutableBooleanBag toBag()
toBag
in interface BooleanIterable
public LazyBooleanIterable asLazy()
asLazy
in interface BooleanIterable
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 IntBooleanMap
Copyright © 2004–2016. All rights reserved.