net.sf.xtvdclient.xtvd.datatypes
Class MpaaRatings

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

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

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

Since:
ddclient 1.2

Copyright 2004, Tribune Media Services

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


Field Summary
static MpaaRatings ADULT
          The typesafe representation of the Adult mpaaRating.
static MpaaRatings AO
          The typesafe representation of the AO mpaaRating.
static MpaaRatings G
          The typesafe representation of the G mpaaRating.
static MpaaRatings NC_17
          The typesafe representation of the NC-17 mpaaRating.
static MpaaRatings NONE
          The typesafe representation of the NONE mpaaRating.
static MpaaRatings NOT_RATED
          The typesafe representation of the NOT RATED mpaaRating.
static MpaaRatings NR
          The typesafe representation of the NR mpaaRating.
static MpaaRatings PG
          The typesafe representation of the PG mpaaRating.
static MpaaRatings PG_13
          The typesafe representation of the PG-13 mpaaRating.
static MpaaRatings R
          The typesafe representation of the R mpaaRating.
 
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 MpaaRatings getMpaaRating(java.lang.String rating)
          Return the appropriate MpaaRatings 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 rating.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ADULT

public static final MpaaRatings ADULT
The typesafe representation of the Adult mpaaRating.


AO

public static final MpaaRatings AO
The typesafe representation of the AO mpaaRating.


G

public static final MpaaRatings G
The typesafe representation of the G mpaaRating.


NC_17

public static final MpaaRatings NC_17
The typesafe representation of the NC-17 mpaaRating.


NONE

public static final MpaaRatings NONE
The typesafe representation of the NONE mpaaRating.


NOT_RATED

public static final MpaaRatings NOT_RATED
The typesafe representation of the NOT RATED mpaaRating.


NR

public static final MpaaRatings NR
The typesafe representation of the NR mpaaRating.


PG

public static final MpaaRatings PG
The typesafe representation of the PG mpaaRating.


PG_13

public static final MpaaRatings PG_13
The typesafe representation of the PG-13 mpaaRating.


R

public static final MpaaRatings R
The typesafe representation of the R mpaaRating.

Method Detail

getMpaaRating

public static final MpaaRatings getMpaaRating(java.lang.String rating)
Return the appropriate MpaaRatings based upon the string specified. If the appropriate mpaa rating does not exist return null.

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

toString

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

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.