Locator

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.tv.locator
Interface Locator

All Known Implementing Classes:
  Locator, OcapLocator, URLLocator

    public interface Locator

The `Locator` interface provides an opaque reference to the location information of objects which are addressable within the Java TV API. A given locator may represent a transport independent object and have multiple mappings to transport dependent locators. Methods are provided for discovery of such circumstances and for transformation to transport dependent locators.

See Also:
  `LocatorFactory`, `LocatorFactory.transformLocator(javax.tv.locator.Locator)`

Method Summary
`boolean` | `equals(Object o)` Compares this `Locator` with the specified object for equality.
`int` | `hashCode()` Generates a hash code value for this `Locator`.
`boolean` | `hasMultipleTransformations()` Indicates whether this `Locator` has a mapping to multiple transports.
`String` | `toExternalForm()` Generates a canonical, string-based representation of this `Locator`.
`String` | `toString()` Returns the string used to create this locator.

Method Detail

### toExternalForm

    String toExternalForm()

  Generates a canonical, string-based representation of this `Locator`. The string returned may be entirely platform-dependent. If two locators have identical external forms, they refer to the same resource. However, two locators that refer to the same resource may have different external forms.

  This method returns the canonical form of the string that was used to create the Locator (via `LocatorFactory.createLocator()`). In generating canonical external forms, the implementation will make its best effort at resolving locators to one-to-one relationships with the resources that they reference.

  The result of this method can be used to create new `Locator` instances as well as other types of locators, such as JMF `MediaLocator`s and `URL`s.

  Returns:
    A string-based representation of this Locator.
  See Also:
    `LocatorFactory.createLocator(java.lang.String)`, `javax.media.MediaLocator`, `URL`

### hasMultipleTransformations

    boolean hasMultipleTransformations()

  Indicates whether this `Locator` has a mapping to multiple transports.

  Returns:
    `true` if multiple transformations exist for this `Locator`, false otherwise.

### equals

    boolean equals(Object o)

  Compares this `Locator` with the specified object for equality. The result is `true` if and only if the specified object is also a `Locator` and has an external form identical to the external form of this `Locator`.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `o` - The object against which to compare this `Locator`.
  Returns:
    `true` if the specified object is equal to this `Locator`.
  See Also:
    `String.equals(Object)`

### hashCode

    int hashCode()

  Generates a hash code value for this `Locator`. Two `Locator` instances for which `Locator.equals()` is `true` will have identical hash code values.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    The hash code value for this `Locator`.
  See Also:
    `equals(Object)`

### toString

    String toString()

  Returns the string used to create this locator.

  Overrides:
    `toString` in class `Object`
  Returns:
    The string used to create this locator.
  See Also:
    `LocatorFactory.createLocator(java.lang.String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD