Record Class LegConvention.Period
java.lang.Object
java.lang.Record
com.quantfinlib.rates.LegConvention.Period
- Record Components:
accrualStart- adjusted accrual startaccrualEnd- adjusted accrual endpaymentDate- payment date (accrual end plus the payment lag)yearFraction- accrual year fraction under the leg day count
- Enclosing class:
LegConvention
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccrualEndrecord component.Returns the value of theaccrualStartrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepaymentDaterecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of theyearFractionrecord component.
-
Constructor Details
-
Period
public Period(LocalDate accrualStart, LocalDate accrualEnd, LocalDate paymentDate, double yearFraction) Creates an instance of aPeriodrecord class.- Parameters:
accrualStart- the value for theaccrualStartrecord componentaccrualEnd- the value for theaccrualEndrecord componentpaymentDate- the value for thepaymentDaterecord componentyearFraction- the value for theyearFractionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
accrualStart
Returns the value of theaccrualStartrecord component.- Returns:
- the value of the
accrualStartrecord component
-
accrualEnd
Returns the value of theaccrualEndrecord component.- Returns:
- the value of the
accrualEndrecord component
-
paymentDate
Returns the value of thepaymentDaterecord component.- Returns:
- the value of the
paymentDaterecord component
-
yearFraction
public double yearFraction()Returns the value of theyearFractionrecord component.- Returns:
- the value of the
yearFractionrecord component
-