next method

void next()

Cycles to the next value in values.

Implementation

void next() {
  set(values[(index + 1) % values.length]);
}