public class Period extends Serializer implements java.lang.Comparable<Period>
NULL_SER_STRING, VERSION
Constructor and Description |
---|
Period(byte[] ab)
De-serialization of Period from byte stream
|
Period(double dblStart,
double dblEnd,
double dblAccrualStart,
double dblAccrualEnd,
double dblPay,
double dblDCF)
Constructs a period object instance from the corresponding date parameters
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Period periodOther) |
boolean |
contains(double dblDate)
Checks whether the supplied date is inside the period specified
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
double |
getAccrualDCF(double dblAccrualEnd)
Get the period Accrual Day Count Fraction to an accrual end date
|
double |
getAccrualEndDate()
Returns the period Accrual End Date
|
double |
getAccrualStartDate()
Returns the period Accrual Start Date
|
double |
getCouponDCF()
Gets the coupon DCF
|
double |
getEndDate()
Returns the period End Date
|
java.lang.String |
getFieldDelimiter()
Returns the Field Delimiter String
|
java.lang.String |
getObjectTrailer()
Returns the Object Trailer String
|
double |
getPayDate()
Returns the period Pay Date
|
double |
getResetDate()
Returns the period Reset Date
|
double |
getStartDate()
Returns the period Start Date
|
int |
hashCode() |
byte[] |
serialize()
Serialize into a byte array.
|
boolean |
setAccrualStartDate(double dblAccrualStart)
Set the period Accrual Start Date
|
boolean |
setPayDate(double dblPay)
Set the period Pay Date
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter
public Period(double dblStart, double dblEnd, double dblAccrualStart, double dblAccrualEnd, double dblPay, double dblDCF) throws java.lang.Exception
dblStart
- Period Start DatedblEnd
- Period End DatedblAccrualStart
- Period Accrual Start DatedblAccrualEnd
- Period Accrual End DatedblPay
- Period Pay DatedblDCF
- Period Day count fractionjava.lang.Exception
- Thrown if the inputs are invalidpublic Period(byte[] ab) throws java.lang.Exception
ab
- Byte streamjava.lang.Exception
- Thrown if cannot properly de-serializepublic double getStartDate()
public double getEndDate()
public double getAccrualStartDate()
public boolean setAccrualStartDate(double dblAccrualStart)
dblAccrualStart
- Period Accrual Start Datepublic double getAccrualEndDate()
public double getResetDate()
public double getPayDate()
public boolean setPayDate(double dblPay)
dblPay
- Period Pay Datepublic double getAccrualDCF(double dblAccrualEnd) throws java.lang.Exception
dblAccrualEnd
- Accrual End DateThrows
- if inputs are invalid, or if the date does not lie within the periodjava.lang.Exception
public double getCouponDCF()
public boolean contains(double dblDate) throws java.lang.Exception
dblDate
- Date inputjava.lang.Exception
- Thrown if input is invalidpublic java.lang.String getFieldDelimiter()
Serializer
getFieldDelimiter
in class Serializer
public java.lang.String getObjectTrailer()
Serializer
getObjectTrailer
in class Serializer
public byte[] serialize()
Serializer
serialize
in class Serializer
public int hashCode()
hashCode
in class java.lang.Object
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer