ScriptHash extends NeoSerializable implements Comparable<ScriptHash> { @Override public int compareTo(ScriptHash o) { return new BigInteger(1, ArrayUtils.reverseArray(scriptHash)) .compareTo(new BigInteger(1, ArrayUtils.reverseArray(o.toArray()))); } ScriptHash();  ScriptHash(byte[] scriptHash);  ScriptHash(String scriptHash); @Override void deserialize(BinaryReader reader); @Override void serialize(BinaryWriter writer); @Override int getSize(); @Override byte[] toArray(); String toString(); String toAddress(); static ScriptHash fromAddress(String address); static ScriptHash fromScript(byte[] script); static ScriptHash fromPublicKey(byte[] encodedPublicKey); static ScriptHash fromPublicKeys(List<byte[]> encodedPublicKeys, int signingThreshold); static ScriptHash fromScript(String script); @Override int compareTo(ScriptHash o); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void compareTo() { byte[] m1 = Numeric.hexStringToByteArray("01a402d8"); byte[] m2 = Numeric.hexStringToByteArray("d802a401"); byte[] m3 = Numeric.hexStringToByteArray("a7b3a191"); ScriptHash sh1 = ScriptHash.fromScript(m1); ScriptHash sh2 = ScriptHash.fromScript(m2); ScriptHash sh3 = ScriptHash.fromScript(m3); assertThat(sh1.compareTo(sh1), is(0)); assertThat(sh1.compareTo(sh2), is(-1)); assertThat(sh1.compareTo(sh3), is(-1)); assertThat(sh2.compareTo(sh1), is(1)); assertThat(sh2.compareTo(sh3), is(1)); assertThat(sh3.compareTo(sh1), is(1)); assertThat(sh3.compareTo(sh2), is(-1)); }