com.vii.brillien.kernel.axiom.scheduling
Class DayOfMonthValueMatcher

java.lang.Object
  extended by com.vii.brillien.kernel.axiom.scheduling.IntArrayValueMatcher
      extended by com.vii.brillien.kernel.axiom.scheduling.DayOfMonthValueMatcher
All Implemented Interfaces:
ValueMatcher

public class DayOfMonthValueMatcher
extends IntArrayValueMatcher

A ValueMatcher whose rules are in a plain array of integer values. When asked to validate a value, this ValueMatcher checks if it is in the array and, if not, checks whether the last-day-of-month setting applies.


Constructor Summary
DayOfMonthValueMatcher(ArrayList integers)
          Builds the ValueMatcher.
 
Method Summary
 boolean isLastDayOfMonth(int value, int month, boolean isLeapYear)
           
 boolean match(int value, int month, boolean isLeapYear)
          Returns true if the given value is included in the matcher list or the last-day-of-month setting applies.
 
Methods inherited from class com.vii.brillien.kernel.axiom.scheduling.IntArrayValueMatcher
match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DayOfMonthValueMatcher

public DayOfMonthValueMatcher(ArrayList integers)
Builds the ValueMatcher.

Parameters:
integers - An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
Method Detail

match

public boolean match(int value,
                     int month,
                     boolean isLeapYear)
Returns true if the given value is included in the matcher list or the last-day-of-month setting applies.


isLastDayOfMonth

public boolean isLastDayOfMonth(int value,
                                int month,
                                boolean isLeapYear)


Copyright © 2012. All Rights Reserved.