harpoon.Util.Collections
Class LinearMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--harpoon.Util.Collections.LinearMap
All Implemented Interfaces:
Map

public class LinearMap
extends AbstractMap

LinearMap is a simplistic light-weight Map designed for use when the number of entries is small. It is backed by a LinearSet.

Version:
$Id: LinearMap.java,v 1.2 2002/02/25 21:09:04 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
LinearMap()
          Creates a LinearMap.
LinearMap(int capacity)
          Creates a LinearMap with specified capacity.
LinearMap(Map map)
           
 
Method Summary
 Set entrySet()
           
 Object put(Object key, Object value)
           
 Object remove(Object key)
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearMap

public LinearMap()
Creates a LinearMap.


LinearMap

public LinearMap(Map map)

LinearMap

public LinearMap(int capacity)
Creates a LinearMap with specified capacity.

Method Detail

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
Overrides:
put in class AbstractMap

remove

public Object remove(Object key)
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap