Externalizable
, Serializable
, BooleanIterable
, BooleanValuesMap
, LongBooleanMap
, MutableBooleanValuesMap
, MutableLongBooleanMap
, PrimitiveIterable
, MutableLongKeysMap
, LongKeysMap
public class LongBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableLongBooleanMap, MutableLongKeysMap, Externalizable
Constructor | Description |
---|---|
LongBooleanHashMap() |
|
LongBooleanHashMap(int initialCapacity) |
|
LongBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
LongBooleanHashMap(LongBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableLongBooleanMap |
asSynchronized() |
|
MutableLongBooleanMap |
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(long key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(LongProcedure procedure) |
|
void |
forEachKeyValue(LongBooleanProcedure procedure) |
|
boolean |
get(long key) |
|
boolean |
getIfAbsent(long key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(long key,
boolean value) |
|
boolean |
getIfAbsentPut(long key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(long key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(long key,
LongToBooleanFunction function) |
|
boolean |
getOrThrow(long key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableLongSet |
keySet() |
|
LazyLongIterable |
keysView() |
|
RichIterable<LongBooleanPair> |
keyValuesView() |
|
static LongBooleanHashMap |
newWithKeysValues(long key1,
boolean value1) |
|
static LongBooleanHashMap |
newWithKeysValues(long key1,
boolean value1,
long key2,
boolean value2) |
|
static LongBooleanHashMap |
newWithKeysValues(long key1,
boolean value1,
long key2,
boolean value2,
long key3,
boolean value3) |
|
static LongBooleanHashMap |
newWithKeysValues(long key1,
boolean value1,
long key2,
boolean value2,
long key3,
boolean value3,
long key4,
boolean value4) |
|
void |
put(long key,
boolean value) |
|
void |
putAll(LongBooleanMap map) |
|
void |
readExternal(ObjectInput in) |
|
LongBooleanHashMap |
reject(LongBooleanPredicate predicate) |
|
void |
remove(long key) |
|
void |
removeKey(long key) |
|
boolean |
removeKeyIfAbsent(long key,
boolean value) |
|
LongBooleanHashMap |
select(LongBooleanPredicate predicate) |
|
ImmutableLongBooleanMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(long key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
void |
updateValues(LongBooleanToBooleanFunction function) |
Updates the values in-place.
|
MutableBooleanCollection |
values() |
|
LongBooleanHashMap |
withKeysValues(long key1,
boolean value1,
long key2,
boolean value2) |
|
LongBooleanHashMap |
withKeysValues(long key1,
boolean value1,
long key2,
boolean value2,
long key3,
boolean value3) |
|
LongBooleanHashMap |
withKeysValues(long key1,
boolean value1,
long key2,
boolean value2,
long key3,
boolean value3,
long key4,
boolean value4) |
|
LongBooleanHashMap |
withKeyValue(long key1,
boolean value1) |
|
LongBooleanHashMap |
withoutAllKeys(LongIterable keys) |
|
LongBooleanHashMap |
withoutKey(long key) |
|
void |
writeExternal(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, reduce, reduceIfEmpty, reject, select, toArray, toBag, toList, toSet
forEachValue, tap
isEmpty, notEmpty, size
collect, reject, select
putPair, withAllKeyValues
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public LongBooleanHashMap()
public LongBooleanHashMap(int initialCapacity)
public LongBooleanHashMap(LongBooleanMap map)
@Deprecated public LongBooleanHashMap(int initialCapacity, float loadFactor)
public MutableLongBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableLongBooleanMap
public MutableLongBooleanMap asSynchronized()
asSynchronized
in interface MutableLongBooleanMap
public ImmutableLongBooleanMap toImmutable()
toImmutable
in interface LongBooleanMap
public static LongBooleanHashMap newWithKeysValues(long key1, boolean value1)
public static LongBooleanHashMap newWithKeysValues(long key1, boolean value1, long key2, boolean value2)
public static LongBooleanHashMap newWithKeysValues(long key1, boolean value1, long key2, boolean value2, long key3, boolean value3)
public static LongBooleanHashMap newWithKeysValues(long key1, boolean value1, long key2, boolean value2, long key3, boolean value3, long key4, boolean value4)
public LongBooleanHashMap withKeyValue(long key1, boolean value1)
withKeyValue
in interface MutableLongBooleanMap
public LongBooleanHashMap withKeysValues(long key1, boolean value1, long key2, boolean value2)
public LongBooleanHashMap withKeysValues(long key1, boolean value1, long key2, boolean value2, long key3, boolean value3)
public LongBooleanHashMap withKeysValues(long key1, boolean value1, long key2, boolean value2, long key3, boolean value3, long key4, boolean value4)
public LongBooleanHashMap withoutKey(long key)
withoutKey
in interface MutableLongBooleanMap
public LongBooleanHashMap withoutAllKeys(LongIterable keys)
withoutAllKeys
in interface MutableLongBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableLongKeysMap
public void put(long key, boolean value)
put
in interface MutableLongBooleanMap
public void putAll(LongBooleanMap map)
putAll
in interface MutableLongBooleanMap
public void updateValues(LongBooleanToBooleanFunction function)
MutableLongBooleanMap
updateValues
in interface MutableLongBooleanMap
function
- that takes a key and its value and that returns a new value for this keypublic boolean containsKey(long key)
containsKey
in interface LongBooleanMap
containsKey
in interface LongKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(long key)
get
in interface LongBooleanMap
public boolean getIfAbsent(long key, boolean ifAbsent)
getIfAbsent
in interface LongBooleanMap
public boolean getOrThrow(long key)
getOrThrow
in interface LongBooleanMap
public boolean getIfAbsentPut(long key, boolean value)
getIfAbsentPut
in interface MutableLongBooleanMap
public boolean getIfAbsentPut(long key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableLongBooleanMap
public <P> boolean getIfAbsentPutWith(long key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableLongBooleanMap
public boolean getIfAbsentPutWithKey(long key, LongToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableLongBooleanMap
public boolean updateValue(long key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableLongBooleanMap
public void removeKey(long key)
removeKey
in interface MutableLongBooleanMap
removeKey
in interface MutableLongKeysMap
public void remove(long key)
remove
in interface MutableLongBooleanMap
public boolean removeKeyIfAbsent(long key, boolean value)
removeKeyIfAbsent
in interface MutableLongBooleanMap
public boolean equals(Object obj)
LongBooleanMap
Map.equals(Object)
.equals
in interface LongBooleanMap
equals
in class Object
public int hashCode()
LongBooleanMap
Map.hashCode()
.hashCode
in interface LongBooleanMap
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 LongBooleanMap
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(LongProcedure procedure)
forEachKey
in interface LongBooleanMap
forEachKey
in interface LongKeysMap
public void forEachKeyValue(LongBooleanProcedure procedure)
forEachKeyValue
in interface LongBooleanMap
public LongBooleanHashMap select(LongBooleanPredicate predicate)
select
in interface LongBooleanMap
select
in interface MutableLongBooleanMap
public LongBooleanHashMap reject(LongBooleanPredicate predicate)
reject
in interface LongBooleanMap
reject
in interface MutableLongBooleanMap
public LazyLongIterable keysView()
keysView
in interface LongBooleanMap
public RichIterable<LongBooleanPair> keyValuesView()
keyValuesView
in interface LongBooleanMap
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 MutableLongSet keySet()
keySet
in interface LongBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2019. All rights reserved.