Several convenience methods for EnumReaders are available in
Several convenience methods for EnumReaders are available in
com.paypal.cascade.common.enumeration._
. Generally, this will be implemented as a pattern match across all the case objects of an Enumeration. If a case object is missing from the pattern match, a non-exhaustive match warning will be raised at compile.
com.paypal.cascade.common.enumeration._ }}} Generally, this will be implemented as a pattern match across all the case objects of an Enumeration. If a case object is missing from the pattern match, a non-exhaustive match warning will be raised at compile.
Each Enumeration is implemented as a series of case objects extending a base abstract class, that itself extends Enumeration. Each case object must override
stringVal
, and thestringVal
for each should be unique across all cases of a given Enumeration; no two objects should have the samestringVal
value, regardless of uppercase/lowercase.