Interface LEDReader.IndexedColorIterator

Enclosing interface:
LEDReader
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

A functional interface that allows for iteration over an LED buffer without manually writing an indexed for-loop.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(int index, int r, int g, int b)
    Accepts an index of an LED in the buffer and the red, green, and blue components of the currently stored color for that LED.
  • Method Details

    • accept

      void accept(int index, int r, int g, int b)
      Accepts an index of an LED in the buffer and the red, green, and blue components of the currently stored color for that LED.
      Parameters:
      index - the index of the LED in the buffer that the red, green, and blue channels corresponds to
      r - the value of the red channel of the color currently in the buffer at index i
      g - the value of the green channel of the color currently in the buffer at index i
      b - the value of the blue channel of the color currently in the buffer at index i