public class FactorSchedule extends Serializer
NULL_SER_STRING, VERSION
Constructor and Description |
---|
FactorSchedule(byte[] ab)
FactorSchedule de-serialization from input byte array
|
Modifier and Type | Method and Description |
---|---|
static FactorSchedule |
CreateBulletSchedule()
Create factor schedule of flat unit notional
|
static FactorSchedule |
CreateFromDateFactorArray(double[] adblDate,
double[] adblFactor)
Create the factor schedule from a matched array of dates and factors
|
static FactorSchedule |
CreateFromDateFactorDeltaArray(double[] adblDate,
double[] adblFactorDelta)
Create the factor schedule from a matched array of dates and factor deltas
|
static FactorSchedule |
CreateFromDateFactorSet(java.lang.String strDates,
java.lang.String strFactors)
Create the factor schedule from a matched string array of dates and factors
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
double[] |
getDates()
Retrieve the array of dates
|
double |
getFactor(double dblDate)
Retrieve the notional factor for a given date
|
double |
getFactor(double dblStartDate,
double dblEndDate)
Retrieve the time-weighted notional factor between 2 dates
|
double[] |
getFactors()
Retrieve the array of notional factors
|
java.lang.String |
getFieldDelimiter()
Returns the Field Delimiter String
|
int |
getIndex(double dblDate)
Retrieve the index that corresponds to the given date
|
java.lang.String |
getObjectTrailer()
Returns the Object Trailer String
|
static void |
main(java.lang.String[] astrArgs) |
byte[] |
serialize()
Serialize into a byte array.
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter
public FactorSchedule(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if FactorSchedule cannot be properly de-serializedpublic static final FactorSchedule CreateFromDateFactorSet(java.lang.String strDates, java.lang.String strFactors)
strDates
- String array of datesstrFactors
- String array of Factorspublic static final FactorSchedule CreateFromDateFactorArray(double[] adblDate, double[] adblFactor)
adblDate
- Array of datesadblFactor
- Array of Factorspublic static final FactorSchedule CreateFromDateFactorDeltaArray(double[] adblDate, double[] adblFactorDelta)
adblDate
- Array of datesadblFactorDelta
- Array of Factor Deltaspublic static final FactorSchedule CreateBulletSchedule()
public double getFactor(double dblDate) throws java.lang.Exception
dblDate
- Datejava.lang.Exception
- Thrown if the notional cannot be computedpublic int getIndex(double dblDate) throws java.lang.Exception
dblDate
- Datejava.lang.Exception
- Thrown if the index cannot be computedpublic double getFactor(double dblStartDate, double dblEndDate) throws java.lang.Exception
dblStartDate
- Start DatedblEndDate
- End Datejava.lang.Exception
- Thrown if the notional cannot be computedpublic double[] getDates()
public double[] getFactors()
public 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