All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.HashMultiMap

java.lang.Object
   |
   +----java.util.Dictionary
           |
           +----COM.objectspace.jgl.Map
                   |
                   +----COM.objectspace.jgl.HashMap
                           |
                           +----COM.objectspace.jgl.HashMultiMap

public class HashMultiMap
extends HashMap
Note: HashMultiMap is deprecated.

A HashMultiMap is an associative container that manages a set of key/value pairs. A pair is stored in a hashing structure based on the hash code of its key, which is obtained by using the standard hashCode() function. Keys are matched using a BinaryPredicate which is EqualTo() by default. Duplicates keys are allowed.

A HashMultiMap is useful for implementing a collection of one-to-many mappings.

Insertion can invalidate iterators.

Removal can invalidate iterators.

See Also:
HashMap, HashMapExamples, HashMap

Constructor Index

 o HashMultiMap()
Construct myself to be an empty HashMultiMap that compares key using equals().
 o HashMultiMap(BinaryPredicate)
Construct myself to be an empty HashMultiMap that compares keys using the specified binary predicate.
 o HashMultiMap(BinaryPredicate, int, float)
Construct myself to be an empty HashMultiMap that compares keys using the specified binary predicate.
 o HashMultiMap(HashMultiMap)
Construct myself to be a shallow copy of an existing HashMultiMap.

Method Index

 o clone()
Return a shallow copy of myself.
 o equals(HashMultiMap)
Return true if I contain exactly the same key/value pairs as another HashMultiMap.
 o equals(Object)
Return true if I'm equal to another object.
 o swap(HashMultiMap)
Swap my contents with another HashMultiMap.
 o toString()
Return a string that describes me.

Constructors

 o HashMultiMap
  public HashMultiMap()
Construct myself to be an empty HashMultiMap that compares key using equals().

 o HashMultiMap
  public HashMultiMap(BinaryPredicate comparator)
Construct myself to be an empty HashMultiMap that compares keys using the specified binary predicate.

Parameters:
comparator - The predicate for comparing keys.
 o HashMultiMap
  public HashMultiMap(BinaryPredicate comparator,
                      int capacity,
                      float loadRatio)
Construct myself to be an empty HashMultiMap that compares keys using the specified binary predicate. The initial buckets and load ratio must also be specified.

Parameters:
comparator - The predicate for comparing keys.
capacity - The initial number of hash buckets to reserve.
loadRatio - The maximum load ratio.
 o HashMultiMap
  public HashMultiMap(HashMultiMap map)
Construct myself to be a shallow copy of an existing HashMultiMap.

Parameters:
map - The HashMultiMap to copy.

Methods

 o clone
  public synchronized Object clone()
Return a shallow copy of myself.

Overrides:
clone in class HashMap
 o toString
  public synchronized String toString()
Return a string that describes me.

Overrides:
toString in class HashMap
 o equals
  public boolean equals(Object object)
Return true if I'm equal to another object.

Parameters:
object - The object to compare myself against.
Overrides:
equals in class HashMap
 o equals
  public synchronized boolean equals(HashMultiMap map)
Return true if I contain exactly the same key/value pairs as another HashMultiMap. Use equals() to compare values.

Parameters:
map - The HashMultiMap to compare myself against.
 o swap
  public synchronized void swap(HashMultiMap map)
Swap my contents with another HashMultiMap.

Parameters:
map - The HashMultiMap that I will swap my contents with.

All Packages  Class Hierarchy  This Package  Previous  Next  Index