Enum Toggle
- All Implemented Interfaces:
Comparable<Toggle>
A build hint the build server reads as true or false, plus the state of not having said either.
Not boolean, which cannot express the third state. boolean x() default false is read by anyone looking at it -- and by IDE completion -- as "off
unless you turn it on", which for many hints is simply untrue. It was
harmless on the wire, because an attribute nobody writes is not written into
the request either way, but it stated something about the build server that
the client does not get to decide and cannot keep true.
So the third state is named instead of guessed. DEFAULT sends nothing and
lets the server decide; ON and OFF are the developer overriding it.
-
Enum Constant Summary
Enum Constants -
Method Summary
Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
DEFAULT
Say nothing, and let the build server apply its own default. -
ON
Turn the hint on, whatever the server would otherwise have done. -
OFF
Turn the hint off, whatever the server would otherwise have done.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-