@Test public void testEquals() { assertThat(contractParameter.equals("o"), is(false)); assertThat(contractParameter.equals(this.contractParameter), is(true)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ContractParameter)) { return false; } ContractParameter that = (ContractParameter) o; if (paramType == that.paramType && Objects.equals(paramName, that.paramName)) { if (paramType.equals(ContractParameterType.BYTE_ARRAY) || paramType.equals(ContractParameterType.SIGNATURE) || paramType.equals(ContractParameterType.PUBLIC_KEY) || paramType.equals(ContractParameterType.HASH160) || paramType.equals(ContractParameterType.HASH256)) { return Arrays.equals((byte[]) value, (byte[]) that.value); } else { return Objects.equals(value, that.value); } } else { return false; } }
ContractParameter { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ContractParameter)) { return false; } ContractParameter that = (ContractParameter) o; if (paramType == that.paramType && Objects.equals(paramName, that.paramName)) { if (paramType.equals(ContractParameterType.BYTE_ARRAY) || paramType.equals(ContractParameterType.SIGNATURE) || paramType.equals(ContractParameterType.PUBLIC_KEY) || paramType.equals(ContractParameterType.HASH160) || paramType.equals(ContractParameterType.HASH256)) { return Arrays.equals((byte[]) value, (byte[]) that.value); } else { return Objects.equals(value, that.value); } } else { return false; } } }
ContractParameter { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ContractParameter)) { return false; } ContractParameter that = (ContractParameter) o; if (paramType == that.paramType && Objects.equals(paramName, that.paramName)) { if (paramType.equals(ContractParameterType.BYTE_ARRAY) || paramType.equals(ContractParameterType.SIGNATURE) || paramType.equals(ContractParameterType.PUBLIC_KEY) || paramType.equals(ContractParameterType.HASH160) || paramType.equals(ContractParameterType.HASH256)) { return Arrays.equals((byte[]) value, (byte[]) that.value); } else { return Objects.equals(value, that.value); } } else { return false; } } protected  ContractParameter();  ContractParameter(String name, ContractParameterType paramType, Object value); protected  ContractParameter(String name, ContractParameterType paramType); private  ContractParameter(ContractParameterType paramType, Object value); }
ContractParameter { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ContractParameter)) { return false; } ContractParameter that = (ContractParameter) o; if (paramType == that.paramType && Objects.equals(paramName, that.paramName)) { if (paramType.equals(ContractParameterType.BYTE_ARRAY) || paramType.equals(ContractParameterType.SIGNATURE) || paramType.equals(ContractParameterType.PUBLIC_KEY) || paramType.equals(ContractParameterType.HASH160) || paramType.equals(ContractParameterType.HASH256)) { return Arrays.equals((byte[]) value, (byte[]) that.value); } else { return Objects.equals(value, that.value); } } else { return false; } } protected  ContractParameter();  ContractParameter(String name, ContractParameterType paramType, Object value); protected  ContractParameter(String name, ContractParameterType paramType); private  ContractParameter(ContractParameterType paramType, Object value); static ContractParameter string(String value); static ContractParameter array(List<ContractParameter> params); static ContractParameter array(ContractParameter... params); static ContractParameter byteArray(byte[] byteArray); static ContractParameter byteArray(String hexString); static ContractParameter byteArrayFromString(String value); static ContractParameter signature(String signatureHexString); static ContractParameter signature(byte[] signature); static ContractParameter bool(boolean bool); static ContractParameter integer(int integer); static ContractParameter integer(BigInteger integer); static ContractParameter hash160(ScriptHash hash); static ContractParameter hash256(String hashHexString); static ContractParameter hash256(byte[] hash); static ContractParameter publicKey(byte[] publicKey); String getParamName(); ContractParameterType getParamType(); Object getValue(); @Override boolean equals(Object o); @Override int hashCode(); }
ContractParameter { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ContractParameter)) { return false; } ContractParameter that = (ContractParameter) o; if (paramType == that.paramType && Objects.equals(paramName, that.paramName)) { if (paramType.equals(ContractParameterType.BYTE_ARRAY) || paramType.equals(ContractParameterType.SIGNATURE) || paramType.equals(ContractParameterType.PUBLIC_KEY) || paramType.equals(ContractParameterType.HASH160) || paramType.equals(ContractParameterType.HASH256)) { return Arrays.equals((byte[]) value, (byte[]) that.value); } else { return Objects.equals(value, that.value); } } else { return false; } } protected  ContractParameter();  ContractParameter(String name, ContractParameterType paramType, Object value); protected  ContractParameter(String name, ContractParameterType paramType); private  ContractParameter(ContractParameterType paramType, Object value); static ContractParameter string(String value); static ContractParameter array(List<ContractParameter> params); static ContractParameter array(ContractParameter... params); static ContractParameter byteArray(byte[] byteArray); static ContractParameter byteArray(String hexString); static ContractParameter byteArrayFromString(String value); static ContractParameter signature(String signatureHexString); static ContractParameter signature(byte[] signature); static ContractParameter bool(boolean bool); static ContractParameter integer(int integer); static ContractParameter integer(BigInteger integer); static ContractParameter hash160(ScriptHash hash); static ContractParameter hash256(String hashHexString); static ContractParameter hash256(byte[] hash); static ContractParameter publicKey(byte[] publicKey); String getParamName(); ContractParameterType getParamType(); Object getValue(); @Override boolean equals(Object o); @Override int hashCode();  }