Package edu.wpi.first.wpilibj
Interface AddressableLEDBuffer.IndexedColorIterator
- Enclosing class:
- AddressableLEDBuffer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface AddressableLEDBuffer.IndexedColorIterator
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
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 tor
- the value of the red channel of the color currently in the buffer at indexi
g
- the value of the green channel of the color currently in the buffer at indexi
b
- the value of the blue channel of the color currently in the buffer at indexi
-