com.r3corda.contracts / InterestRateSwap / State

# State

`data class State : FixableDealState, SchedulableState`

The state class contains the 4 major data classes.

### Constructors

<init> | `State(fixedLeg: FixedLeg, floatingLeg: FloatingLeg, calculation: Calculation, common: Common, linearId: UniqueIdentifier = UniqueIdentifier(common.tradeID))` The state class contains the 4 major data classes.

### Properties

calculation | `val calculation: Calculation`
common | `val common: Common`
contract | `val contract: InterestRateSwap` An instance of the contract class that will verify this state.
fixedLeg | `val fixedLeg: FixedLeg`
floatingLeg | `val floatingLeg: FloatingLeg`
linearId | `val linearId: UniqueIdentifier` Unique id shared by all LinearState states throughout history within the wallets of all parties. Verify methods should check that one input and one output share the id in a transaction, except at issuance/termination.
participants | `val participants: List<PublicKey>` A participant is any party that is able to consume this state in a valid transaction.
parties | `val parties: List<Party>` Exposes the Parties involved in a generic way
ref | `val ref: String` Human readable well known reference (e.g. trade reference)

### Functions

evaluateCalculation | `fun evaluateCalculation(businessDate: LocalDate, expression: Expression = calculation.expression): Any` For evaluating arbitrary java on the platform.
generateAgreement | `fun generateAgreement(notary: Party): TransactionBuilder` Generate a partial transaction representing an agreement (command) to this deal, allowing a general deal/agreement protocol to generate the necessary transaction for potential implementations.
generateFix | `fun generateFix(ptx: TransactionBuilder, oldState: StateAndRef<*>, fix: Fix): Unit` Generate a fixing command for this deal and fix.
isRelevant | `fun isRelevant(ourKeys: Set<PublicKey>): Boolean` True if this should be tracked by our wallet(s).
nextFixingOf | `fun nextFixingOf(): FixOf?` When is the next fixing and what is the fixing for?
nextScheduledActivity | `fun nextScheduledActivity(thisStateRef: StateRef, protocolLogicRefFactory: ProtocolLogicRefFactory): ScheduledActivity?` Indicate whether there is some activity to be performed at some future point in time with respect to this ContractState, what that activity is and at what point in time it should be initiated. This can be used to implement deadlines for payment or processing of financial instruments according to a schedule.
prettyPrint | `fun prettyPrint(): <ERROR CLASS>` Just makes printing it out a bit better for those who dont have 80000 column wide monitors.
withPublicKey | `fun withPublicKey(before: Party, after: PublicKey): DealState`

### Extension Functions

exportIRSToCSV | `fun State.exportIRSToCSV(): String`