net.cscott.jutil
Class LinearMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
net.cscott.jutil.LinearMap<K,V>
- All Implemented Interfaces:
- Map<K,V>
public class LinearMap<K,V>
- extends AbstractMap<K,V>
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.4 2006-10-30 19:58:06 cananian Exp $
- Author:
- Felix S. Klock II
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, toString, values |
LinearMap
public LinearMap()
- Creates a
LinearMap
.
LinearMap
public LinearMap(Map<K,V> map)
LinearMap
public LinearMap(int capacity)
- Creates a
LinearMap
with specified capacity.
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet
in interface Map<K,V>
- Specified by:
entrySet
in class AbstractMap<K,V>
put
public V put(K key,
V value)
- Specified by:
put
in interface Map<K,V>
- Overrides:
put
in class AbstractMap<K,V>
remove
public V remove(Object key)
- Specified by:
remove
in interface Map<K,V>
- Overrides:
remove
in class AbstractMap<K,V>
Copyright (c) 2006 C. Scott Ananian