Enum StackRGBState
- All Implemented Interfaces:
Serializable,Comparable<StackRGBState>,java.lang.constant.Constable
public enum StackRGBState extends Enum<StackRGBState>
Whether a stack is RGB or RGBA or neither.
- Author:
- Owen Feehan
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description NOT_RGBNot a RGB image.RGB_WITH_ALPHARGB with a alpha channel.RGB_WITHOUT_ALPHARGB without any alpha channel. -
Method Summary
Modifier and Type Method Description StackRGBStatemax(StackRGBState other)Finds the maximum of this value and another, according to an ordering.StackRGBStatemin(StackRGBState other)Finds the minimum of this value and another, according to an ordering.static StackRGBStatemultiplex(boolean rgb, boolean withAlpha)Returns one of the threeRGB_states based upon two boolean flags.static StackRGBStatemultiplexAlpha(boolean withAlpha)Returns one of the twoRGB_states based upon a boolean flag.static StackRGBStatevalueOf(String name)Returns the enum constant of this type with the specified name.static StackRGBState[]values()Returns an array containing the constants of this enum type, 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 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
-
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_ALPHAorRGB_WITH_ALPHAas 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_ALPHAorRGB_WITH_ALPHAas 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.
-