y.util
Class HashMap2D

java.lang.Object
  |
  +--y.util.HashMap2D

public class HashMap2D
extends Object

This class represents a 2-dimensional hashmap. A 2-dimensional hashmap 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(Object key1, Object key2)
          Tests if the specified objects are a pair of keys in this hashtable.
 Object get(Object key1, Object key2)
          Returns the value to which the specified pair of keys is mapped.
 void put(Object key1, Object key2, 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(Object key1,
                Object key2,
                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(Object key1,
                           Object key2)
Tests if the specified objects are a pair of keys in this hashtable.


get

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


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

2003