ReferencedStateAndRef
Keywords: net.corda.core.contracts.ReferencedStateAndRef class
Date: 2023-09-18

net.corda.core.contracts

## Class ReferencedStateAndRef<T extends ContractState>

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

-     public class ReferencedStateAndRef<T extends ContractState>

  A wrapper for a `class StateAndRef` indicating that it should be added to a transaction as a reference input state.

  See Also:
    `class StateAndRef`

- - ### Constructor Detail

    - #### ReferencedStateAndRef

          public ReferencedStateAndRef(@NotNull
                                       StateAndRef<? extends T> stateAndRef)

      A wrapper for a `class StateAndRef` indicating that it should be added to a transaction as a reference input state.

      See Also:
        `class StateAndRef`

  - ### Method Detail

    - #### getStateAndRef

          @NotNull
          public StateAndRef<T> getStateAndRef()

    - #### component1

          @NotNull
          public StateAndRef<T> component1()

    - #### copy

          @NotNull
          public ReferencedStateAndRef<T> copy(@NotNull
                                                        StateAndRef<? extends T> stateAndRef)

      A wrapper for a `class StateAndRef` indicating that it should be added to a transaction as a reference input state.

      See Also:
        `class StateAndRef`

    - #### toString

          @NotNull
          public java.lang.String toString()

      A wrapper for a `class StateAndRef` indicating that it should be added to a transaction as a reference input state.

      See Also:
        `class StateAndRef`

    - #### hashCode

          public int hashCode()

      A wrapper for a `class StateAndRef` indicating that it should be added to a transaction as a reference input state.

      See Also:
        `class StateAndRef`

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      A wrapper for a `class StateAndRef` indicating that it should be added to a transaction as a reference input state.

      See Also:
        `class StateAndRef`