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>
BasicValue
is an obvious implementation of EnumeratedValues.Value
.-
Field Details
-
name
-
ordinal
public final int ordinal -
description
-
-
Constructor Details
-
BasicValue
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceEnumeratedValues.Value
-
getOrdinal
public int getOrdinal()- Specified by:
getOrdinal
in interfaceEnumeratedValues.Value
-
getDescription
- Specified by:
getDescription
in interfaceEnumeratedValues.Value
-
toString
Returns the value's name. -
equals
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
Returns an error indicating that we did not expect to find this value in this context. Typical use is in aswitch
statement:switch (fruit) { case Fruit.AppleORDINAL: return 1; case Fruir.OrangeORDINAL: return 2; default: throw fruit.unexpected(); }
-
value.name_.equals(s)
rather thanvalue.equals(s)
, didn't you?