Record Class Instruction.Operand
java.lang.Object
java.lang.Record
org.applecommander.disassembler.api.Instruction.Operand
- Record Components:
opFmt
- Operand format string. This should be with "%s" and include any formatting. Example: Immediate addressing would be "#%s".value
- The formatted value. It will be combined with the operand format string, unless a label is requested.address
- An optional address. The disassembler uses this to identify labels.
- Enclosing class:
Instruction
public static record Instruction.Operand(String opFmt, String value, Optional<Integer> address)
extends Record
An operand represents a single operand.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()
Returns the value of theaddress
record component.final boolean
Indicates whether some other object is "equal to" this one.format()
Format the operand with the given value.Format the operand but use the given label instead of the value.final int
hashCode()
Returns a hash code value for this object.opFmt()
Returns the value of theopFmt
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Method Details
-
format
Format the operand with the given value. -
format
Format the operand but use the given label instead of the value. -
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)
. -
opFmt
Returns the value of theopFmt
record component.- Returns:
- the value of the
opFmt
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-