Class NumberParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.incendo.cloud.exception.parsing.ParserException
org.incendo.cloud.exception.parsing.NumberParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ByteParser.ByteParseException,DoubleParser.DoubleParseException,FloatParser.FloatParseException,IntegerParser.IntegerParseException,LongParser.LongParseException,ShortParser.ShortParseException
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNumberParseException(@NonNull String input, @NonNull NumberParser<?, ?, ?> parser, @NonNull CommandContext<?> context) Constructs a new number parse exception. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal inthashCode()final booleanhasMax()Returns whether the parser has a maximum value.final booleanhasMin()Returns whether the parser has a minimum value.input()Returns the input that failed to parse.Returns the number type.final @NonNull NumberParser<?, ?, ?> parser()Returns the parser.range()Returns the range of acceptable input.Methods inherited from class org.incendo.cloud.exception.parsing.ParserException
argumentParserClass, captionVariables, context, errorCaption, formatCaption, getMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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 parserparser- parser that failed the parsingcontext- command context
-
-
Method Details
-
numberType
Returns the number type.- Returns:
- number type
-
parser
Returns the parser.- Returns:
- the parser
-
hasMax
public final boolean hasMax()Returns whether the parser has a maximum value.- Returns:
trueif there was a maximum value, elsefalse
-
hasMin
public final boolean hasMin()Returns whether the parser has a minimum value.- Returns:
trueif there was a minimum value, elsefalse
-
input
Returns the input that failed to parse.- Returns:
- input
-
range
Returns the range of acceptable input.- Returns:
- parser range
-
equals
-
hashCode
public final int hashCode()
-