net.sf.xtvdclient.xtvd.datatypes
Class TvColorCode

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

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

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

Since:
ddclient 1.2

Copyright 2004, Tribune Media Services

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


Field Summary
static TvColorCode BLACK_AND_WHITE
          The typesafe representation of the B & W tvColorCode.
static TvColorCode COLOR
          The typesafe representation of the Color tvColorCode.
static TvColorCode COLOR_AND_BLACK_AND_WHITE
          The typesafe representation of the Color and B & W tvColorCode.
static TvColorCode COLORIZED
          The typesafe representation of the Colorized tvColorCode.
 
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 TvColorCode getColorCode(java.lang.String colorCode)
          Return the appropriate ColorCode 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 colorCode.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BLACK_AND_WHITE

public static final TvColorCode BLACK_AND_WHITE
The typesafe representation of the B & W tvColorCode.


COLOR

public static final TvColorCode COLOR
The typesafe representation of the Color tvColorCode.


COLORIZED

public static final TvColorCode COLORIZED
The typesafe representation of the Colorized tvColorCode.


COLOR_AND_BLACK_AND_WHITE

public static final TvColorCode COLOR_AND_BLACK_AND_WHITE
The typesafe representation of the Color and B & W tvColorCode.

Method Detail

getColorCode

public static TvColorCode getColorCode(java.lang.String colorCode)
Return the appropriate ColorCode based upon the string specified. If the appropriate color code does not exist return null.

Parameters:
colorCode - The colorCode value that is to be used to fetch the corresponding TvColorCode.
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 colorCode.

Overrides:
toString in class java.lang.Object
Returns:
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:
A hash code value for the object.