public class CouponSetting extends Serializer implements Validatable
Modifier and Type | Field and Description |
---|---|
double |
_dblCoupon
Coupon Amount
|
double |
_dblCouponCeiling
Coupon Ceiling
|
double |
_dblCouponFloor
Coupon Floor
|
FactorSchedule |
_fsCoupon
Coupon schedule
|
java.lang.String |
_strCouponType
Coupon Type
|
NULL_SER_STRING, VERSION
Constructor and Description |
---|
CouponSetting(byte[] ab)
CouponSetting de-serialization from input byte array
|
CouponSetting(FactorSchedule fsCoupon,
java.lang.String strCouponType,
double dblCoupon,
double dblCouponCeiling,
double dblCouponFloor)
Constructs the CouponSetting from the coupon schedule, coupon type, and the coupon amount
|
Modifier and Type | Method and Description |
---|---|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
static void |
main(java.lang.String[] astrArgs) |
double |
processCouponWindow(double dblCoupon,
double dblDate)
Trims the component coupon if it falls outside the (optionally) specified coupon window.
|
byte[] |
serialize()
Serialize into a byte array.
|
boolean |
validate()
Validates the current object state
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter, getFieldDelimiter, getObjectTrailer
public FactorSchedule _fsCoupon
public java.lang.String _strCouponType
public double _dblCoupon
public double _dblCouponFloor
public double _dblCouponCeiling
public CouponSetting(FactorSchedule fsCoupon, java.lang.String strCouponType, double dblCoupon, double dblCouponCeiling, double dblCouponFloor)
fsCoupon
- Coupon schedulestrCouponType
- Coupon TypedblCoupon
- Coupon AmountdblCouponCeiling
- Coupon Ceiling AmountdblCouponFloor
- Coupon Floor Amountpublic CouponSetting(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if CouponSetting cannot be properly de-serializedpublic double processCouponWindow(double dblCoupon, double dblDate) throws java.lang.Exception
dblCoupon
- Input CoupondblDate
- Input Date representing the period that the coupon belongs tojava.lang.Exception
- Thrown if inputs are invalidpublic byte[] serialize()
Serializer
serialize
in class Serializer
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer
public boolean validate()
Validatable
validate
in interface Validatable
public static final void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception