|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.rt.credential.OrderedMap
Field Summary | |
private java.util.HashMap |
dataMap
map for the key-value pairs |
private static int |
DEFAULT_SIZE
defualt map capacity |
private boolean |
editable
whether this map is editable |
private java.lang.Class |
keyClass
key type |
private java.util.ArrayList |
keyList
also stores the keys as they are added to the list, so that we can remember the ordering of the keys. |
private java.lang.Class |
valueClass
value type |
Constructor Summary | |
OrderedMap()
Constructor for OrderedMap. |
|
OrderedMap(java.lang.Class keyClass,
java.lang.Class valueClass)
Constructor for OrderedMap. |
|
OrderedMap(int size)
Constructor for OrderedMap. |
|
OrderedMap(int size,
java.lang.Class keyClass,
java.lang.Class valueClass)
Constructor for OrderedMap. |
Method Summary | |
boolean |
constainsKey(java.lang.Object key)
Method constainsKey. |
java.lang.Object |
get(java.lang.Object key)
Returns the value for the given key and returns null if there is no mapping for the given key . |
java.lang.Class |
getKeyClass()
Returns the key type. |
java.lang.Class |
getValueClass()
Returns the value type |
boolean |
isEditable()
Returns true if the map is editable. |
java.util.Iterator |
keyIterator()
Returns iterator to the list of keys in the map. |
java.util.List |
keyList()
Returns an unmodifiable view of all the keys. |
private void |
myPut(java.lang.Object key,
java.lang.Object value)
|
void |
put(java.lang.Object key,
java.lang.Object value)
Method put. |
void |
putAll(OrderedMap map)
Copies all the mapping entries to this map, perserving the original ordering of the entries. |
void |
setUneditable()
marks this map as uneditable. |
int |
size()
Returns the size of this map |
java.util.Map |
valueMap()
Returns an unmodifiable view of this map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.Class keyClass
private java.lang.Class valueClass
private java.util.HashMap dataMap
private java.util.ArrayList keyList
private boolean editable
private static final int DEFAULT_SIZE
Constructor Detail |
public OrderedMap()
public OrderedMap(int size)
public OrderedMap(java.lang.Class keyClass, java.lang.Class valueClass)
public OrderedMap(int size, java.lang.Class keyClass, java.lang.Class valueClass)
Method Detail |
public boolean constainsKey(java.lang.Object key)
key
-
public void put(java.lang.Object key, java.lang.Object value) throws DomainSpecException
key
- value
-
DomainSpecException
private void myPut(java.lang.Object key, java.lang.Object value) throws DomainSpecException
DomainSpecException
public void putAll(OrderedMap map) throws DomainSpecException
DomainSpecException
public void setUneditable()
public boolean isEditable()
public int size()
public java.util.Iterator keyIterator()
public java.lang.Object get(java.lang.Object key) throws DomainSpecException
DomainSpecException
public java.util.List keyList()
public java.util.Map valueMap()
public java.lang.Class getKeyClass()
public java.lang.Class getValueClass()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |