net.sf.xtvdclient.xtvd.datatypes
Class MovieAdvisories

java.lang.Object
  extended by net.sf.xtvdclient.xtvd.datatypes.MovieAdvisories
All Implemented Interfaces:
java.lang.Comparable

public class MovieAdvisories
extends java.lang.Object
implements java.lang.Comparable

A ordinal-based typesafe enum class that represents the pre-defined values for tms:movieAdvisoriess as defined in the XTVD schema.

Since:
ddclient 1.2

Copyright 2004, Tribune Media Services

$Id: MovieAdvisories.java,v 1.4 2004/03/26 15:56:16 rakesh Exp $


Field Summary
static MovieAdvisories ADOLESCENTES_Y_ADULTOS
          The typesafe representation of the Adolescentes y Adultos movieAdvisories.
static MovieAdvisories ADULT_SITUATIONS
          The typesafe representation of the Adult Situations movieAdvisories.
static MovieAdvisories ADULTOS
          The typesafe representation of the Adultos movieAdvisories.
static MovieAdvisories BRIEF_NUDITY
          The typesafe representation of the Brief Nudity movieAdvisories.
static MovieAdvisories GRAPHIC_LANGUAGE
          The typesafe representation of the Graphic Language movieAdvisories.
static MovieAdvisories GRAPHIC_VIOLENCE
          The typesafe representation of the Graphic Violence movieAdvisories.
static MovieAdvisories LANGUAGE
          The typesafe representation of the Language movieAdvisories.
static MovieAdvisories MILD_VIOLENCE
          The typesafe representation of the Mild Violence movieAdvisories.
static MovieAdvisories NUDITY
          The typesafe representation of the Nudity movieAdvisories.
static MovieAdvisories PUBLICO_GENERAL
          The typesafe representation of the Publico General movieAdvisories.
static MovieAdvisories RAPE
          The typesafe representation of the Rape movieAdvisories.
static MovieAdvisories STRONG_SEXUAL_CONTENT
          The typesafe representation of the Strong Sexual Content movieAdvisories.
static MovieAdvisories VIOLENCE
          The typesafe representation of the Violence movieAdvisories.
 
Method Summary
 int compareTo(java.lang.Object object)
          Implementation of the Comparable interface.
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
static MovieAdvisories getMovieAdvisory(java.lang.String advisory)
          Return the appropriate MovieAdvisory based upon the string specified.
 int hashCode()
          Returns a hash code value for this class.
 java.lang.String toString()
          Over-ridden to return the value of advisory.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ADULT_SITUATIONS

public static final MovieAdvisories ADULT_SITUATIONS
The typesafe representation of the Adult Situations movieAdvisories.


ADOLESCENTES_Y_ADULTOS

public static final MovieAdvisories ADOLESCENTES_Y_ADULTOS
The typesafe representation of the Adolescentes y Adultos movieAdvisories.


ADULTOS

public static final MovieAdvisories ADULTOS
The typesafe representation of the Adultos movieAdvisories.


BRIEF_NUDITY

public static final MovieAdvisories BRIEF_NUDITY
The typesafe representation of the Brief Nudity movieAdvisories.


GRAPHIC_LANGUAGE

public static final MovieAdvisories GRAPHIC_LANGUAGE
The typesafe representation of the Graphic Language movieAdvisories.


GRAPHIC_VIOLENCE

public static final MovieAdvisories GRAPHIC_VIOLENCE
The typesafe representation of the Graphic Violence movieAdvisories.


LANGUAGE

public static final MovieAdvisories LANGUAGE
The typesafe representation of the Language movieAdvisories.


MILD_VIOLENCE

public static final MovieAdvisories MILD_VIOLENCE
The typesafe representation of the Mild Violence movieAdvisories.


NUDITY

public static final MovieAdvisories NUDITY
The typesafe representation of the Nudity movieAdvisories.


PUBLICO_GENERAL

public static final MovieAdvisories PUBLICO_GENERAL
The typesafe representation of the Publico General movieAdvisories.


RAPE

public static final MovieAdvisories RAPE
The typesafe representation of the Rape movieAdvisories.


STRONG_SEXUAL_CONTENT

public static final MovieAdvisories STRONG_SEXUAL_CONTENT
The typesafe representation of the Strong Sexual Content movieAdvisories.


VIOLENCE

public static final MovieAdvisories VIOLENCE
The typesafe representation of the Violence movieAdvisories.

Method Detail

getMovieAdvisory

public static MovieAdvisories getMovieAdvisory(java.lang.String advisory)
Return the appropriate MovieAdvisory based upon the string specified. If the appropriate movie advisory does not exist return null.

Parameters:
advisory - The advisory value that is to be used to fetch the corresponding MovieAdvisories.
Returns:
MovieAdvisories - The appropriate instance if a corresponding instance is found, null otherwise.

toString

public java.lang.String toString()
Over-ridden to return the value of advisory.

Overrides:
toString in class java.lang.Object
Returns:
String - The string representation of this class instance.

compareTo

public int compareTo(java.lang.Object object)
Implementation of the Comparable interface. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - The object with which this class is to be compared. No class type checking is done.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. Returns true if the specified object is of the same class type, and has the same ordinal value.

Overrides:
equals in class java.lang.Object
Parameters:
object - The reference object with which to compare.
Returns:
Return true if the match succeeds.

hashCode

public int hashCode()
Returns a hash code value for this class. Return the value of ordinal.

Overrides:
hashCode in class java.lang.Object
Returns:
int - A hash code value for the object.