|
From: <be...@us...> - 2006-09-06 15:05:59
|
Revision: 122
http://svn.sourceforge.net/objectlabkit/?rev=122&view=rev
Author: benoitx
Date: 2006-09-06 08:04:38 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
Formatting and improved QA (Checkstyle).
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/AbstractDateCalculatorFactory.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculatorFactory.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractIMMDateTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/UtilsTest.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DefaultJdkCalendarCalculatorFactory.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarCalculatorFactory.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateCalculatorFactory.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
Removed Paths:
-------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Version.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-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -35,9 +35,9 @@
*/
public abstract class AbstractDateCalculator<E> implements DateCalculator<E> {
-// protected static final int MONTHS_IN_QUARTER = 3;
+ // protected static final int MONTHS_IN_QUARTER = 3;
-// protected static final int MONTH_IN_YEAR = 12;
+ // protected static final int MONTH_IN_YEAR = 12;
protected static final int DAYS_IN_WEEK = 7;
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculatorFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculatorFactory.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculatorFactory.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -33,9 +33,10 @@
protected final ConcurrentMap<String, Set<E>> holidays = new ConcurrentHashMap<String, Set<E>>();
-// public abstract DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);
+ // public abstract DateCalculator<E> getDateCalculator(String name, String
+ // holidayHandlerType);
-// public abstract PeriodCountCalculator<E> getPeriodCountCalculator();
+ // public abstract PeriodCountCalculator<E> getPeriodCountCalculator();
/**
* Use this method to register a set of holidays for a given calendar, it
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculatorFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculatorFactory.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculatorFactory.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -60,7 +60,7 @@
* @return a PeriodCountCalculator
*/
PeriodCountCalculator<E> getPeriodCountCalculator();
-
+
/**
* @return an IMMDateCalculator
*/
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -20,7 +20,7 @@
import java.util.List;
/**
- * The IMMDates are defined
+ * The IMMDates are defined
*
* @author Benoit Xhenseval
* @author $LastChangedBy: benoitx $
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -38,9 +38,10 @@
private static final String DATE_PATTERN = "yyyy-MM-dd";
private static final SimpleDateFormat SDF = new SimpleDateFormat(DATE_PATTERN);
-
- private Utils() {}
+ private Utils() {
+ }
+
public static Calendar getCal(final Date date) {
final Calendar cal = Calendar.getInstance();
cal.setTime(date);
@@ -54,9 +55,11 @@
/**
*
- * @param str string
+ * @param str
+ * string
* @return
- * @throws IllegalArgumentException if the string cannot be parsed.
+ * @throws IllegalArgumentException
+ * if the string cannot be parsed.
*/
public static Date createDate(final String str) {
try {
@@ -70,9 +73,11 @@
/**
*
- * @param str string
+ * @param str
+ * string
* @return
- * @throws IllegalArgumentException if the string cannot be parsed.
+ * @throws IllegalArgumentException
+ * if the string cannot be parsed.
*/
public static Calendar createCalendar(final String str) {
try {
Deleted: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Version.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Version.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Version.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -1,68 +0,0 @@
-/*
- * $Id: org.eclipse.jdt.ui.prefs 99 2006-09-04 20:30:25Z marchy $
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package net.objectlab.kit.datecalc.common;
-
-
-import java.io.*;
-
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy: marchy $
- * @version $Revision: 99 $ $Date: 2006-09-04 21:30:25 +0100 (Mon, 04 Sep 2006) $
- *
- */
-public class Version {
- public static void main(String[] args) throws Exception {
- if (args.length != 1) {
- System.err.println("Usage: java version <.class file>");
- System.exit(1);
- }
-
- if (!new File(args[0]).exists()) {
- System.err.println(args[0] + " does not exist!");
- System.exit(2);
- }
-
- DataInputStream dis = new DataInputStream(new FileInputStream(args[0]));
- int magic = dis.readInt();
- if (magic != 0xcafebabe) {
- System.err.println(args[0] + " is not a .class file");
- System.exit(3);
- }
-
- int minor = dis.readShort();
- int major = dis.readShort();
- System.out.println("class file version is " + major + "." + minor);
-
- String version = null;
-
- if (major < 48) {
- version = "1.3.1";
- } else if (major == 48) {
- version = "1.4.2";
- } else if (major == 49) {
- version = "1.5";
- } else if (major == 50) {
- version = "6";
- } else {
- version = "7";
- }
- System.out.println("You need to use JDK " + version + " or above");
- }
-}
\ No newline at end of file
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -24,45 +24,44 @@
* @author Benoit Xhenseval
*/
public class WorkingWeek {
+ private static final byte MONDAY = 1;
- protected static final byte MONDAY = 1;
+ private static final byte TUESDAY = 2;
- protected static final byte TUESDAY = 2;
+ private static final byte WEDNESDAY = 4;
- protected static final byte WEDNESDAY = 4;
+ private static final byte THURSDAY = 8;
- protected static final byte THURSDAY = 8;
+ private static final byte FRIDAY = 16;
- protected static final byte FRIDAY = 16;
+ private static final byte SATURDAY = 32;
- protected static final byte SATURDAY = 32;
+ private static final byte SUNDAY = 64;
- protected static final byte SUNDAY = 64;
+ private static final byte DEFAULT_WORKING_DAYS = (byte) (MONDAY + TUESDAY + WEDNESDAY + THURSDAY + FRIDAY);
- protected static final byte DEFAULT_WORKING_DAYS = (byte) (MONDAY + TUESDAY + WEDNESDAY + THURSDAY + FRIDAY);
-
- protected static final byte[] WORKING_WEEK_DAYS_OFFSET = new byte[] { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
+ private static final byte[] WORKING_WEEK_DAYS_OFFSET = new byte[] { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
SATURDAY };
public static final WorkingWeek DEFAULT = new WorkingWeek();
/**
+ * working days: 1 Monday, 2 Tuesday, 4 Wednesday, 8 Thursday, 16 Friday, 32
+ * Saturday, 64 Sunday So Monday-Friday= 1+2+4+8+16 = 31
+ */
+ private byte workingDays = DEFAULT_WORKING_DAYS;
+
+ /**
* Default Working Week Monday -> Friday.
*/
public WorkingWeek() {
this(DEFAULT_WORKING_DAYS);
}
- private WorkingWeek(final byte workingDays) {
+ protected WorkingWeek(final byte workingDays) {
this.workingDays = workingDays;
}
- /**
- * working days: 1 Monday, 2 Tuesday, 4 Wednesday, 8 Thursday, 16 Friday, 32
- * Saturday, 64 Sunday So Monday-Friday= 1+2+4+8+16 = 31
- */
- protected byte workingDays = DEFAULT_WORKING_DAYS;
-
public boolean isWorkingDayFromCalendar(final int dayOfWeek) {
final int day = adjustDay(dayOfWeek);
return (WORKING_WEEK_DAYS_OFFSET[day] & workingDays) != 0;
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractIMMDateTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractIMMDateTest.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractIMMDateTest.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -155,7 +155,6 @@
checkImm(cal, parseDate("2006-12-21"), false);
}
-
public void testPreviousIMM() {
E startDate = parseDate("2006-08-01");
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/UtilsTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/UtilsTest.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/UtilsTest.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -76,12 +76,12 @@
Collections.sort(actual);
assertEquals(expected, actual);
}
-
+
public void testFailCreateDate() {
try {
Utils.createDate("blablabla");
fail("should have thown an IllegalArgumentException");
- } catch(IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
// all ok
}
}
@@ -90,7 +90,7 @@
try {
Utils.createCalendar("blablabla");
fail("should have thown an IllegalArgumentException");
- } catch(IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
// all ok
}
}
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -32,7 +32,7 @@
*/
public class DatePeriodCountCalculator implements JdkDatePeriodCountCalculator {
- private final CalendarPeriodCountCalculator PCC = new CalendarPeriodCountCalculator();
+ private static final CalendarPeriodCountCalculator PCC = new CalendarPeriodCountCalculator();
public int dayDiff(final Date start, final Date end, final PeriodCountBasis basis) {
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DefaultJdkCalendarCalculatorFactory.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DefaultJdkCalendarCalculatorFactory.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DefaultJdkCalendarCalculatorFactory.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -31,7 +31,8 @@
* @version $Revision: 96 $ $Date: 2006-09-04 16:01:20 +0100 (Mon, 04 Sep 2006) $
*
*/
-public class DefaultJdkCalendarCalculatorFactory extends AbstractDateCalculatorFactory<Calendar> implements JdkCalendarCalculatorFactory {
+public class DefaultJdkCalendarCalculatorFactory extends AbstractDateCalculatorFactory<Calendar> implements
+ JdkCalendarCalculatorFactory {
private static final DefaultJdkCalendarCalculatorFactory DEFAULT = new DefaultJdkCalendarCalculatorFactory();
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -34,9 +34,9 @@
*/
public class HolidayHandlerDateWrapper implements HolidayHandler<Date> {
- HolidayHandler<Calendar> delegate;
+ private HolidayHandler<Calendar> delegate;
- DateCalculator<Calendar> calculator;
+ private DateCalculator<Calendar> calculator;
public HolidayHandlerDateWrapper(final HolidayHandler<Calendar> holidayHandler, final DateCalculator<Calendar> dateCalulator) {
delegate = holidayHandler;
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarCalculatorFactory.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarCalculatorFactory.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarCalculatorFactory.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -7,8 +7,8 @@
public interface JdkCalendarCalculatorFactory extends DateCalculatorFactory<Calendar> {
- public abstract JdkCalendarDateCalculator getDateCalculator(final String name, final String holidayHandlerType);
+ JdkCalendarDateCalculator getDateCalculator(final String name, final String holidayHandlerType);
- public abstract PeriodCountCalculator<Calendar> getPeriodCountCalculator();
+ PeriodCountCalculator<Calendar> getPeriodCountCalculator();
}
\ No newline at end of file
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarIMMDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarIMMDateCalculator.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkCalendarIMMDateCalculator.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -8,6 +8,8 @@
import net.objectlab.kit.datecalc.common.IMMPeriod;
public class JdkCalendarIMMDateCalculator extends AbstractIMMDateCalculator<Calendar> {
+ private static final int NUMBER_DAYS_IN_WEEK = 7;
+
/**
* Returns a list of IMM dates between 2 dates, it will exclude the start
* date if it is an IMM date but would include the end date if it is an IMM.
@@ -87,9 +89,9 @@
case Calendar.SEPTEMBER:
case Calendar.DECEMBER:
return true;
+ default:
+ return false;
}
-
- return false;
}
/**
@@ -106,11 +108,11 @@
if (dayOfWeek < Calendar.WEDNESDAY) {
cal.add(Calendar.DAY_OF_MONTH, Calendar.WEDNESDAY - dayOfWeek);
} else if (dayOfWeek > Calendar.WEDNESDAY) {
- cal.add(Calendar.DAY_OF_MONTH, (Calendar.WEDNESDAY + 7) - dayOfWeek);
+ cal.add(Calendar.DAY_OF_MONTH, (Calendar.WEDNESDAY + NUMBER_DAYS_IN_WEEK) - dayOfWeek);
}
// go to 3rd wednesday - i.e. move 2 weeks forward
- cal.add(Calendar.DAY_OF_MONTH, 7 * 2);
+ cal.add(Calendar.DAY_OF_MONTH, NUMBER_DAYS_IN_WEEK * 2);
}
public boolean isIMMDate(final Calendar date) {
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateCalculatorFactory.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateCalculatorFactory.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateCalculatorFactory.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -7,8 +7,8 @@
public interface JdkDateCalculatorFactory extends DateCalculatorFactory<Date> {
- public abstract JdkDateCalculator getDateCalculator(final String name, final String holidayHandlerType);
+ JdkDateCalculator getDateCalculator(final String name, final String holidayHandlerType);
- public abstract PeriodCountCalculator<Date> getPeriodCountCalculator();
+ PeriodCountCalculator<Date> getPeriodCountCalculator();
}
\ No newline at end of file
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateIMMDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateIMMDateCalculator.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/JdkDateIMMDateCalculator.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -14,21 +14,21 @@
private static final JdkCalendarIMMDateCalculator DELEGATE = new JdkCalendarIMMDateCalculator();
@Override
- protected Date getNextIMMDate(boolean requestNextIMM, Date theStartDate, IMMPeriod period) {
+ protected Date getNextIMMDate(final boolean requestNextIMM, final Date theStartDate, final IMMPeriod period) {
return DELEGATE.getNextIMMDate(requestNextIMM, Utils.getCal(theStartDate), period).getTime();
}
- public List<Date> getIMMDates(Date start, Date end, IMMPeriod period) {
+ public List<Date> getIMMDates(final Date start, final Date end, final IMMPeriod period) {
return buildList(DELEGATE.getIMMDates(Utils.getCal(start), Utils.getCal(end), period));
}
- public boolean isIMMDate(Date date) {
+ public boolean isIMMDate(final Date date) {
return DELEGATE.isIMMDate(Utils.getCal(date));
}
- private List<Date> buildList(List<Calendar> dates) {
- List<Date> imms = new ArrayList<Date>();
- for (Calendar date : dates) {
+ private List<Date> buildList(final List<Calendar> dates) {
+ final List<Date> imms = new ArrayList<Date>();
+ for (final Calendar date : dates) {
imms.add(date.getTime());
}
return imms;
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -31,15 +31,15 @@
public static final JodaWorkingWeek DEFAULT = new JodaWorkingWeek();
public JodaWorkingWeek() {
- this(DEFAULT_WORKING_DAYS);
+ super();
}
private JodaWorkingWeek(final byte workingDays) {
- this.workingDays = workingDays;
+ super(workingDays);
}
public JodaWorkingWeek(final WorkingWeek ww) {
- this.workingDays = ww.getWorkingDays();
+ this(ww.getWorkingDays());
}
public boolean isWorkingDay(final LocalDate date) {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java 2006-09-06 14:41:28 UTC (rev 121)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java 2006-09-06 15:04:38 UTC (rev 122)
@@ -13,22 +13,22 @@
private static final LocalDateIMMDateCalculator DELEGATE = new LocalDateIMMDateCalculator();
- public boolean isIMMDate(YearMonthDay date) {
+ public boolean isIMMDate(final YearMonthDay date) {
return DELEGATE.isIMMDate(date.toLocalDate());
}
@Override
- protected YearMonthDay getNextIMMDate(boolean requestNextIMM, YearMonthDay theStartDate, IMMPeriod period) {
+ protected YearMonthDay getNextIMMDate(final boolean requestNextIMM, final YearMonthDay theStartDate, final IMMPeriod period) {
return new YearMonthDay(DELEGATE.getNextIMMDate(requestNextIMM, theStartDate.toLocalDate(), period));
}
- public List<YearMonthDay> getIMMDates(YearMonthDay start, YearMonthDay end, IMMPeriod period) {
+ public List<YearMonthDay> getIMMDates(final YearMonthDay start, final YearMonthDay end, final IMMPeriod period) {
return buildList(DELEGATE.getIMMDates(start.toLocalDate(), end.toLocalDate(), period));
}
- private List<YearMonthDay> buildList(List<LocalDate> dates) {
- List<YearMonthDay> imms = new ArrayList<YearMonthDay>();
- for (LocalDate date : dates) {
+ private List<YearMonthDay> buildList(final List<LocalDate> dates) {
+ final List<YearMonthDay> imms = new ArrayList<YearMonthDay>();
+ for (final LocalDate date : dates) {
imms.add(new YearMonthDay(date));
}
return imms;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|