@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof VMOperation)) { return false; } VMOperation that = (VMOperation) o; if (getSub() != null ? !getSub().equals(that.getSub()) : that.getSub() != null) { return false; } if (getCost() != null ? !getCost().equals(that.getCost()) : that.getCost() != null) { return false; } if (getEx() != null ? !getEx().equals(that.getEx()) : that.getEx() != null) { return false; } return getPc() != null ? getPc().equals(that.getPc()) : that.getPc() == null; }
BigInteger.valueOf(79)); VMTrace.VMOperation subOperation = new VMTrace.VMOperation( null, BigInteger.valueOf(3), BigInteger.ZERO); VMTrace.VMOperation operation2 = new VMTrace.VMOperation( new VMTrace( "0x606060405236156100b75763ffffffff",
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof VMOperation)) { return false; } VMOperation that = (VMOperation) o; if (getSub() != null ? !getSub().equals(that.getSub()) : that.getSub() != null) { return false; } if (getCost() != null ? !getCost().equals(that.getCost()) : that.getCost() != null) { return false; } if (getEx() != null ? !getEx().equals(that.getEx()) : that.getEx() != null) { return false; } return getPc() != null ? getPc().equals(that.getPc()) : that.getPc() == null; }
@Override public int hashCode() { int result = getSub() != null ? getSub().hashCode() : 0; result = 31 * result + (getCost() != null ? getCost().hashCode() : 0); result = 31 * result + (getEx() != null ? getEx().hashCode() : 0); result = 31 * result + (getPc() != null ? getPc().hashCode() : 0); return result; }
@Override public int hashCode() { int result = getSub() != null ? getSub().hashCode() : 0; result = 31 * result + (getCost() != null ? getCost().hashCode() : 0); result = 31 * result + (getEx() != null ? getEx().hashCode() : 0); result = 31 * result + (getPc() != null ? getPc().hashCode() : 0); return result; }
@Test public void testVMTrace() { VMTrace.VMOperation op1 = new VMTrace.VMOperation( null, BigInteger.ZERO, null, null); VMTrace.VMOperation op2 = new VMTrace.VMOperation( null, BigInteger.ONE, null, null); EqualsVerifier.forClass(VMTrace.class) .withPrefabValues(VMTrace.VMOperation.class, op1, op2) .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.STRICT_INHERITANCE) .verify(); }