|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.fpml.FpMLValidator
public class FpMLValidator
Utility validation class for generic FpML conditions and terms.
This class is used internally by the FpML java code validation rules.
Nested Class Summary | |
---|---|
static class |
FpMLValidator.FpMLValidationException
An FpML specific expection. |
static class |
FpMLValidator.RegularPeriod
A representation of a time period. |
Constructor Summary | |
---|---|
FpMLValidator()
|
Method Summary | |
---|---|
static FpMLValidator.RegularPeriod |
calculateRegularPeriod(ComplexDataObject calculationPeriodDates)
Term: regular period. |
static boolean |
dividesRegularPeriod(ComplexDataObject calculationPeriodDates)
Method used in rule ird-12. |
static boolean |
isFrequencyEquivalent(String firstPeriod,
int firstMultiplier,
String secondPeriod,
int secondMultiplier)
Tests whether the second frequency is equivalent to the first, according to the following definitions: Term: frequency equivalence A frequency is specified as a tuple of period, which is an integer, and periodMultiplier, which is one of D, M, Y, W or T, standing for day, month, year, week and term. |
static boolean |
isIntegerMultiple(String firstPeriod,
int firstMultiplier,
String secondPeriod,
int secondMultiplier)
Tests whether the second frequency is an integer multiple of the first, according to the following definitions: Term: frequency equivalence A frequency is specified as a tuple of period, which is an integer, and periodMultiplier, which is one of D, M, Y, W or T, standing for day, month, year, week and term. |
static boolean |
isParametric(ComplexDataObject message)
Tests for the following condition: The ancestor element of type InterestRateStream contains no cashflows element, or cashflows/cashflowsMatchParameters contains true. |
static boolean |
isPeriodMultiple(ISO8601Date firstDate,
ISO8601Date secondDate,
String period,
int multiplier)
Returns whether the second date can be reached from the fist via an integer multiple of the multiplier and period. |
static boolean |
matchesUnadjustedCalcPeriodDates(ComplexDataObject interestRateStream,
ISO8601Date testDate)
Term: unadjusted calculation period dates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FpMLValidator()
Method Detail |
---|
public static boolean isParametric(ComplexDataObject message)
message
- The FpML message.
public static boolean isFrequencyEquivalent(String firstPeriod, int firstMultiplier, String secondPeriod, int secondMultiplier)
firstPeriod
- The first period.firstMultiplier
- The first multiplier.secondPeriod
- The second period.secondMultiplier
- The second multiplier.
public static boolean isIntegerMultiple(String firstPeriod, int firstMultiplier, String secondPeriod, int secondMultiplier)
firstPeriod
- The first period.firstMultiplier
- The first multiplier.secondPeriod
- The second period.secondMultiplier
- The second multiplier.
public static boolean isPeriodMultiple(ISO8601Date firstDate, ISO8601Date secondDate, String period, int multiplier)
firstDate
- The start date.secondDate
- The finish date.period
- The period, i.e. "D", "W", "M", "Y", "T".multiplier
- The period multiplier.
public static FpMLValidator.RegularPeriod calculateRegularPeriod(ComplexDataObject calculationPeriodDates) throws FpMLValidator.FpMLValidationException
calculationPeriodDates
- The source object.
FpMLValidator.FpMLValidationException
- If the data is invalid.public static boolean matchesUnadjustedCalcPeriodDates(ComplexDataObject interestRateStream, ISO8601Date testDate) throws FpMLValidator.FpMLValidationException
interestRateStream
- The test object.testDate
- The date to be tested.
FpMLValidator.FpMLValidationException
- If the data is invalid.public static boolean dividesRegularPeriod(ComplexDataObject calculationPeriodDates) throws FpMLValidator.FpMLValidationException
calculationPeriodDates
- The object to test.
FpMLValidator.FpMLValidationException
- If mandatory parts of the argument are missing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |