Class ByteIntHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractIntIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ByteIntHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,ByteIntMap,IntValuesMap,MutableByteIntMap,MutableIntValuesMap,PrimitiveIterable,MutableByteKeysMap,ByteKeysMap
public class ByteIntHashMap extends AbstractMutableIntValuesMap implements MutableByteIntMap, Externalizable, MutableByteKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteIntHashMap()ByteIntHashMap(int initialCapacity)ByteIntHashMap(ByteIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaddToValue(byte key, int toBeAdded)MutableByteIntMapasSynchronized()MutableByteIntMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(byte key)booleanequals(Object obj)MutableIntByteMapflipUniqueValues()voidforEachKey(ByteProcedure procedure)voidforEachKeyValue(ByteIntProcedure procedure)intget(byte key)intgetAndPut(byte key, int putValue, int defaultValue)intgetIfAbsent(byte key, int ifAbsent)intgetIfAbsentPut(byte key, int value)intgetIfAbsentPut(byte key, IntFunction0 function)<P> intgetIfAbsentPutWith(byte key, IntFunction<? super P> function, P parameter)intgetIfAbsentPutWithKey(byte key, ByteToIntFunction function)intgetOrThrow(byte key)inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)MutableIntIteratorintIterator()MutableByteSetkeySet()LazyByteIterablekeysView()RichIterable<ByteIntPair>keyValuesView()static ByteIntHashMapnewWithKeysValues(byte key1, int value1)static ByteIntHashMapnewWithKeysValues(byte key1, int value1, byte key2, int value2)static ByteIntHashMapnewWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)static ByteIntHashMapnewWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)voidput(byte key, int value)voidputAll(ByteIntMap map)voidreadExternal(ObjectInput in)ByteIntHashMapreject(ByteIntPredicate predicate)voidremove(byte key)voidremoveKey(byte key)intremoveKeyIfAbsent(byte key, int value)ByteIntHashMapselect(ByteIntPredicate predicate)ImmutableByteIntMaptoImmutable()StringtoString()booleantrimToSize()intupdateValue(byte key, int initialValueIfAbsent, IntToIntFunction function)voidupdateValues(ByteIntToIntFunction function)MutableIntCollectionvalues()ByteIntHashMapwithKeysValues(byte key1, int value1, byte key2, int value2)ByteIntHashMapwithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)ByteIntHashMapwithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)ByteIntHashMapwithKeyValue(byte key1, int value1)ByteIntHashMapwithoutAllKeys(ByteIterable keys)ByteIntHashMapwithoutKey(byte key)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ByteKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteIntMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
ByteIntHashMap
public ByteIntHashMap()
-
ByteIntHashMap
public ByteIntHashMap(int initialCapacity)
-
ByteIntHashMap
public ByteIntHashMap(ByteIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1)
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2)
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceByteIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceByteIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceByteIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceIntIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableByteKeysMap- Specified by:
clearin interfaceMutableIntValuesMap
-
put
public void put(byte key, int value)- Specified by:
putin interfaceMutableByteIntMap
-
putAll
public void putAll(ByteIntMap map)
- Specified by:
putAllin interfaceMutableByteIntMap
-
updateValues
public void updateValues(ByteIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableByteIntMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKeyin interfaceMutableByteIntMap- Specified by:
removeKeyin interfaceMutableByteKeysMap
-
remove
public void remove(byte key)
- Specified by:
removein interfaceMutableByteIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(byte key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, int value)- Specified by:
getIfAbsentPutin interfaceMutableByteIntMap
-
getAndPut
public int getAndPut(byte key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableByteIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(byte key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableByteIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(byte key, ByteToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableByteIntMap
-
addToValue
public int addToValue(byte key, int toBeAdded)- Specified by:
addToValuein interfaceMutableByteIntMap
-
updateValue
public int updateValue(byte key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableByteIntMap
-
withKeyValue
public ByteIntHashMap withKeyValue(byte key1, int value1)
- Specified by:
withKeyValuein interfaceMutableByteIntMap
-
withKeysValues
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2)
-
withKeysValues
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
-
withKeysValues
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
-
withoutKey
public ByteIntHashMap withoutKey(byte key)
- Specified by:
withoutKeyin interfaceMutableByteIntMap
-
withoutAllKeys
public ByteIntHashMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableByteIntMap
-
asUnmodifiable
public MutableByteIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableByteIntMap
-
asSynchronized
public MutableByteIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableByteIntMap
-
toImmutable
public ImmutableByteIntMap toImmutable()
- Specified by:
toImmutablein interfaceByteIntMap
-
get
public int get(byte key)
- Specified by:
getin interfaceByteIntMap
-
getIfAbsent
public int getIfAbsent(byte key, int ifAbsent)- Specified by:
getIfAbsentin interfaceByteIntMap
-
getOrThrow
public int getOrThrow(byte key)
- Specified by:
getOrThrowin interfaceByteIntMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKeyin interfaceByteIntMap- Specified by:
containsKeyin interfaceByteKeysMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKeyin interfaceByteIntMap- Specified by:
forEachKeyin interfaceByteKeysMap
-
forEachKeyValue
public void forEachKeyValue(ByteIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceByteIntMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysViewin interfaceByteIntMap
-
keyValuesView
public RichIterable<ByteIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceByteIntMap
-
flipUniqueValues
public MutableIntByteMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceByteIntMap- Specified by:
flipUniqueValuesin interfaceMutableByteIntMap
-
select
public ByteIntHashMap select(ByteIntPredicate predicate)
- Specified by:
selectin interfaceByteIntMap- Specified by:
selectin interfaceMutableByteIntMap
-
reject
public ByteIntHashMap reject(ByteIntPredicate predicate)
- Specified by:
rejectin interfaceByteIntMap- Specified by:
rejectin interfaceMutableByteIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void compact()
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
keySet
public MutableByteSet keySet()
- Specified by:
keySetin interfaceByteIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
-