1 package net.mograsim.plugin.asm.model;
\r
3 import java.util.Objects;
\r
5 public final class AsmInstruction implements AsmElement
\r
7 private final AsmOperation operation;
\r
8 private final AsmOperands operands;
\r
10 public AsmInstruction(AsmOperation operation, AsmOperands operands)
\r
12 this.operation = Objects.requireNonNull(operation);
\r
13 this.operands = Objects.requireNonNull(operands);
\r
17 public int hashCode()
\r
19 return Objects.hash(operands, operation);
\r
23 public boolean equals(Object obj)
\r
27 if (!(obj instanceof AsmInstruction))
\r
29 AsmInstruction other = (AsmInstruction) obj;
\r
30 return Objects.equals(operands, other.operands) && Objects.equals(operation, other.operation);
\r
34 public String toString()
\r
36 return String.format("%s %s", operation, operands).trim();
\r