javax.tv.service.SIElement Maven / Gradle / Ivy
/**
This is not an official specification document, and usage is restricted.
NOTICE
(c) 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
Neither this file nor any files generated from it describe a complete
specification, and they may only be used as described below.
Sun Microsystems Inc. owns the copyright in this file and it is provided
to you for informative use only. For example,
this file and any files generated from it may be used to generate other documentation,
such as a unified set of documents of API signatures for a platform
that includes technologies expressed as Java APIs.
This file may also be used to produce "compilation stubs,"
which allow applications to be compiled and validated for such platforms.
By contrast, no permission is given for you to incorporate this file,
in whole or in part, in an implementation of a Java specification.
Any work generated from this file, such as unified javadocs or compiled
stub files, must be accompanied by this notice in its entirety.
This work corresponds to the API signatures of JSR 927: Java TV API 1.1.1.
In the event of a discrepency between this work and the JSR 927 specification,
which is available at http://www.jcp.org/en/jsr/detail?id=927, the latter takes precedence.
*/
package javax.tv.service;
import javax.tv.locator.Locator;
/**
* The base interface of elements provided by the SI database.
* SIElement
objects represent immutable copies
* of the service information data contained in the SI database. If
* the information represented by an SIElement
E
* changes in the database, E will not be changed. The value
* of the SIElement
's locator (obtained by the
* getLocator()
method) will remain unchanged in this
* case; the locator may be used to retrieve a copy of the SI element
* with the new data. Two SIElement
objects retrieved
* from the SI database using the same input Locator
at
* different times will report Locator
objects that are
* equal according to Locator.equal()
. However, the
* SIElement
objects themselves will not be
* equal()
if the corresponding data changed in the SI
* database between the times of their respective retrievals.
*
* @see #getLocator
* @see SIManager#retrieveSIElement
*/
public interface SIElement extends SIRetrievable
{
/**
* Reports the Locator
of this SIElement
.
*
* @return Locator The locator referencing this
* SIElement
*/
public Locator getLocator();
/**
* Tests two SIElement
objects for equality. Returns
* true
if and only if:
*
* obj
's class is the
* same as the class of this SIElement
, and
*
obj
's Locator
is equal to
* the Locator
of this object (as reported by
* SIElement.getLocator()
, and
*
obj
and this object encapsulate identical data.
*
*
* @param obj The object against which to test for equality.
*
* @return true
if the two SIElement
objects
* are equal; false
otherwise.
*/
public boolean equals(Object obj);
/**
* Reports the hash code value of this SIElement
. Two
* SIElement
objects that are equal will have identical
* hash codes.
*
* @return The hash code value of this SIElement
.
*/
public int hashCode();
/**
* Reports the SI format in which this SIElement
was
* delivered.
*
* If the SI format of the SIElement
is not represented
* as a constant in the class {@link ServiceInformationType}, the value
* returned by this method may be outside the defined set of constants.
*
* @return The SI format in which this SI element was delivered.
*/
public ServiceInformationType getServiceInformationType();
}