Package net.paulhertz.pixelaudio

# Enum Class PixelAudioMapper.ChannelNames

java.lang.Object
java.lang.Enum<PixelAudioMapper.ChannelNames>
net.paulhertz.pixelaudio.PixelAudioMapper.ChannelNames

All Implemented Interfaces:
  `Serializable`, `Comparable<PixelAudioMapper.ChannelNames>`, `Constable`

Enclosing class:
  PixelAudioMapper

public static enum PixelAudioMapper.ChannelNames extends Enum<PixelAudioMapper.ChannelNames>
List of available color channels, "L" for lightness, since "B" for brightness is taken. The expanded enum type allows me to provide some additional information, including extraction methods for each channel. These all require a float[3] hsbPixel argument. Because of the overhead involved in allocation of the hsbPixel array, callers are advised to make it reusable for tight loops or to use the other extraction methods in the PixelAudioMapper class. At the moment, I regard the extraction methods as experimental, but they may be worth extending in the future, to have a single entry point for all color channel operations.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `PixelAudioMapper.ChannelNames.ChannelExtractor`

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `A`
  `ALL`
  `B`
  `G`
  `H`
  `L`
  `R`
  `S`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private final String`
  `displayName`
  `private final PixelAudioMapper.ChannelNames.ChannelExtractor`
  `extractor`
  `private final int`
  `index`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `private`
  `ChannelNames(String displayName, int index, PixelAudioMapper.ChannelNames.ChannelExtractor extractor)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `extract(int rgb, float[] hsbPixel)`
  `String`
  `getDisplayName()`
  `int`
  `getIndex()`
  `static PixelAudioMapper.ChannelNames`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static PixelAudioMapper.ChannelNames[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### R

    public static final PixelAudioMapper.ChannelNames R

  - ### G

    public static final PixelAudioMapper.ChannelNames G

  - ### B

    public static final PixelAudioMapper.ChannelNames B

  - ### H

    public static final PixelAudioMapper.ChannelNames H

  - ### S

    public static final PixelAudioMapper.ChannelNames S

  - ### L

    public static final PixelAudioMapper.ChannelNames L

  - ### A

    public static final PixelAudioMapper.ChannelNames A

  - ### ALL

    public static final PixelAudioMapper.ChannelNames ALL

- ## Field Details

  - ### displayName

    private final String displayName

  - ### index

    private final int index

  - ### extractor

    private final PixelAudioMapper.ChannelNames.ChannelExtractor extractor

- ## Constructor Details

  - ### ChannelNames

    private ChannelNames(String displayName, int index, PixelAudioMapper.ChannelNames.ChannelExtractor extractor)

- ## Method Details

  - ### values

    public static PixelAudioMapper.ChannelNames[] 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

    public static PixelAudioMapper.ChannelNames valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null

  - ### getDisplayName

    public String getDisplayName()

  - ### getIndex

    public int getIndex()

  - ### extract

    public float extract(int rgb, float[] hsbPixel)