Package mondrian.olap
Class EnumeratedValues.BasicValue
- java.lang.Object
 - 
- mondrian.olap.EnumeratedValues.BasicValue
 
 
- 
- All Implemented Interfaces:
 EnumeratedValues.Value
- Direct Known Subclasses:
 Property,RolapAggregator
- Enclosing class:
 - EnumeratedValues<V extends EnumeratedValues.Value>
 
public static class EnumeratedValues.BasicValue extends Object implements EnumeratedValues.Value
BasicValueis an obvious implementation ofEnumeratedValues.Value. 
- 
- 
Field Summary
Fields Modifier and Type Field Description StringdescriptionStringnameintordinal 
- 
Constructor Summary
Constructors Constructor Description BasicValue(String name, int ordinal, String description) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(String s)Deprecated.I bet you meant to writevalue.name_.equals(s)rather thanvalue.equals(s), didn't you?StringgetDescription()StringgetName()intgetOrdinal()StringtoString()Returns the value's name.RuntimeExceptionunexpected()Returns an error indicating that we did not expect to find this value in this context. 
 - 
 
- 
- 
Method Detail
- 
getName
public String getName()
- Specified by:
 getNamein interfaceEnumeratedValues.Value
 
- 
getOrdinal
public int getOrdinal()
- Specified by:
 getOrdinalin interfaceEnumeratedValues.Value
 
- 
getDescription
public String getDescription()
- Specified by:
 getDescriptionin interfaceEnumeratedValues.Value
 
- 
equals
public boolean equals(String s)
Deprecated.I bet you meant to writevalue.name_.equals(s)rather thanvalue.equals(s), didn't you?Returns whether this value is equal to a given string. 
- 
unexpected
public RuntimeException unexpected()
Returns an error indicating that we did not expect to find this value in this context. Typical use is in aswitchstatement:switch (fruit) { case Fruit.AppleORDINAL: return 1; case Fruir.OrangeORDINAL: return 2; default: throw fruit.unexpected(); } 
 - 
 
 -