PressedValue<int> class
State enum for 'aria-pressed' values.
class PressedValue<int> extends Enum<int> implements AriaAttributeType { //, FALSE, MIXED, UNDEFINED; static const PressedValue TRUE = const PressedValue(0); static const PressedValue FALSE = const PressedValue(1); static const PressedValue MIXED = const PressedValue(2); static const PressedValue UNDEFINED = const PressedValue(3); const PressedValue(int type) : super (type); /** * Gets the enum constant corresponding to {@code value} for the token type * PressedValue. * * @param value Boolean value for which we want to get the corresponding enum constant. */ static PressedValue of(bool value) { return value ? TRUE : FALSE; } String getAriaValue() { switch (this) { case TRUE: return "true"; case FALSE: return "false"; case MIXED: return "mixed"; case UNDEFINED: return "undefined"; } return null; // not reachable } }
Extends
Enum<int> > PressedValue<int>
Implements
Static Properties
const PressedValue FALSE #
static const PressedValue FALSE = const PressedValue(1)
const PressedValue MIXED #
static const PressedValue MIXED = const PressedValue(2)
const PressedValue TRUE #
static const PressedValue TRUE = const PressedValue(0)
const PressedValue UNDEFINED #
static const PressedValue UNDEFINED = const PressedValue(3)
Static Methods
PressedValue of(bool value) #
Gets the enum constant corresponding to {@code value} for the token type PressedValue.
@param value Boolean value for which we want to get the corresponding enum constant.
static PressedValue of(bool value) { return value ? TRUE : FALSE; }
Constructors
Methods
String getAriaValue() #
String getAriaValue() { switch (this) { case TRUE: return "true"; case FALSE: return "false"; case MIXED: return "mixed"; case UNDEFINED: return "undefined"; } return null; // not reachable }