|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The Routing Table interface.
Implements it to create your own Routing Table.
The keys are String which represent the virtual path of the
WS. This virtual path must not start with a / but with the first virtual
directory.
| Method Summary | |
void |
clear()
Clears the Routing Table so that it contains no keys. |
boolean |
contains(java.lang.Object value)
Tests if some key maps into the specified value in this Routing Table. |
boolean |
containsKey(java.lang.String key)
Tests if the specified object is a key in this Routing Table. |
boolean |
containsKey(java.net.URI key)
Tests if the specified object is a key in this Routing Table. |
boolean |
containsValue(java.lang.Object value)
Returns true if this Routing Table maps one or more keys to this value. |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this Routing Table. |
java.lang.Object |
get(java.lang.String key)
Returns the value to which the specified key is mapped in this Routing Table. |
java.lang.Object |
get(java.net.URI Key)
Returns the value to which the specified key is mapped in this Routing Table. |
java.util.Map |
getTable()
Returns the whole routing table. |
boolean |
isEmpty()
Tests if this Routing Table maps no keys to values. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys in this Routing Table. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Maps the specified key to the specified value
in this Routing Table. |
java.lang.Object |
put(java.net.URI key,
java.lang.Object value)
Maps the specified key to the specified value
in this Routing Table. |
void |
putAll(RoutingTable t)
Copies all of the mappings from the specified Map to this Routing Table These mappings will replace any mappings that this Routing Table had for any of the keys currently in the specified Routing Table. |
java.lang.Object |
remove(java.lang.String key)
Removes the key (and its corresponding value) from this Routing Table. |
java.lang.Object |
remove(java.net.URI key)
Removes the key (and its corresponding value) from this Routing Table. |
int |
size()
Returns the number of keys in this Routing Table. |
java.util.Collection |
values()
Returns a Collection view of the values contained in this Routing Table. |
| Method Detail |
public void clear()
public boolean contains(java.lang.Object value)
value - a value to search for.
true if and only if some key maps to the
value argument in this Routing Table as determined
by the equals method; false otherwise.
java.lang.NullPointerException - if the value is null.containsKey(String),
containsValue(Object)public boolean containsKey(java.lang.String key)
key - possible key.
true if and only if the specified object is a key
in this Routing Table, as determined by the equals
method; false otherwise.
java.lang.NullPointerException - if the key is null.contains(Object)public boolean containsKey(java.net.URI key)
key - possible key.
true if and only if the specified object is a key
in this Routing Table, as determined by the equals
method; false otherwise.
java.lang.NullPointerException - if the key is null.contains(Object)public boolean containsValue(java.lang.Object value)
value - value whose presence in this Routing Table is to be tested.
java.lang.NullPointerException - if the value is null.public java.util.Enumeration elements()
Enumeration,
keys(),
values()public java.lang.Object get(java.lang.String key)
key - a key in the Routing Table.
null if the key is not mapped to any value in this
Routing Table.
java.lang.NullPointerException - if the key is null.put(String, Object)public java.lang.Object get(java.net.URI Key)
null if the key is not mapped to any value in this
Routing Table.
java.lang.NullPointerException - if the key is null.put(URI, Object)public boolean isEmpty()
true if this Routing Table maps no keys to values;
false otherwise.public java.util.Enumeration keys()
Enumeration,
elements()
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
key to the specified value
in this Routing Table. Neither the key nor the value can be
null.
The value can be retrieved by calling the get method with
a key that is equal to the original key.
key - the Routing Table key.value - the value.
null if it did not have one.
java.lang.NullPointerException - if the key or value is null.Object.equals(Object),
get(String)
public java.lang.Object put(java.net.URI key,
java.lang.Object value)
key to the specified value
in this Routing Table. Neither the key nor the value can be
null.
The value can be retrieved by calling the get method with
a key that is equal to the original key.
key - the Routing Table key.value - the value.
null if it did not have one.
java.lang.NullPointerException - if the key or value is null.Object.equals(Object),
get(URI)public void putAll(RoutingTable t)
t - Mappings to be stored in this Routing Table.
java.lang.NullPointerException - if the specified Routing Table is null.public java.lang.Object remove(java.lang.String key)
key - the key that needs to be removed.
null if the key did not have a mapping.
java.lang.NullPointerException - if the key is null.public java.lang.Object remove(java.net.URI key)
key - the key that needs to be removed.
null if the key did not have a mapping.
java.lang.NullPointerException - if the key is null.public int size()
public java.util.Collection values()
public java.util.Map getTable()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||