|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocap.hn.PropertyFilter
public class PropertyFilter
The filter for (key,value) pair filtering mechanism. If a device or a NetModule has same value on all of the specified keys, it is regarded as a match.
| Constructor Summary | |
|---|---|
PropertyFilter(Properties prop)
Constructs a PropertyFilter object. |
|
| Method Summary | |
|---|---|
boolean |
accept(Object element)
Checks whether an element is accepted by this filter, the element must be either NetModule or Device. |
void |
addProperty(String key,
String value)
Adds a (key,value) pair to the filter. |
boolean |
contains(String key)
Checks whether a key is in the list. |
void |
removeKey(String key)
Remove a key from the filter, if the key is not in the property list, no action is taken. |
void |
removeKeys(String[] keys)
Remove keys from the filter, if a key is not in the property list, it is disregarded; while others are processed as normal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyFilter(Properties prop)
prop - Initial properties for this Property filter| Method Detail |
|---|
public void addProperty(String key,
String value)
key - New key which will be used for filtering.value - Value for the new key.public boolean contains(String key)
key - Key to be checked against.
public boolean accept(Object element)
NetModule or Device.
If a NetModule/Device's properties share the same value as all
properties from this filter, it is accepted and true is returned;
otherwise, false is returned.
element - Element to be checked against.
public void removeKey(String key)
key - Key to be removed from list.public void removeKeys(String[] keys)
keys - Keys to be removed from the list.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||