| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Locator<E>
This interface defines search methods that allow locating resources in a model. A resource is identified by its Object ID (mandatory) or associated unique name (optional). This interface is the base for all locators; other locators allow a more specific search in the context they are offered in, e.g. a search for a node with certain properties in a model.
A Locator is usually obtained using a LocatorProvider:
SearchableTreeModel model = ...;
Locator locator = model.getLocator();
Object node = locator.findByUniqueName("my.Unique.Name");
This locator returns an Object which is part of some model.
What exact kind of object is returned depends on the locator. Please refer to
individual JavaDoc for the locator used. The result object can
be expected to be an element of the model the locator is used on unless specified
otherwise.
| Method Summary | |
|---|---|
| E | findByID(ObjectID anObjectID)
Returns an element of a model with the given ID. |
| E | findByUniqueName(java.lang.String aName)
Returns an element of a model with the given name. |
| Method Detail |
|---|
E findByID(ObjectID anObjectID)
null.
null if the element cannot be found.
findByID is semantically
not possible for the locator implementationE findByUniqueName(java.lang.String aName)
null.
null if the element cannot be found.
findByUniqueName is semantically
not possible for the locator implementation
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||