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>, Iterable<com.carrotsearch.hppc.cursors.IntObjectCursor<T>>

public final class IntObjectBiMap<T> extends 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 Details

    • IntObjectBiMap

      public IntObjectBiMap()
    • IntObjectBiMap

      public IntObjectBiMap(IntObjectBiMap<T> theMap)
    • IntObjectBiMap

      public IntObjectBiMap(com.carrotsearch.hppc.IntObjectMap<T> theMap, com.carrotsearch.hppc.ObjectIntMap<T> theInverse)
  • Method Details

    • inverse

      public com.carrotsearch.hppc.ObjectIntMap<T> inverse()
    • clear

      public void clear()
      Specified by:
      clear in interface com.carrotsearch.hppc.IntObjectMap<T>
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.carrotsearch.hppc.IntObjectMap<T>
      Overrides:
      equals in class Object
    • get

      public T get(int key)
      Specified by:
      get in interface com.carrotsearch.hppc.IntObjectMap<T>
    • getOrDefault

      public T getOrDefault(int key, T defaultValue)
      Specified by:
      getOrDefault in interface com.carrotsearch.hppc.IntObjectMap<T>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.carrotsearch.hppc.IntObjectMap<T>
      Overrides:
      hashCode in class Object
    • indexExists

      public boolean indexExists(int index)
      Specified by:
      indexExists in interface com.carrotsearch.hppc.IntObjectMap<T>
    • indexGet

      public T indexGet(int index)
      Specified by:
      indexGet in interface com.carrotsearch.hppc.IntObjectMap<T>
    • indexInsert

      public void indexInsert(int index, int key, T value)
      Specified by:
      indexInsert in interface com.carrotsearch.hppc.IntObjectMap<T>
    • indexOf

      public int indexOf(int key)
      Specified by:
      indexOf in interface com.carrotsearch.hppc.IntObjectMap<T>
    • indexReplace

      public T indexReplace(int index, T newValue)
      Specified by:
      indexReplace in interface com.carrotsearch.hppc.IntObjectMap<T>
    • put

      public T put(int key, T value)
      Specified by:
      put in interface com.carrotsearch.hppc.IntObjectMap<T>
    • putAll

      public int putAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends T> container)
      Specified by:
      putAll in interface com.carrotsearch.hppc.IntObjectMap<T>
    • putAll

      public int putAll(Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends T>> iterable)
      Specified by:
      putAll in interface com.carrotsearch.hppc.IntObjectMap<T>
    • release

      public void release()
      Specified by:
      release in interface com.carrotsearch.hppc.IntObjectMap<T>
    • remove

      public T remove(int key)
      Specified by:
      remove in interface com.carrotsearch.hppc.IntObjectMap<T>
    • visualizeKeyDistribution

      public String visualizeKeyDistribution(int characters)
      Specified by:
      visualizeKeyDistribution in interface com.carrotsearch.hppc.IntObjectMap<T>
    • containsKey

      public boolean containsKey(int key)
      Specified by:
      containsKey in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • forEach

      public <T1 extends com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T>> T1 forEach(T1 predicate)
      Specified by:
      forEach in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • forEach

      public <T1 extends com.carrotsearch.hppc.procedures.IntObjectProcedure<? super T>> T1 forEach(T1 procedure)
      Specified by:
      forEach in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • iterator

      public Iterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>> iterator()
      Specified by:
      iterator in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
      Specified by:
      iterator in interface Iterable<T>
    • keys

      public com.carrotsearch.hppc.IntCollection keys()
      Specified by:
      keys in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • removeAll

      public int removeAll(com.carrotsearch.hppc.IntContainer container)
      Specified by:
      removeAll in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • removeAll

      public int removeAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super T> predicate)
      Specified by:
      removeAll in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • removeAll

      public int removeAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)
      Specified by:
      removeAll in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • size

      public int size()
      Specified by:
      size in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • values

      public com.carrotsearch.hppc.ObjectContainer<T> values()
      Specified by:
      values in interface com.carrotsearch.hppc.IntObjectAssociativeContainer<T>
    • forEach

      public void forEach(Consumer<? super com.carrotsearch.hppc.cursors.IntObjectCursor<T>> action)
      Specified by:
      forEach in interface Iterable<T>
    • spliterator

      public Spliterator<com.carrotsearch.hppc.cursors.IntObjectCursor<T>> spliterator()
      Specified by:
      spliterator in interface Iterable<T>