Package kboyle.oktane.core.mapping
Record Class CommandMatch
java.lang.Object
java.lang.Record
kboyle.oktane.core.mapping.CommandMatch
-
Constructor Summary
ConstructorsConstructorDescriptionCommandMatch(Command command, int commandEnd, int argumentStart)
Creates an instance of aCommandMatch
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theargumentStart
record component.command()
Returns the value of thecommand
record component.int
Returns the value of thecommandEnd
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.
-
Constructor Details
-
CommandMatch
Creates an instance of aCommandMatch
record class.- Parameters:
command
- the value for thecommand
record componentcommandEnd
- the value for thecommandEnd
record componentargumentStart
- the value for theargumentStart
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
command
Returns the value of thecommand
record component.- Returns:
- the value of the
command
record component
-
commandEnd
public int commandEnd()Returns the value of thecommandEnd
record component.- Returns:
- the value of the
commandEnd
record component
-
argumentStart
public int argumentStart()Returns the value of theargumentStart
record component.- Returns:
- the value of the
argumentStart
record component
-