| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.util.ListMap
This class combines the utility of the HashMap & the ListSet. Features are: 1) Ensure quick random access to an object using a 'key' 2) Iterate through the Map in the order in which the entries were made
| Nested Class Summary | 
| Nested classes inherited from class java.util.Map | 
| Map.Entry | 
| Constructor Summary | |
| ListMap()Creates new ListMap | |
| ListMap(int initialCapacity)Creates new ListMap specifying the initial capacity. | |
| ListMap(int initialCapacity,
               float loadFactor)Creates new ListMap specifying the initial capacity and load factor. | |
| ListMap(Map t)Creates new ListMap from an existing Map | |
| Method Summary | |
|  void | clear()Removes all mappings from this map . | 
|  Object | clone()Returns a clone of the Map. | 
|  boolean | containsKey(Object key)Returns true if this map contains a mapping for the specified key. | 
|  boolean | containsValue(Object value)Returns true if this map maps one or more keys to the specified value. | 
|  Set | entrySet()Returns a set view of the mappings contained in this map. | 
|  boolean | equals(Object o)Compares the specified object with this map for equality. | 
|  Object | get(Object key)Returns the value to which this map maps the specified key. | 
|  Object | getByIndex(int index)Returns the mapping at the specified index. | 
|  int | hashCode()Returns the hash code value for this map. | 
|  int | indexOf(Object key)Returns the index in this Map of the specified key. | 
|  boolean | isEmpty()Returns true if this map contains no key-value mappings. | 
|  Set | keySet()Returns a set view of the keys contained in this map. | 
|  Object | put(int index,
       Object key,
       Object value)Adds an object to the Map. | 
|  Object | put(Object key,
       Object value)Adds an object to the Map. | 
|  void | putAll(Map t)Copies all of the mappings from the specified map to this map. | 
|  Object | remove(int index)Removes the mapping for this index from this map if it is present. | 
|  Object | remove(Object key)Removes the mapping for this key from this map if it is present. | 
|  int | size()Returns the number of key-value mappings in this map. | 
|  Collection | values()Returns a collection view of the values contained in this map. | 
| Methods inherited from class java.lang.Object | 
| finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ListMap()
public ListMap(int initialCapacity)
initialCapacity - The initial capacity.
public ListMap(int initialCapacity,
               float loadFactor)
initialCapacity - The initial capacity.loadFactor - The loadFactor.public ListMap(Map t)
t - An existing Map.| Method Detail | 
public Object put(Object key,
                  Object value)
put in interface Mapkey - The key used for adding the object.value - The object to be added.
public Object remove(Object key)
remove in interface Mapkey - key whose mapping is to be removed from the map.
public Set keySet()
keySet in interface Mappublic void clear()
clear in interface Mappublic Collection values()
values in interface Mappublic int hashCode()
hashCode in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mapkey - key whose presence in this map is to be tested.
public int size()
size in interface Mappublic Set entrySet()
entrySet in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mapvalue - value whose presence in this map is to be tested.
public void putAll(Map t)
putAll in interface Mapt - Mappings to be stored in this map.public boolean equals(Object o)
equals in interface Mapo - object to be compared for equality with this map.
public boolean isEmpty()
isEmpty in interface Mappublic Object get(Object key)
get in interface Mapkey - key whose associated value is to be returned.
public Object put(int index,
                  Object key,
                  Object value)
index - The position at which the the object will be added.key - The key used for adding the object.value - The object to be added.
public Object getByIndex(int index)
index - The position at from which the mapping is to be retrieved.
public Object remove(int index)
index - The position at from which the mapping is to be removed.
public int indexOf(Object key)
key - The key used for adding the object.
public Object clone()
             throws CloneNotSupportedException
CloneNotSupportedException - if cloning is not supported. Should never happen.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||