public interface ConstantEnum
TokenEnum
, except that this is used for enums that must match more than one character (a constant) as
opposed to a single token.
By adding this interface to an Enum it allows a value to be easily parsed to the correct Enum member using Source#optionalFromConstantEnum(Class)
.
TokenEnum
should be preferred over this if possible as matching a single token is more performant than matching a
constant.
Modifier and Type | Method and Description |
---|---|
boolean |
caseSensitive()
Whether the constant is case-sensitive.
|
String |
constant()
Gets the constant representing the enum member.
|
String constant()
boolean caseSensitive()
Important: if returning false (not case-sensitive), the value from constant()
must be lower-cased.
Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.