net.sf.saffron.util
Class EnumeratedValues.BasicValue

java.lang.Object
  |
  +--net.sf.saffron.util.EnumeratedValues.BasicValue
All Implemented Interfaces:
EnumeratedValues.Value
Direct Known Subclasses:
CallingConvention, OptionsListTest.Color, RexKind, SqlJoinOperator.ConditionType, SqlJoinOperator.JoinType, SqlKind, SqlTypeName, TableModificationRel.Operation
Enclosing class:
EnumeratedValues

public static class EnumeratedValues.BasicValue
extends Object
implements EnumeratedValues.Value

BasicValue is an obvious implementation of EnumeratedValues.Value.


Field Summary
 String description_
           
 String name_
           
 int ordinal_
           
 
Constructor Summary
EnumeratedValues.BasicValue(String name, int ordinal, String description)
           
 
Method Summary
 boolean equals(String s)
          Deprecated. I bet you meant to write value.name_.equals(s) rather than value.equals(s), didn't you?
 String getDescription()
           
 String getName()
           
 int getOrdinal()
           
 String toString()
          Returns the value's name.
 Error unexpected()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

description_

public final String description_

name_

public final String name_

ordinal_

public final int ordinal_
Constructor Detail

EnumeratedValues.BasicValue

public EnumeratedValues.BasicValue(String name,
                                   int ordinal,
                                   String description)
Pre-condition:
name != null
Method Detail

getDescription

public String getDescription()
Specified by:
getDescription in interface EnumeratedValues.Value

getName

public String getName()
Specified by:
getName in interface EnumeratedValues.Value

getOrdinal

public int getOrdinal()
Specified by:
getOrdinal in interface EnumeratedValues.Value

equals

public boolean equals(String s)
Deprecated. I bet you meant to write value.name_.equals(s) rather than value.equals(s), didn't you?

Returns whether this value is equal to a given string.


toString

public String toString()
Returns the value's name.

Overrides:
toString in class Object

unexpected

public Error unexpected()

SourceForge.net_Logo