パッケージ org.aiwolf.common.util

クラス BidiMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.aiwolf.common.util.BidiMap<K,V>
型パラメータ:
K -
キー
Key
V -
Value
すべての実装されたインタフェース:
Serializable, Cloneable, Map<K,V>

public class BidiMap<K,V> extends HashMap<K,V>
双方向マップです。
Bidimap.
関連項目:
  • コンストラクタの詳細

    • BidiMap

      public BidiMap()
      新しいBidiMapを構築します。
      Create new BidiMap.
    • BidiMap

      public BidiMap(int initialCapacity, float loadFactor)
      指定された初期容量と負荷係数を持つ、 空のBidiMapを作成します。
      Constructs an empty BidiMap with the specified initial capacity and load factor.
      パラメータ:
      initialCapacity -
      初期容量
      The initial capacity
      loadFactor -
      負荷係数
      The load factor
    • BidiMap

      public BidiMap(int initialCapacity)
      指定された初期容量とデフォルトの負荷係数(0.75)を持つ、 空のBidiMapを作成します。
      Constructs an empty HashMap with the specified initial capacity and the default load factor (0.75).
      パラメータ:
      initialCapacity -
      初期容量
      The initial capacity
    • BidiMap

      public BidiMap(Map<? extends K,? extends V> m)
      指定されたMapと同じマッピングで新しいBidiMapを 作成します。デフォルトの負荷係数(0.75)、および指定 されたMapのマッピングを保持するのに十分な初期容量で、 BidiMapは作成されます。
      Constructs a new BidiMap with the same mappings as the specified Map. The BidiMap is created with default load factor (0.75) and an initial capacity sufficient to hold the mappings in the specified Map.
      パラメータ:
      m -
      マッピングがこのマップに配置されるマップ
      The map whose mappings are to be placed in this map
      例外:
      NullPointerException -
      指定されたマップがnullの場合
      If the specified map is null
  • メソッドの詳細

    • put

      public V put(K key, V value)
      定義:
      put インタフェース内 Map<K,V>
      オーバーライド:
      put クラス内 HashMap<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> m)
      定義:
      putAll インタフェース内 Map<K,V>
      オーバーライド:
      putAll クラス内 HashMap<K,V>
    • getKey

      public K getKey(V value)
      指定された値に関連付けられたキーを返します。
      Get the key.
      パラメータ:
      value -
      Value
      戻り値:
      キー
      Key
    • removeValue

      public K removeValue(V value)
      指定された値とそのキーを削除します。
      Remove the value and key.
      パラメータ:
      value -
      Value
      戻り値:
      値に以前関連付けられていたキー
      Key that related to the value
    • clear

      public void clear()
      定義:
      clear インタフェース内 Map<K,V>
      オーバーライド:
      clear クラス内 HashMap<K,V>