Package com.complexible.common.hppc
Class IntObjectBiMap<T>
- java.lang.Object
-
- com.complexible.common.hppc.IntObjectBiMap<T>
-
- All Implemented Interfaces:
com.carrotsearch.hppc.IntObjectAssociativeContainer<T>,com.carrotsearch.hppc.IntObjectMap<T>,java.lang.Iterable<com.carrotsearch.hppc.cursors.IntObjectCursor<T>>
public final class IntObjectBiMap<T> extends java.lang.Object implements com.carrotsearch.hppc.IntObjectMap<T>Very simple BiMap implementation which simply wraps two IntObjectMaps- Since:
- 4.1
- Version:
- 4.1
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description IntObjectBiMap()IntObjectBiMap(com.carrotsearch.hppc.IntObjectMap<T> theMap, com.carrotsearch.hppc.ObjectIntMap<T> theInverse)IntObjectBiMap(IntObjectBiMap<T> theMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(int key)booleanequals(java.lang.Object obj)voidforEach(java.util.function.Consumer<? super com.carrotsearch.hppc.cursors.IntObjectCursor<T>> action)<T1 extends com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T>>
T1forEach(T1 predicate)Tget(int key)TgetOrDefault(int key, T defaultValue)inthashCode()booleanindexExists(int index)TindexGet(int index)voidindexInsert(int index, int key, T value)intindexOf(int key)TindexReplace(int index, T newValue)com.carrotsearch.hppc.ObjectIntMap<T>inverse()booleanisEmpty()java.util.Iterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>>iterator()com.carrotsearch.hppc.IntCollectionkeys()Tput(int key, T value)intputAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends T> container)intputAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends T>> iterable)voidrelease()Tremove(int key)intremoveAll(com.carrotsearch.hppc.IntContainer container)intremoveAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T> predicate)intremoveAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)intsize()java.util.Spliterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>>spliterator()com.carrotsearch.hppc.ObjectContainer<T>values()java.lang.StringvisualizeKeyDistribution(int characters)
-
-
-
Constructor Detail
-
IntObjectBiMap
public IntObjectBiMap()
-
IntObjectBiMap
public IntObjectBiMap(IntObjectBiMap<T> theMap)
-
-
Method Detail
-
inverse
public com.carrotsearch.hppc.ObjectIntMap<T> inverse()
-
clear
public void clear()
- Specified by:
clearin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.carrotsearch.hppc.IntObjectMap<T>- Overrides:
equalsin classjava.lang.Object
-
getOrDefault
public T getOrDefault(int key, T defaultValue)
- Specified by:
getOrDefaultin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.carrotsearch.hppc.IntObjectMap<T>- Overrides:
hashCodein classjava.lang.Object
-
indexExists
public boolean indexExists(int index)
- Specified by:
indexExistsin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexGet
public T indexGet(int index)
- Specified by:
indexGetin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexInsert
public void indexInsert(int index, int key, T value)- Specified by:
indexInsertin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexOf
public int indexOf(int key)
- Specified by:
indexOfin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexReplace
public T indexReplace(int index, T newValue)
- Specified by:
indexReplacein interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
put
public T put(int key, T value)
- Specified by:
putin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
putAll
public int putAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends T> container)
- Specified by:
putAllin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
putAll
public int putAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends T>> iterable)
- Specified by:
putAllin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
release
public void release()
- Specified by:
releasein interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
remove
public T remove(int key)
- Specified by:
removein interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
visualizeKeyDistribution
public java.lang.String visualizeKeyDistribution(int characters)
- Specified by:
visualizeKeyDistributionin interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKeyin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
forEach
public <T1 extends com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T>> T1 forEach(T1 predicate)
- Specified by:
forEachin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
forEach
public <T1 extends com.carrotsearch.hppc.procedures.IntObjectProcedure<? super T>> T1 forEach(T1 procedure)
- Specified by:
forEachin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
iterator
public java.util.Iterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>> iterator()
-
keys
public com.carrotsearch.hppc.IntCollection keys()
- Specified by:
keysin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
removeAll
public int removeAll(com.carrotsearch.hppc.IntContainer container)
- Specified by:
removeAllin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T> predicate)
- Specified by:
removeAllin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)
- Specified by:
removeAllin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
size
public int size()
- Specified by:
sizein interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
values
public com.carrotsearch.hppc.ObjectContainer<T> values()
- Specified by:
valuesin interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
forEach
public void forEach(java.util.function.Consumer<? super com.carrotsearch.hppc.cursors.IntObjectCursor<T>> action)
- Specified by:
forEachin interfacejava.lang.Iterable<T>
-
-