public class PeriodSet extends Serializer implements Validatable
Modifier and Type | Field and Description |
---|---|
boolean |
_bApplyCpnEOMAdj
Apply Coupon end-of-month adjustment
|
double |
_dblEffective
Effective Date
|
double |
_dblFinalMaturity
Final Maturity Date
|
double |
_dblMaturity
Maturity Date
|
int |
_iFreq
Coupon Frequency
|
java.lang.String |
_strAccrualDC
Accrual day count
|
java.lang.String |
_strCouponDC
Coupon day count
|
java.lang.String |
_strMaturityType
Maturity Type
|
NULL_SER_STRING, VERSION
Constructor and Description |
---|
PeriodSet(byte[] ab)
PeriodSet de-serialization from input byte array
|
PeriodSet(double dblEffective,
java.lang.String strDC,
int iFreq,
java.util.List<CashflowPeriod> lsCouponPeriod)
Construct PeriodSet from the effective date, day count, frequency, and the list of coupon periods
|
Modifier and Type | Method and Description |
---|---|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
java.lang.String |
getFieldDelimiter()
Returns the Field Delimiter String
|
CashflowPeriod |
getFirstPeriod()
Return the first Coupon period
|
CashflowPeriod |
getLastPeriod()
Returns the final Coupon period
|
java.lang.String |
getObjectTrailer()
Returns the Object Trailer String
|
CashflowPeriod |
getPeriod(int iIndex)
Retrieve the period corresponding to the given index
|
int |
getPeriodIndex(double dblDate)
Return the period index containing the specified date
|
java.util.List<CashflowPeriod> |
getPeriods()
Retrieve a list of the component's coupon periods
|
static void |
main(java.lang.String[] astrArgs) |
byte[] |
serialize()
Serialize into a byte array.
|
boolean |
validate()
Validate the current object state
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter
public int _iFreq
public boolean _bApplyCpnEOMAdj
public java.lang.String _strCouponDC
public java.lang.String _strAccrualDC
public java.lang.String _strMaturityType
public double _dblMaturity
public double _dblEffective
public double _dblFinalMaturity
public PeriodSet(double dblEffective, java.lang.String strDC, int iFreq, java.util.List<CashflowPeriod> lsCouponPeriod)
dblEffective
- Effective DatestrDC
- Day countiFreq
- FrequencylsCouponPeriod
- List of Coupon Periodpublic PeriodSet(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if PeriodSet cannot be properly de-serializedpublic boolean validate()
Validatable
validate
in interface Validatable
public java.util.List<CashflowPeriod> getPeriods()
public CashflowPeriod getFirstPeriod()
public CashflowPeriod getLastPeriod()
public int getPeriodIndex(double dblDate) throws java.lang.Exception
dblDate
- Date inputjava.lang.Exception
- Thrown if the input date not in the period set rangepublic CashflowPeriod getPeriod(int iIndex)
iIndex
- Period indexpublic 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 Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer
public static void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception