Externalizable
, Serializable
, BooleanIterable
, BooleanValuesMap
, ByteBooleanMap
, MutableBooleanValuesMap
, MutableByteBooleanMap
, PrimitiveIterable
, MutableByteKeysMap
, ByteKeysMap
public class ByteBooleanHashMap extends AbstractMutableBooleanValuesMap implements MutableByteBooleanMap, MutableByteKeysMap, Externalizable
Constructor | Description |
---|---|
ByteBooleanHashMap() |
|
ByteBooleanHashMap(int initialCapacity) |
|
ByteBooleanHashMap(int initialCapacity,
float loadFactor) |
Deprecated.
in 5.1.0.
|
ByteBooleanHashMap(ByteBooleanMap map) |
Modifier and Type | Method | Description |
---|---|---|
MutableByteBooleanMap |
asSynchronized() |
|
MutableByteBooleanMap |
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(byte key) |
|
boolean |
containsValue(boolean value) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(ByteProcedure procedure) |
|
void |
forEachKeyValue(ByteBooleanProcedure procedure) |
|
boolean |
get(byte key) |
|
boolean |
getIfAbsent(byte key,
boolean ifAbsent) |
|
boolean |
getIfAbsentPut(byte key,
boolean value) |
|
boolean |
getIfAbsentPut(byte key,
BooleanFunction0 function) |
|
<P> boolean |
getIfAbsentPutWith(byte key,
BooleanFunction<? super P> function,
P parameter) |
|
boolean |
getIfAbsentPutWithKey(byte key,
ByteToBooleanFunction function) |
|
boolean |
getOrThrow(byte key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
MutableByteSet |
keySet() |
|
LazyByteIterable |
keysView() |
|
RichIterable<ByteBooleanPair> |
keyValuesView() |
|
static ByteBooleanHashMap |
newWithKeysValues(byte key1,
boolean value1) |
|
static ByteBooleanHashMap |
newWithKeysValues(byte key1,
boolean value1,
byte key2,
boolean value2) |
|
static ByteBooleanHashMap |
newWithKeysValues(byte key1,
boolean value1,
byte key2,
boolean value2,
byte key3,
boolean value3) |
|
static ByteBooleanHashMap |
newWithKeysValues(byte key1,
boolean value1,
byte key2,
boolean value2,
byte key3,
boolean value3,
byte key4,
boolean value4) |
|
void |
put(byte key,
boolean value) |
|
void |
putAll(ByteBooleanMap map) |
|
void |
readExternal(ObjectInput in) |
|
ByteBooleanHashMap |
reject(ByteBooleanPredicate predicate) |
|
void |
remove(byte key) |
|
void |
removeKey(byte key) |
|
boolean |
removeKeyIfAbsent(byte key,
boolean value) |
|
ByteBooleanHashMap |
select(ByteBooleanPredicate predicate) |
|
ImmutableByteBooleanMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
boolean |
updateValue(byte key,
boolean initialValueIfAbsent,
BooleanToBooleanFunction function) |
|
void |
updateValues(ByteBooleanToBooleanFunction function) |
Updates the values in-place.
|
MutableBooleanCollection |
values() |
|
ByteBooleanHashMap |
withKeysValues(byte key1,
boolean value1,
byte key2,
boolean value2) |
|
ByteBooleanHashMap |
withKeysValues(byte key1,
boolean value1,
byte key2,
boolean value2,
byte key3,
boolean value3) |
|
ByteBooleanHashMap |
withKeysValues(byte key1,
boolean value1,
byte key2,
boolean value2,
byte key3,
boolean value3,
byte key4,
boolean value4) |
|
ByteBooleanHashMap |
withKeyValue(byte key1,
boolean value1) |
|
ByteBooleanHashMap |
withoutAllKeys(ByteIterable keys) |
|
ByteBooleanHashMap |
withoutKey(byte 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 ByteBooleanHashMap()
public ByteBooleanHashMap(int initialCapacity)
public ByteBooleanHashMap(ByteBooleanMap map)
@Deprecated public ByteBooleanHashMap(int initialCapacity, float loadFactor)
public MutableByteBooleanMap asUnmodifiable()
asUnmodifiable
in interface MutableByteBooleanMap
public MutableByteBooleanMap asSynchronized()
asSynchronized
in interface MutableByteBooleanMap
public ImmutableByteBooleanMap toImmutable()
toImmutable
in interface ByteBooleanMap
public static ByteBooleanHashMap newWithKeysValues(byte key1, boolean value1)
public static ByteBooleanHashMap newWithKeysValues(byte key1, boolean value1, byte key2, boolean value2)
public static ByteBooleanHashMap newWithKeysValues(byte key1, boolean value1, byte key2, boolean value2, byte key3, boolean value3)
public static ByteBooleanHashMap newWithKeysValues(byte key1, boolean value1, byte key2, boolean value2, byte key3, boolean value3, byte key4, boolean value4)
public ByteBooleanHashMap withKeyValue(byte key1, boolean value1)
withKeyValue
in interface MutableByteBooleanMap
public ByteBooleanHashMap withKeysValues(byte key1, boolean value1, byte key2, boolean value2)
public ByteBooleanHashMap withKeysValues(byte key1, boolean value1, byte key2, boolean value2, byte key3, boolean value3)
public ByteBooleanHashMap withKeysValues(byte key1, boolean value1, byte key2, boolean value2, byte key3, boolean value3, byte key4, boolean value4)
public ByteBooleanHashMap withoutKey(byte key)
withoutKey
in interface MutableByteBooleanMap
public ByteBooleanHashMap withoutAllKeys(ByteIterable keys)
withoutAllKeys
in interface MutableByteBooleanMap
public void compact()
public void clear()
clear
in interface MutableBooleanValuesMap
clear
in interface MutableByteKeysMap
public void put(byte key, boolean value)
put
in interface MutableByteBooleanMap
public void putAll(ByteBooleanMap map)
putAll
in interface MutableByteBooleanMap
public void updateValues(ByteBooleanToBooleanFunction function)
MutableByteBooleanMap
updateValues
in interface MutableByteBooleanMap
function
- that takes a key and its value and that returns a new value for this keypublic boolean containsKey(byte key)
containsKey
in interface ByteBooleanMap
containsKey
in interface ByteKeysMap
public boolean containsValue(boolean value)
containsValue
in interface BooleanValuesMap
public boolean get(byte key)
get
in interface ByteBooleanMap
public boolean getIfAbsent(byte key, boolean ifAbsent)
getIfAbsent
in interface ByteBooleanMap
public boolean getOrThrow(byte key)
getOrThrow
in interface ByteBooleanMap
public boolean getIfAbsentPut(byte key, boolean value)
getIfAbsentPut
in interface MutableByteBooleanMap
public boolean getIfAbsentPut(byte key, BooleanFunction0 function)
getIfAbsentPut
in interface MutableByteBooleanMap
public <P> boolean getIfAbsentPutWith(byte key, BooleanFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableByteBooleanMap
public boolean getIfAbsentPutWithKey(byte key, ByteToBooleanFunction function)
getIfAbsentPutWithKey
in interface MutableByteBooleanMap
public boolean updateValue(byte key, boolean initialValueIfAbsent, BooleanToBooleanFunction function)
updateValue
in interface MutableByteBooleanMap
public void removeKey(byte key)
removeKey
in interface MutableByteBooleanMap
removeKey
in interface MutableByteKeysMap
public void remove(byte key)
remove
in interface MutableByteBooleanMap
public boolean removeKeyIfAbsent(byte key, boolean value)
removeKeyIfAbsent
in interface MutableByteBooleanMap
public boolean equals(Object obj)
ByteBooleanMap
Map.equals(Object)
.equals
in interface ByteBooleanMap
equals
in class Object
public int hashCode()
ByteBooleanMap
Map.hashCode()
.hashCode
in interface ByteBooleanMap
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 ByteBooleanMap
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(ByteProcedure procedure)
forEachKey
in interface ByteBooleanMap
forEachKey
in interface ByteKeysMap
public void forEachKeyValue(ByteBooleanProcedure procedure)
forEachKeyValue
in interface ByteBooleanMap
public ByteBooleanHashMap select(ByteBooleanPredicate predicate)
select
in interface ByteBooleanMap
select
in interface MutableByteBooleanMap
public ByteBooleanHashMap reject(ByteBooleanPredicate predicate)
reject
in interface ByteBooleanMap
reject
in interface MutableByteBooleanMap
public LazyByteIterable keysView()
keysView
in interface ByteBooleanMap
public RichIterable<ByteBooleanPair> keyValuesView()
keyValuesView
in interface ByteBooleanMap
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 MutableByteSet keySet()
keySet
in interface ByteBooleanMap
public MutableBooleanCollection values()
values
in interface BooleanValuesMap
Copyright © 2004–2019. All rights reserved.