|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oxygenxml.validate.nvdl.ContextMap
class ContextMap
Keeps modes depending on context. The structure of the context map is stores the mode for / in rootValue "" in otherValue (this is for relative paths) stores a hash with the last path elements as key and ContextMap objects as values. A path like a/b and mode x will be represented by 3 ContextMap objects ContextMap b ---> ContextMap a ---> ContextMap otherValue=x Addind also /a/b and mode y will give ContextMap b ---> ContextMap a ---> ContextMap (otherValue=x, rootValue=y) Adding a2/b and mode w will give ContextMap b ---> ContextMap a ---> ContextMap (otherValue=x, rootValue=y) a2 ---> ContextMap otherValue=w
| Nested Class Summary | |
|---|---|
private static class |
ContextMap.Enumerator
Creates an Enumeration implementation that enumerates all the modes stored in this context map and in the nested context maps. |
| Field Summary | |
|---|---|
private Hashtable |
nameTable
Stores a hash map with with the key the last local name and as values other ContextMap objects. |
private Object |
otherValue
Stores a mode associated with a relative path. |
private Object |
rootValue
Stores the mode associated with an absolute path. |
| Constructor Summary | |
|---|---|
ContextMap()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Chek that this context map is equals with a specified context map. |
(package private) Object |
get(Vector context)
Get the mode matching a list of local names. |
private Object |
get(Vector context,
int len)
Get the mode matching a list of local names. |
int |
hashCode()
Get a hashcode for this context map. |
private boolean |
put(boolean isRoot,
Vector names,
int len,
Object value)
Adds a single path (isRoot, names) and a mode to be used for this path = context. |
(package private) boolean |
put(boolean isRoot,
Vector names,
Object value)
Adds a single path (isRoot, names) and a mode to be used for this path = context. |
(package private) Enumeration |
values()
Get an enumeration with all the modes in this context map. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Object rootValue
private Object otherValue
private final Hashtable nameTable
| Constructor Detail |
|---|
ContextMap()
| Method Detail |
|---|
Object get(Vector context)
context - The list of local names that represent a section context
(path from root local element names from the same namespace).
boolean put(boolean isRoot,
Vector names,
Object value)
isRoot - True if the path starts with /names - The local names that form the path.value - The mode.
private Object get(Vector context,
int len)
context - The list of local names that represent a section context
(path from root local element names from the same namespace).len - The lenght we should take from the list.
private boolean put(boolean isRoot,
Vector names,
int len,
Object value)
isRoot - True if the path starts with /names - The local names that form the path.len - The length if the names vector.value - The mode.
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class ObjectEnumeration values()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||