com.generationjava.collections
Class ListMap
java.lang.Object
|
+--com.generationjava.collections.ListMap
- All Implemented Interfaces:
- java.util.Map
- public class ListMap
- extends java.lang.Object
- implements java.util.Map
An Ordered Map. Values and keys are obtained in the order in
which they were added. Sadly it is not possible to implement
both Map and List due to method-signature clashes in the remove
methods.
| Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
|
Constructor Summary |
ListMap()
|
ListMap(java.util.Map m,
java.util.List l)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ListMap
public ListMap()
ListMap
public ListMap(java.util.Map m,
java.util.List l)
clear
public void clear()
- Specified by:
clear in interface java.util.Map
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.util.Map- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface java.util.Map- Overrides:
hashCode in class java.lang.Object
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Map
size
public int size()
- Specified by:
size in interface java.util.Map
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey in interface java.util.Map
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue in interface java.util.Map
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet in interface java.util.Map
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get in interface java.util.Map
keySet
public java.util.Set keySet()
- Specified by:
keySet in interface java.util.Map
values
public java.util.Collection values()
- Specified by:
values in interface java.util.Map
contains
public boolean contains(java.lang.Object o)
containsAll
public boolean containsAll(java.util.Collection c)
get
public java.lang.Object get(int index)
indexOf
public int indexOf(java.lang.Object o)
iterator
public java.util.Iterator iterator()
lastIndexOf
public int lastIndexOf(java.lang.Object o)
listIterator
public java.util.ListIterator listIterator()
listIterator
public java.util.ListIterator listIterator(int index)
subList
public java.util.List subList(int fromIndex,
int toIndex)
toArray
public java.lang.Object[] toArray()
toArray
public java.lang.Object[] toArray(java.lang.Object[] a)
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put in interface java.util.Map
putAll
public void putAll(java.util.Map t)
- Specified by:
putAll in interface java.util.Map
remove
public java.lang.Object remove(java.lang.Object key)
- This method harbours bugs. If the same object is in the map it will have
possible problems removing it.
- Specified by:
remove in interface java.util.Map
removeAtIndex
public java.lang.Object removeAtIndex(int index)
getKey
public java.lang.Object getKey(int index)
Copyright © 2000-2002 GenerationJava. All Rights Reserved.