Comparators are now also Serializable.
[fiscal-year.java.git] / src / main / java / com / github / sebhoss / time / FiscalYearStartsLate.java
blobcbd6770b111e473dda486ed3deec66a281036f1f
1 /*
2 * This program is free software. It comes without any warranty, to
3 * the extent permitted by applicable law. You can redistribute it
4 * and/or modify it under the terms of the Do What The Fuck You Want
5 * To Public License, Version 2, as published by Sam Hocevar. See
6 * http://www.wtfpl.net/ for more details.
7 */
8 package com.github.sebhoss.time;
10 import java.io.Serializable;
11 import java.util.Comparator;
13 import org.joda.time.Months;
15 /**
16 * TODO: document
18 final class FiscalYearStartsLate implements Comparator<Months>, Serializable {
20 private static final long serialVersionUID = 524301361114072673L;
22 @Override
23 public int compare(final Months fiscalStartMonth, final Months currentMonth) {
24 return fiscalStartMonth.compareTo(currentMonth) <= 0 ? 0 : -1;