org.oddjob.monitor.context
Class AncestorSearch
java.lang.Object
org.oddjob.monitor.context.AncestorSearch
public class AncestorSearch
- extends Object
Helper class to search up an ExplorerContext
.
- Author:
- rob
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AncestorSearch
public AncestorSearch(ExplorerContext start)
- Constructor.
- Parameters:
start
- The context to start the search from.
getValue
public Object getValue(String key)
- Get the value of a key. If the start context doesn't
contain the value, then the parent value is examined.
If that contains null the search continues upwards
until a value is found or the root is reached.
- Parameters:
key
- The key to the value.
- Returns:
- The first value in the hierarchy, or null if
none exists.