|
From: <be...@us...> - 2006-09-08 13:15:03
|
Revision: 128
http://svn.sourceforge.net/objectlabkit/?rev=128&view=rev
Author: benoitx
Date: 2006-09-08 06:14:46 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
Slightly modify the moveByTenor interface and provide more tests for it. (I need to add more for Fwd,modifiedPreceeding and Backward) as well as SPOT tests.
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarBaseDateCalculator.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -100,14 +100,19 @@
* handler and not count towards the number of days to move.
*
* @param businessDays
+ * @param daysToSpot number of days to "spot" days, this can vary from one market to the other.
* @return the current businessCalendar (so one can do
* calendar.moveByTenor(StandardTenor.T_2M).getCurrentBusinessDate();)
*/
- public DateCalculator<E> moveByTenor(final Tenor tenor) {
+ public DateCalculator<E> moveByTenor(final Tenor tenor, final int daysToSpot) {
if (tenor == null) {
throw new IllegalArgumentException("Tenor cannot be null");
}
+
+ // get to the Spot date first:
+ moveByDays(daysToSpot);
+ // move by tenor
switch (tenor.getCode()) {
case DAY:
return moveByDays(tenor.getUnits());
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -145,7 +145,7 @@
*
* @param days
* number of days (can be <0 or >0)
- * @return the businessCalendar (so one can do
+ * @return the DateCalculator (so one can do
* calendar.moveByDays(-2).getCurrentBusinessDate();)
*/
DateCalculator<E> moveByDays(final int days);
@@ -159,7 +159,7 @@
*
* @param businessDays
* (can be <0 or >0)
- * @return the current businessCalendar (so one can do
+ * @return the current DateCalculator (so one can do
* calendar.moveByBusinessDays(2).getCurrentBusinessDate();)
* @exception IllegalArgumentException
* if the HolidayHandlerType is (MODIFIED_PRECEEDING or
@@ -183,13 +183,14 @@
DateCalculator<E> combine(DateCalculator<E> calculator);
/**
- * move the current date by a given tenor, this means that if a date is
- * either a 'weekend' or holiday, it will be skipped acording to the holiday
- * handler and not count towards the number of days to move.
+ * Move the current date by a given tenor, please note that all tenors are relative to
+ * the SPOT day which is a number of days from the current date. This method therefore,
+ * calculates the SPOT day first, moves it if it falls on a holiday and then goes to the
+ * calculated day according to the Tenor.
*
- * @param businessDays
- * @return the current businessCalendar (so one can do
- * calendar.moveByTenor(StandardTenor.T_2M).getCurrentBusinessDate();)
+ * @param tenor the Tenor to reach.
+ * @param daysToSpot number of days to "spot" days, this can vary from one market to the other.
+ * @return the current DateCalculator
*/
- DateCalculator<E> moveByTenor(final Tenor tenor);
+ DateCalculator<E> moveByTenor(final Tenor tenor, final int daysToSpot);
}
\ No newline at end of file
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -203,32 +203,17 @@
}
public void testMoveByTenorDays() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.BACKWARD);
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1D", cal.moveByTenor(StandardTenor.T_1D), "2006-08-09");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2D", cal.moveByTenor(new Tenor(2, TenorCode.DAY)), "2006-08-10");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 10D", cal.moveByTenor(new Tenor(10, TenorCode.DAY)), "2006-08-18");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 11D", cal.moveByTenor(new Tenor(11, TenorCode.DAY)), "2006-08-18");
-
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(10, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.BACKWARD);
}
public void testMoveByTenorWeek() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.BACKWARD);
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1W", cal.moveByTenor(StandardTenor.T_1W), "2006-08-15");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2W", cal.moveByTenor(new Tenor(2, TenorCode.WEEK)), "2006-08-22");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 4W", cal.moveByTenor(new Tenor(4, TenorCode.WEEK)), "2006-09-05");
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.BACKWARD);
}
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -51,4 +51,13 @@
protected DateCalculator<E> newDateCalculator(final String name, final String type) {
return getDateCalculatorFactory().getDateCalculator(name, type);
}
+
+ protected void checkMoveByTenor(final String startDate, final Tenor tenor, final int daysToSpot, final String expectedDate,
+ final String holidayHandlerType) {
+ final DateCalculator<E> cal = newDateCalculator("bla", holidayHandlerType);
+ cal.setStartDate(newDate(startDate));
+ checkDate("Move start:" + startDate + " tenor:" + tenor + " daysToSpot:" + daysToSpot,
+ cal.moveByTenor(tenor, daysToSpot), expectedDate);
+ }
+
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -193,32 +193,17 @@
}
public void testMoveByTenorDays() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.FORWARD);
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1D", cal.moveByTenor(StandardTenor.T_1D), "2006-08-09");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2D", cal.moveByTenor(new Tenor(2, TenorCode.DAY)), "2006-08-10");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 10D", cal.moveByTenor(new Tenor(10, TenorCode.DAY)), "2006-08-18");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 11D", cal.moveByTenor(new Tenor(11, TenorCode.DAY)), "2006-08-21");
-
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(10, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorWeek() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.FORWARD);
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1W", cal.moveByTenor(StandardTenor.T_1W), "2006-08-15");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2W", cal.moveByTenor(new Tenor(2, TenorCode.WEEK)), "2006-08-22");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 4W", cal.moveByTenor(new Tenor(4, TenorCode.WEEK)), "2006-09-05");
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.FORWARD);
}
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -194,33 +194,48 @@
}
public void testMoveByTenorDays() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(10, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1D", cal.moveByTenor(StandardTenor.T_1D), "2006-08-09");
+ public void testMoveByTenorDaysOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 1, "2006-08-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 1, "2006-08-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2D", cal.moveByTenor(new Tenor(2, TenorCode.DAY)), "2006-08-10");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 10D", cal.moveByTenor(new Tenor(10, TenorCode.DAY)), "2006-08-18");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 11D", cal.moveByTenor(new Tenor(11, TenorCode.DAY)), "2006-08-21");
-
+ public void testMoveByTenorDaysTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 2, "2006-08-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 2, "2006-08-14", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 2, "2006-08-22", HolidayHandlerType.MODIFIED_FOLLLOWING);
}
public void testMoveByTenorWeek() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1W", cal.moveByTenor(StandardTenor.T_1W), "2006-08-15");
+ public void testMoveByTenorWeekOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 1, "2006-08-16", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 1, "2006-08-23", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 1, "2006-09-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2W", cal.moveByTenor(new Tenor(2, TenorCode.WEEK)), "2006-08-22");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 4W", cal.moveByTenor(new Tenor(4, TenorCode.WEEK)), "2006-09-05");
+ public void testMoveByTenorWeekTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 2, "2006-08-17", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 2, "2006-08-24", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.MODIFIED_FOLLLOWING);
}
public void testAddAcrossMonth() {
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -206,39 +206,18 @@
}
public void testMoveByTenorDays() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_PRECEEDING);
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1D", cal.moveByTenor(StandardTenor.T_1D), "2006-08-09");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2D", cal.moveByTenor(new Tenor(2, TenorCode.DAY)), "2006-08-10");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 10D", cal.moveByTenor(new Tenor(10, TenorCode.DAY)), "2006-08-18");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 11D", cal.moveByTenor(new Tenor(11, TenorCode.DAY)), "2006-08-18");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 12D", cal.moveByTenor(new Tenor(12, TenorCode.DAY)), "2006-08-18");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 13D", cal.moveByTenor(new Tenor(13, TenorCode.DAY)), "2006-08-21");
-
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(10, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_PRECEEDING);
}
public void testMoveByTenorWeek() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_PRECEEDING);
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 1W", cal.moveByTenor(StandardTenor.T_1W), "2006-08-15");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 2W", cal.moveByTenor(new Tenor(2, TenorCode.WEEK)), "2006-08-22");
-
- cal.setStartDate(newDate("2006-08-08"));
- checkDate("Move 4W", cal.moveByTenor(new Tenor(4, TenorCode.WEEK)), "2006-09-05");
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.MODIFIED_PRECEEDING);
}
public void testAddAcrossMonth() {
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarBaseDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarBaseDateCalculator.java 2006-09-08 11:22:24 UTC (rev 127)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarBaseDateCalculator.java 2006-09-08 13:14:46 UTC (rev 128)
@@ -24,7 +24,6 @@
import net.objectlab.kit.datecalc.common.AbstractDateCalculator;
import net.objectlab.kit.datecalc.common.DateCalculator;
import net.objectlab.kit.datecalc.common.HolidayHandler;
-import net.objectlab.kit.datecalc.common.Tenor;
import net.objectlab.kit.datecalc.common.Utils;
import net.objectlab.kit.datecalc.common.WorkingWeek;
@@ -94,23 +93,18 @@
final HolidayHandler<Calendar> handler) {
return new JdkCalendarBaseDateCalculator(name, startDate, holidays, handler);
}
-
+/*
+ * @Override public JdkCalendarBaseDateCalculator combine(final DateCalculator<Calendar>
+ * calendar) { return (JdkCalendarBaseDateCalculator) super.combine(calendar); }
+ *
+ * @Override public JdkCalendarBaseDateCalculator moveByTenor(final Tenor tenor) {
+ * return (JdkCalendarBaseDateCalculator) super.moveByTenor(tenor); }
+ *
+ * @Override public JdkCalendarBaseDateCalculator moveByBusinessDays(final int
+ * businessDays) { return (JdkCalendarBaseDateCalculator)
+ * super.moveByBusinessDays(businessDays); }
+ */
@Override
- public JdkCalendarBaseDateCalculator combine(final DateCalculator<Calendar> calendar) {
- return (JdkCalendarBaseDateCalculator) super.combine(calendar);
- }
-
- @Override
- public JdkCalendarBaseDateCalculator moveByTenor(final Tenor tenor) {
- return (JdkCalendarBaseDateCalculator) super.moveByTenor(tenor);
- }
-
- @Override
- public JdkCalendarBaseDateCalculator moveByBusinessDays(final int businessDays) {
- return (JdkCalendarBaseDateCalculator) super.moveByBusinessDays(businessDays);
- }
-
- @Override
protected Calendar getToday() {
return Utils.blastTime(Calendar.getInstance());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|