net.corda.core.contracts

## Class StateAndRef<T extends ContractState>

- net.corda.core.contracts.StateAndRef<T>

-     public class StateAndRef<T extends ContractState>

  A StateAndRef is simply a (state, ref) pair. For instance, a vault (which holds available assets) contains these.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateAndRef(TransactionState<? extends T> state, StateRef ref)` A StateAndRef is simply a (state, ref) pair. For instance, a vault (which holds available assets) contains these.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TransactionState<T>` | `component1()`
    `StateRef` | `component2()`
    `StateAndRef<T>` | `copy(TransactionState<? extends T> state, StateRef ref)` A StateAndRef is simply a (state, ref) pair. For instance, a vault (which holds available assets) contains these.
    `boolean` | `equals(java.lang.Object p)`
    `StateRef` | `getRef()`
    `TransactionState<T>` | `getState()`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

- - ### Constructor Detail

    - #### StateAndRef

          public StateAndRef(TransactionState<? extends T> state,
                             StateRef ref)

      A StateAndRef is simply a (state, ref) pair. For instance, a vault (which holds available assets) contains these.

  - ### Method Detail

    - #### getState

          public TransactionState<T> getState()

    - #### getRef

          public StateRef getRef()

    - #### component1

          public TransactionState<T> component1()

    - #### component2

          public StateRef component2()

    - #### copy

          public StateAndRef<T> copy(TransactionState<? extends T> state,
                                     StateRef ref)

      A StateAndRef is simply a (state, ref) pair. For instance, a vault (which holds available assets) contains these.

    - #### toString

          public java.lang.String toString()

    - #### hashCode

          public int hashCode()

    - #### equals

          public boolean equals(java.lang.Object p)