Package net.corda.v5.ledger.utxo
Class StateRef
-
- All Implemented Interfaces:
public final class StateRef
Defines a reference to a ContractState.
-
-
Field Summary
Fields Modifier and Type Field Description public final SecureHash
transactionId
public final int
index
-
Constructor Summary
Constructors Constructor Description StateRef(SecureHash transactionId, int index)
Creates a new instance of the StateRef class.
-
Method Summary
Modifier and Type Method Description SecureHash
getTransactionId()
Gets the ID of the transaction in which the referenced state was created. int
getIndex()
Gets the index of the state in the transaction's outputs in which the referenced state was created. static StateRef
parse(@NotNull() String value, DigestService digestService)
Parses the specified String value into a StateRef. boolean
equals(@Nullable() Object o)
Determines whether the specified object is equal to the current object. int
hashCode()
Serves as the default hash function. String
toString()
Returns a string that represents the current object. -
-
Constructor Detail
-
StateRef
StateRef(SecureHash transactionId, int index)
Creates a new instance of the StateRef class.- Parameters:
transactionId
- The ID of the transaction in which the referenced state was created.index
- The index of the state in the transaction's outputs in which the referenced state was created.
-
-
Method Detail
-
getTransactionId
@NotNull() SecureHash getTransactionId()
Gets the ID of the transaction in which the referenced state was created.
-
getIndex
int getIndex()
Gets the index of the state in the transaction's outputs in which the referenced state was created.
-
parse
static StateRef parse(@NotNull() String value, DigestService digestService)
- Parameters:
value
- The value to parse into a StateRef.
-
equals
boolean equals(@Nullable() Object o)
Determines whether the specified object is equal to the current object.
- Parameters:
o
- The object to compare with the current object.
-
hashCode
int hashCode()
Serves as the default hash function.
-
-
-
-