Class NumberParseException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ByteParser.ByteParseException, DoubleParser.DoubleParseException, FloatParser.FloatParseException, IntegerParser.IntegerParseException, LongParser.LongParseException, ShortParser.ShortParseException

@API(status=STABLE) public abstract class NumberParseException extends ParserException
See Also:
  • Constructor Details

    • NumberParseException

      protected NumberParseException(@NonNull String input, @NonNull NumberParser<?,?,?> parser, @NonNull CommandContext<?> context)
      Constructs a new number parse exception.
      Parameters:
      input - input that failed to parser
      parser - parser that failed the parsing
      context - command context
  • Method Details

    • numberType

      public abstract @NonNull String numberType()
      Returns the number type.
      Returns:
      number type
    • parser

      public final @NonNull NumberParser<?,?,?> parser()
      Returns the parser.
      Returns:
      the parser
    • hasMax

      public final boolean hasMax()
      Returns whether the parser has a maximum value.
      Returns:
      true if there was a maximum value, else false
    • hasMin

      public final boolean hasMin()
      Returns whether the parser has a minimum value.
      Returns:
      true if there was a minimum value, else false
    • input

      public @NonNull String input()
      Returns the input that failed to parse.
      Returns:
      input
    • range

      public final @NonNull Range<? extends Number> range()
      Returns the range of acceptable input.
      Returns:
      parser range
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object