net.corda.core.contracts

## Class StateRef

- net.corda.core.contracts.StateRef

-     public class StateRef

  A stateref is a pointer (reference) to a state, this is an equivalent of an "outpoint" in Bitcoin. It records which transaction defined the state and where in that transaction it was.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateRef(SecureHash txhash, int index)` A stateref is a pointer (reference) to a state, this is an equivalent of an "outpoint" in Bitcoin. It records which transaction defined the state and where in that transaction it was.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SecureHash` | `component1()`
    `int` | `component2()`
    `StateRef` | `copy(SecureHash txhash, int index)` A stateref is a pointer (reference) to a state, this is an equivalent of an "outpoint" in Bitcoin. It records which transaction defined the state and where in that transaction it was.
    `boolean` | `equals(java.lang.Object p)`
    `int` | `getIndex()`
    `SecureHash` | `getTxhash()`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

- - ### Constructor Detail

    - #### StateRef

          public StateRef(SecureHash txhash,
                          int index)

      A stateref is a pointer (reference) to a state, this is an equivalent of an "outpoint" in Bitcoin. It records which transaction defined the state and where in that transaction it was.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

    - #### getTxhash

          public SecureHash getTxhash()

    - #### getIndex

          public int getIndex()

    - #### component1

          public SecureHash component1()

    - #### component2

          public int component2()

    - #### copy

          public StateRef copy(SecureHash txhash,
                               int index)

      A stateref is a pointer (reference) to a state, this is an equivalent of an "outpoint" in Bitcoin. It records which transaction defined the state and where in that transaction it was.

    - #### hashCode

          public int hashCode()

    - #### equals

          public boolean equals(java.lang.Object p)