com.r3corda.contracts / InterestRateSwap / Calculation

# Calculation

`data class Calculation`

The Calculation data class is "mutable" through out the life of the swap, as in, its the only thing that contains data that will changed from state to state (Recall that the design insists that everything is immutable, so we actually copy / update for each transition).

### Constructors

<init> | `Calculation(expression: Expression, floatingLegPaymentSchedule: Map<LocalDate, FloatingRatePaymentEvent>, fixedLegPaymentSchedule: Map<LocalDate, FixedRatePaymentEvent>)` The Calculation data class is "mutable" through out the life of the swap, as in, its the only thing that contains data that will changed from state to state (Recall that the design insists that everything is immutable, so we actually copy / update for each transition).

### Properties

expression | `val expression: Expression`
fixedLegPaymentSchedule | `val fixedLegPaymentSchedule: Map<LocalDate, FixedRatePaymentEvent>`
floatingLegPaymentSchedule | `val floatingLegPaymentSchedule: Map<LocalDate, FloatingRatePaymentEvent>`

### Functions

applyFixing | `fun applyFixing(date: LocalDate, newRate: FixedRate): Calculation` Returns a copy after modifying (applying) the fixing for that date.
getFixing | `fun getFixing(date: LocalDate): FloatingRatePaymentEvent` Returns the fixing for that date.
nextFixingDate | `fun nextFixingDate(): LocalDate?` Gets the date of the next fixing.