Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.tv.locator
Interface Locator


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(java.lang.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.
 java.lang.String toExternalForm()
          Generates a canonical, string-based representation of this Locator.
 java.lang.String toString()
          Returns the string used to create this locator.
 

Method Detail

toExternalForm

public java.lang.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 MediaLocators and URLs.

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

hasMultipleTransformations

public boolean hasMultipleTransformations()
Indicates whether this Locator has a mapping to multiple transports.

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

equals

public boolean equals(java.lang.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.

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

public 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.

Returns:
The hash code value for this Locator.
See Also:
equals(Object)

toString

public java.lang.String toString()
Returns the string used to create this locator.

Returns:
The string used to create this locator.
See Also:
LocatorFactory.createLocator(java.lang.String)

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.