org.tm4j.net .Locator

Description

The interface to be supported by all classes implementing resolvable addresses in TM4J. A locator may be absolute or relative, and it may be resolved relative to another locator.Each locator consists of the following components:

  • A notation, defined by a String. It is accessible via the #getNotation() method.
  • An address, also defined by a String. It is accessible via the #getAddress() method.
Classes implementing Locator are usually not instantiated directly — you should resort to using LocatorFactory#createLocator instead. Classes implementing Locator should ensure that they provide a constructor of the signature (LocatorFactory, String, String) to allow for proper locator creation on the factory's part. LocatorBase provides such a constructor, so it's generally a good idea to extend that class rather than implement Locator directly.

Inheritance Hierarchy

Implementations of this interface

Method Summary
Locator copy()
Returns a copy of this object.
void equals(org.tm4j.net.Locator loc)
Determines the equality of this Locator to loc:
java.lang.String getAddress()
Gets the address associated with the locator
LocatorFactory getFactory()
Returns the locator factory associated with this locator.
java.lang.String getNotation()
Gets the string defining the notation type of this locator
void hashCode()
Returns the Locator's object hashcode.
void initialise(java.lang.String notation,java.lang.String address)
Initializes the locator with the specified notation and address.
Locator resolveRelative(java.lang.String rel)
Returns a new Locator whose address is the result of resolvng the specified relative address string relative to this Locator.
Locator resolveRelative(org.tm4j.net.Locator rel)
Returns a new Locator whose address is the result of resolving the specified Locator relative to this Locator.
void setFactory(org.tm4j.net.LocatorFactory factory)
Associates the locator with the given factory.

Related Topics

Imports
Is Contained By
Is Imported By
Is Type For