Search this API

y.util
Class HashMap2D

java.lang.Object
  extended by y.util.HashMap2D

public class HashMap2D
extends java.lang.Object

This class represents a 2-dimensional hash map. A 2-dimensional hash map uses an ordered pair of keys to access associated data.

 

Constructor Summary
HashMap2D()
          Creates a new instance of HashMap2D.
HashMap2D(int capacity)
          Creates a new instance of HashMap2D with given initial capacity
 
Method Summary
 boolean containsKey(java.lang.Object key1, java.lang.Object key2)
          Tests if the specified objects are a pair of keys in this hash table.
 java.lang.Object get(java.lang.Object key1, java.lang.Object key2)
          Returns the value to which the specified pair of keys is mapped.
 void put(java.lang.Object key1, java.lang.Object key2, java.lang.Object value)
          Maps the specified pair of keys to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMap2D

public HashMap2D()
Creates a new instance of HashMap2D.


HashMap2D

public HashMap2D(int capacity)
Creates a new instance of HashMap2D with given initial capacity

Method Detail

put

public void put(java.lang.Object key1,
                java.lang.Object key2,
                java.lang.Object value)
Maps the specified pair of keys to the specified value. Neither the key nor the value can be null. The value can be retrieved by calling the get method with the pair of keys that is equal to the original pair of keys.


containsKey

public boolean containsKey(java.lang.Object key1,
                           java.lang.Object key2)
Tests if the specified objects are a pair of keys in this hash table.


get

public java.lang.Object get(java.lang.Object key1,
                            java.lang.Object key2)
Returns the value to which the specified pair of keys is mapped.


© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.