|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.knowledgeplaza.util.SortedOnKeyMap
public class SortedOnKeyMap
SortedMap is a simplistic light-weight
Map designed for use when the number of entries is small. It is backed by a ArrayList.
TreeMap is not a 100% replacement, since TreeMap does not allow for NULL as a key.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
SortedOnKeyMap()
Creates a Map. |
|
SortedOnKeyMap(Comparator comparator)
Creates a Map. |
|
SortedOnKeyMap(int capacity)
Creates a SortedMap with specified capacity. |
|
SortedOnKeyMap(Map map)
|
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set |
entrySet()
must return the same collection everytime as defined in the Map interface |
int |
find(Object key)
find the index of a key |
int |
findValue(Object value)
find the index of a key |
Object |
get(Object key)
|
boolean |
isEmpty()
|
Set |
keySet()
Return a set with all keys must return the same collection everytime as defined in the Map interface |
Object |
put(Object key,
Object value)
|
void |
putAll(Map t)
|
Object |
putBefore(Object refKey,
Object key,
Object value)
|
Object |
remove(Object key)
|
int |
size()
|
String |
toString()
|
Collection |
values()
must return the same collection everytime as defined in the Map interface |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public SortedOnKeyMap()
Map.
public SortedOnKeyMap(Comparator comparator)
Map.
public SortedOnKeyMap(int capacity)
SortedMap with specified capacity.
public SortedOnKeyMap(Map map)
| Method Detail |
|---|
public Set entrySet()
entrySet in interface Map
public Object put(Object key,
Object value)
put in interface Map
public Object putBefore(Object refKey,
Object key,
Object value)
refKey - key - value - Throws IllegalArgumentException when the refKey does not exist
public Object remove(Object key)
remove in interface Mappublic Set keySet()
keySet in interface Mappublic int find(Object key)
public int findValue(Object value)
public void clear()
clear in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Object get(Object key)
get in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic void putAll(Map t)
putAll in interface Mappublic int size()
size in interface Mappublic Collection values()
values in interface Mappublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||