From db0bfd48dc21509c14cd957c288056e1bfe27809 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Fri, 21 Mar 2025 00:06:44 +0200 Subject: [PATCH] Make helper methods static --- .../java/eu/svjatoslav/commons/cli_helper/CLIHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/svjatoslav/commons/cli_helper/CLIHelper.java b/src/main/java/eu/svjatoslav/commons/cli_helper/CLIHelper.java index e86c58b..4804e6f 100755 --- a/src/main/java/eu/svjatoslav/commons/cli_helper/CLIHelper.java +++ b/src/main/java/eu/svjatoslav/commons/cli_helper/CLIHelper.java @@ -72,7 +72,7 @@ public class CLIHelper { * @param max The maximum acceptable value (inclusive), or null if no upper bound * @return A Float value that the user entered, or the defaultValue, or null if no defaultValue was given */ - public Float askFloat(String prompt, Float defaultValue, Float min, Float max) { + public static Float askFloat(String prompt, Float defaultValue, Float min, Float max) { while (true) { // If we have a defaultValue, display it in brackets; otherwise display no default String displayPrompt = prompt @@ -130,7 +130,7 @@ public class CLIHelper { * @param max The maximum acceptable value (inclusive), or null if no upper bound * @return A Long value that the user entered, or the defaultValue, or null if no defaultValue was given */ - public Long askLong(String prompt, Long defaultValue, Long min, Long max) { + public static Long askLong(String prompt, Long defaultValue, Long min, Long max) { while (true) { // If we have a defaultValue, display it in brackets; otherwise display no default String displayPrompt = prompt @@ -188,7 +188,7 @@ public class CLIHelper { * @param max The maximum acceptable value (inclusive), or null if no upper bound * @return An integer value that the user entered, or the defaultValue, or null if no defaultValue was given */ - public Integer askInteger(String prompt, Integer defaultValue, Integer min, Integer max) { + public static Integer askInteger(String prompt, Integer defaultValue, Integer min, Integer max) { while (true) { // If we have a defaultValue, display it in brackets; otherwise display no default String displayPrompt = prompt -- 2.20.1