Enum Class StackRGBState
- All Implemented Interfaces:
Serializable
,Comparable<StackRGBState>
,Constable
Whether a stack is RGB or RGBA or neither.
- Author:
- Owen Feehan
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNot a RGB image.RGB with a alpha channel.RGB without any alpha channel. -
Method Summary
Modifier and TypeMethodDescriptionmax
(StackRGBState other) Finds the maximum of this value and another, according to an ordering.min
(StackRGBState other) Finds the minimum of this value and another, according to an ordering.static StackRGBState
multiplex
(boolean rgb, boolean withAlpha) Returns one of the threeRGB_
states based upon two boolean flags.static StackRGBState
multiplexAlpha
(boolean withAlpha) Returns one of the twoRGB_
states based upon a boolean flag.static StackRGBState
Returns the enum constant of this class with the specified name.static StackRGBState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_RGB
Not a RGB image. -
RGB_WITHOUT_ALPHA
RGB without any alpha channel. -
RGB_WITH_ALPHA
RGB with a alpha channel.
-
-
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
-
multiplex
Returns one of the threeRGB_
states based upon two boolean flags.- Parameters:
rgb
- true if RGB or RGBA, false otherwise.withAlpha
- true if alpha is present, false if it is not. Ignored whenrgb==false
.- Returns:
RGB_WITHOUT_ALPHA
orRGB_WITH_ALPHA
as matcheswithAlpha
.
-
multiplexAlpha
Returns one of the twoRGB_
states based upon a boolean flag.- Parameters:
withAlpha
- true if alpha is present, false if it is not.- Returns:
RGB_WITHOUT_ALPHA
orRGB_WITH_ALPHA
as matcheswithAlpha
.
-
min
Finds the minimum of this value and another, according to an ordering.The ordering is increasingly:
NOT_RGB
,RGB_WITHOUT_ALPHA
,RGB_WITH_ALPHA
.- Parameters:
other
- the other.- Returns:
- the minimum state among the two, according to the ordering.
-
max
Finds the maximum of this value and another, according to an ordering.The ordering is increasingly:
NOT_RGB
,RGB_WITHOUT_ALPHA
,RGB_WITH_ALPHA
.- Parameters:
other
- the other.- Returns:
- the maximum state among the two, according to the ordering.
-