Class CHoliday


  • public class CHoliday
    extends java.lang.Object
    CHoliday uses to save holiday information for date related operations when we add business day to current date Input which has been send to this object should have following format:
    • We need all pairs to follow "key:value" format. Please note that:
    • 1- Key should be one of following values:
    • y for year.
    • m for month.
    • dm for day of month.
    • dw for day of week.
    • dy for day of year.
    • wm for week of month.
    • wy for week of year.n
    • 2- Pairs should be separated by "-"
    • 3- Entity should be separated by ";"
    Based on provided information: m1-dy1 == Every year on January 01 m1-wm2-dw1 == Every year second weeks of January, first day of week.n"
    • Constructor Summary

      Constructors 
      Constructor Description
      CHoliday​(java.lang.String input)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean isHolidays​(java.util.Date date)
      Define if provided date match and is holiday
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CHoliday

        public CHoliday​(java.lang.String input)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isHolidays

        public boolean isHolidays​(java.util.Date date)
        Define if provided date match and is holiday
        Parameters:
        date - to process
        Returns:
        true if the date is holiday otherwise false
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object