1 package net.mograsim.machine.isa;
4 import java.util.Objects;
5 import java.util.stream.Collectors;
7 public final class AsmOperands
9 private final List<AsmOperand> operands;
11 public AsmOperands(List<AsmOperand> operands)
13 this.operands = List.copyOf(Objects.requireNonNull(operands));
16 public List<AsmOperand> getOperands()
24 return operands.hashCode();
28 public boolean equals(Object obj)
32 if (!(obj instanceof AsmOperands))
34 AsmOperands other = (AsmOperands) obj;
35 return operands.equals(other.operands);
39 public String toString()
41 return operands.stream().map(AsmOperand::toString).collect(Collectors.joining(", "));