All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.legrange.console.Spinner Maven / Gradle / Ivy

The newest version!
package me.legrange.console;

final class Spinner extends Animator  {

    private final SpinnerStyle style;
    private int pos;

    Spinner( SpinnerStyle style) {
        this.style = style;
    }

    @Override
    String draw(N min, N max, N value) {
        if (pos >= style.chars().length) {
            pos = 0;
        }
        var res =style.chars()[pos];
        pos ++;
        return res;    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy