java.lang.Object
java.lang.Record
dev.nipafx.args.ArgsMessage.IllegalValue
- Record Components:
argumentName- the argument for which the error occurred (which doesn't include "--")argumentType- the type of the argumentvalue- the value provided for the argumentparseError- the exception indicates the parse error
- All Implemented Interfaces:
ArgsMessage,ArgsMessage.ArgsErrorMessage
- Enclosing interface:
ArgsMessage
public static record ArgsMessage.IllegalValue(String argumentName, Class<?> argumentType, String value, Throwable parseError)
extends Record
implements ArgsMessage.ArgsErrorMessage
Indicates that the value provided for the argument could not be parsed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.nipafx.args.ArgsMessage
ArgsMessage.ArgsErrorMessage, ArgsMessage.ArgsWarningMessage, ArgsMessage.FailedConstruction, ArgsMessage.IllegalModeValue, ArgsMessage.IllegalValue, ArgsMessage.MissingAction, ArgsMessage.MissingArgument, ArgsMessage.MissingValue, ArgsMessage.UnexpectedValue, ArgsMessage.UnknownAction, ArgsMessage.UnknownArgument -
Constructor Summary
ConstructorsConstructorDescriptionIllegalValue(String argumentName, Class<?> argumentType, String value, Throwable parseError) Creates a message indicating that the value provided for the argument could not be parsed. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentNamerecord component.Class<?> Returns the value of theargumentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theparseErrorrecord component.Returns a textual description of the warning/error that can be shown to the user.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.nipafx.args.ArgsMessage
cause
-
Constructor Details
-
IllegalValue
Creates a message indicating that the value provided for the argument could not be parsed.- Parameters:
argumentName- the argument for which the error occurred (which doesn't include "--")argumentType- the type of the argumentvalue- the value provided for the argumentparseError- the exception indicates the parse error
-
-
Method Details
-
toMessage
Description copied from interface:ArgsMessageReturns a textual description of the warning/error that can be shown to the user.- Specified by:
toMessagein interfaceArgsMessage- Returns:
- a textual description of the warning/error
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
argumentName
Returns the value of theargumentNamerecord component.- Returns:
- the value of the
argumentNamerecord component
-
argumentType
Returns the value of theargumentTyperecord component.- Returns:
- the value of the
argumentTyperecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
parseError
Returns the value of theparseErrorrecord component.- Returns:
- the value of the
parseErrorrecord component
-