Class NumberParser<C,N extends Number,R extends Range<N>>

java.lang.Object
org.incendo.cloud.parser.standard.NumberParser<C,N,R>
All Implemented Interfaces:
ArgumentParser<C,N>, SuggestionProviderHolder<C>
Direct Known Subclasses:
ByteParser, DoubleParser, FloatParser, IntegerParser, LongParser, ShortParser

@API(status=STABLE) public abstract class NumberParser<C,N extends Number,R extends Range<N>> extends Object implements ArgumentParser<C,N>
  • Constructor Details

    • NumberParser

      protected NumberParser(@NonNull R range)
  • Method Details

    • range

      public final @NonNull R range()
      Returns the range of acceptable values.
      Returns:
      acceptable value range
    • hasMax

      public abstract boolean hasMax()
      Returns whether this parser has a maximum value set.

      In other words, whether the maximum of it's range() is different than the default maximum value.

      Returns:
      whether the parser has a maximum set
    • hasMin

      public abstract boolean hasMin()
      Returns whether this parser has a minimum value set.

      In other words, whether the minimum of it's range() is different than the default minimum value.

      Returns:
      whether the parser has a minimum set