@SuppressWarnings("MixedMutabilityReturnType")
    public static @NonNull List<@NonNull String> getSuggestions(
            final @NonNull Range<? extends Number> range,
            final @NonNull CommandInput input
    ) {
        final Set<Long> numbers = new TreeSet<>();
        final String token = input.peekString();

        try {
            final long inputNum = Long.parseLong(token.equals("-") ? "-0" : token.isEmpty() ? "0" : token);
            final long inputNumAbsolute = Math.abs(inputNum);

            final long min = range.min().longValue();
            final long max = range.max().longValue();

            numbers.add(inputNumAbsolute); /* It's a valid number, so we suggest it */
            for (int i = 0; i < MAX_SUGGESTIONS_INCREMENT
                    && (inputNum * NUMBER_SHIFT_MULTIPLIER) + i <= max; i++) {
                numbers.add((inputNumAbsolute * NUMBER_SHIFT_MULTIPLIER) + i);
            }

            final List<String> suggestions = new LinkedList<>();
            for (long number : numbers) {
                if (token.startsWith("-")) {
                    number = -number; /* Preserve sign */
                }
                if (number < min || number > max) {
                    continue;
                }
                suggestions.add(String.valueOf(number));
            }

            return suggestions;
        } catch (final Exception ignored) {
            return Collections.emptyList();
        }
    }
Returns integer suggestions. This supports both positive and negative numbers

@param range accepted range
@param input input
@return list of suggestions
cloud-core/src/main/java/org/incendo/cloud/parser/standard/IntegerParser.java