public class UTXO extends Object implements Comparable<UTXO>
| Constructor and Description |
|---|
UTXO(byte[] txHash,
int index)
Creates a new UTXO corresponding to the output with index
txHash |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(UTXO utxo)
Compares this UTXO to the one specified by
utxo |
boolean |
equals(Object other)
Compares this UTXO to the one specified by
other, considering them equal if they have
txHash arrays with equal contents and equal index values |
int |
getIndex() |
byte[] |
getTxHash() |
int |
hashCode()
Simple implementation of a UTXO hashCode that respects equality of UTXOs // (i.e.
|
public UTXO(byte[] txHash,
int index)
txHashpublic byte[] getTxHash()
public int getIndex()
public boolean equals(Object other)
other, considering them equal if they have
txHash arrays with equal contents and equal index valuespublic int hashCode()
public int compareTo(UTXO utxo)
utxocompareTo in interface Comparable<UTXO>