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 void
clear()
boolean
containsKey(int key)
boolean
equals(java.lang.Object obj)
void
forEach(java.util.function.Consumer<? super com.carrotsearch.hppc.cursors.IntObjectCursor<T>> action)
<T1 extends com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T>>
T1forEach(T1 predicate)
T
get(int key)
T
getOrDefault(int key, T defaultValue)
int
hashCode()
boolean
indexExists(int index)
T
indexGet(int index)
void
indexInsert(int index, int key, T value)
int
indexOf(int key)
T
indexReplace(int index, T newValue)
com.carrotsearch.hppc.ObjectIntMap<T>
inverse()
boolean
isEmpty()
java.util.Iterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>>
iterator()
com.carrotsearch.hppc.IntCollection
keys()
T
put(int key, T value)
int
putAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends T> container)
int
putAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends T>> iterable)
void
release()
T
remove(int key)
int
removeAll(com.carrotsearch.hppc.IntContainer container)
int
removeAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T> predicate)
int
removeAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)
int
size()
java.util.Spliterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>>
spliterator()
com.carrotsearch.hppc.ObjectContainer<T>
values()
java.lang.String
visualizeKeyDistribution(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:
clear
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
- Overrides:
equals
in classjava.lang.Object
-
getOrDefault
public T getOrDefault(int key, T defaultValue)
- Specified by:
getOrDefault
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
- Overrides:
hashCode
in classjava.lang.Object
-
indexExists
public boolean indexExists(int index)
- Specified by:
indexExists
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexGet
public T indexGet(int index)
- Specified by:
indexGet
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexInsert
public void indexInsert(int index, int key, T value)
- Specified by:
indexInsert
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexOf
public int indexOf(int key)
- Specified by:
indexOf
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
indexReplace
public T indexReplace(int index, T newValue)
- Specified by:
indexReplace
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
put
public T put(int key, T value)
- Specified by:
put
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
putAll
public int putAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends T> container)
- Specified by:
putAll
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
putAll
public int putAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends T>> iterable)
- Specified by:
putAll
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
release
public void release()
- Specified by:
release
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
remove
public T remove(int key)
- Specified by:
remove
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
visualizeKeyDistribution
public java.lang.String visualizeKeyDistribution(int characters)
- Specified by:
visualizeKeyDistribution
in interfacecom.carrotsearch.hppc.IntObjectMap<T>
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
forEach
public <T1 extends com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T>> T1 forEach(T1 predicate)
- Specified by:
forEach
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
forEach
public <T1 extends com.carrotsearch.hppc.procedures.IntObjectProcedure<? super T>> T1 forEach(T1 procedure)
- Specified by:
forEach
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in 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:
keys
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
removeAll
public int removeAll(com.carrotsearch.hppc.IntContainer container)
- Specified by:
removeAll
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T> predicate)
- Specified by:
removeAll
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)
- Specified by:
removeAll
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
size
public int size()
- Specified by:
size
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
values
public com.carrotsearch.hppc.ObjectContainer<T> values()
- Specified by:
values
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<T>
-
forEach
public void forEach(java.util.function.Consumer<? super com.carrotsearch.hppc.cursors.IntObjectCursor<T>> action)
- Specified by:
forEach
in interfacejava.lang.Iterable<T>
-
-