Record Class ArgumentParser.Argument
java.lang.Object
java.lang.Record
opennlp.tools.cmdline.ArgumentParser.Argument
- Enclosing class:
ArgumentParser
static record ArgumentParser.Argument(String argument, String value, String description, boolean optional)
extends Record
Auxiliary record that holds information about an argument. This is used by the
GenerateManualTool, which creates a Docbook for the CLI automatically.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theargumentrecord component.private final StringThe field for thedescriptionrecord component.private final booleanThe field for theoptionalrecord component.private final StringThe field for thevaluerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionargument()Returns the value of theargumentrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanoptional()Returns the value of theoptionalrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
argument
The field for theargumentrecord component. -
value
The field for thevaluerecord component. -
description
The field for thedescriptionrecord component. -
optional
private final boolean optionalThe field for theoptionalrecord component.
-
-
Constructor Details
-
Argument
Creates an instance of aArgumentrecord class.- Parameters:
argument- the value for theargumentrecord componentvalue- the value for thevaluerecord componentdescription- the value for thedescriptionrecord componentoptional- the value for theoptionalrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
argument
Returns the value of theargumentrecord component.- Returns:
- the value of the
argumentrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
optional
public boolean optional()Returns the value of theoptionalrecord component.- Returns:
- the value of the
optionalrecord component
-