Package trclib.archive
Enum Class TrcRGBLight.RGBColor
- All Implemented Interfaces:
Serializable
,Comparable<TrcRGBLight.RGBColor>
,Constable
- Enclosing class:
- TrcRGBLight
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
RGBColor
(int value) Constructor: Create an instance of the enum object with the given value. -
Method Summary
Modifier and TypeMethodDescriptionstatic TrcRGBLight.RGBColor
getColor
(int value) This method returns the color enum with the specified ordinal value.static TrcRGBLight.RGBColor
Returns the enum constant of this class with the specified name.static TrcRGBLight.RGBColor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RGB_INVALID
-
RGB_BLACK
-
RGB_RED
-
RGB_GREEN
-
RGB_YELLOW
-
RGB_BLUE
-
RGB_MAGENTA
-
RGB_CYAN
-
RGB_WHITE
-
-
Field Details
-
value
final int value
-
-
Constructor Details
-
RGBColor
private RGBColor(int value) Constructor: Create an instance of the enum object with the given value.- Parameters:
value
- specifies the ordinal value of the color.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getColor
This method returns the color enum with the specified ordinal value.- Parameters:
value
- specifies the ordinal value of the color.- Returns:
- color enum with the specified ordinal value.
-