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

io.bretty.console.view.IndexNumberFormatter Maven / Gradle / Ivy

Go to download

A Java framework to instantly build the View layer of your command line app. No more worries about anything like printing menus or validating user inputs. Just focus on your app logic.

There is a newer version: 3.4
Show newest version
package io.bretty.console.view;

/**
 * The interface that format a given index to a string. (e.g. index 0 to {@code "1) "}
 */

public interface IndexNumberFormatter {

    /**
     * Given an index number of menu items in a menu (starting from 0), format it to a string.
     * See {@link io.bretty.console.view.DefaultIndexNumberFormatter} for example
     *
     * @param index the index number of a menu item in a menu (starting from 0)
     * @return a string that is to be printed in the same line as, and in front of the menu time description
     */
    String format(int index);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy