java.lang.Object
java.lang.Record
dev.nipafx.args.ArgsMessage.UnknownAction
- Record Components:
allowedValues- the allowed valuesactualValue- the first encountered value in the argument array
- All Implemented Interfaces:
ArgsMessage,ArgsMessage.ArgsErrorMessage
- Enclosing interface:
ArgsMessage
public static record ArgsMessage.UnknownAction(Set<String> allowedValues, String actualValue)
extends Record
implements ArgsMessage.ArgsErrorMessage
Indicates that the first argument was not a known value for the action.
-
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
ConstructorsConstructorDescriptionUnknownAction(Set<String> allowedValues, String actualValue) Creates a message indicating that the first argument was not a known value for the action. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactualValuerecord component.Returns the value of theallowedValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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.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
-
UnknownAction
Creates a message indicating that the first argument was not a known value for the action.- Parameters:
allowedValues- the allowed valuesactualValue- the first encountered value in the argument array
-
-
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). -
allowedValues
Returns the value of theallowedValuesrecord component.- Returns:
- the value of the
allowedValuesrecord component
-
actualValue
Returns the value of theactualValuerecord component.- Returns:
- the value of the
actualValuerecord component
-