Class Base

java.lang.Object
org.drip.analytics.eventday.Base
Direct Known Subclasses:
Fixed, Static, Variable

public abstract class Base
extends java.lang.Object
Base is an abstraction around holiday and description. Abstract function generates an optional adjustment for weekends in a given year.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    Base​(java.lang.String strDescription)
    Constructs the Base instance from the description
  • Method Summary

    Modifier and Type Method Description
    abstract int dateInYear​(int iYear, boolean bAdjusted)
    Generate the full date specific to the input year
    java.lang.String description()
    Return the description
    static int rollHoliday​(int iDate, boolean bBalkOnYearShift, Weekend wkend)
    Roll the date to a non-holiday according to the rule specified

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Base

      public Base​(java.lang.String strDescription)
      Constructs the Base instance from the description
      Parameters:
      strDescription - Holiday Description
  • Method Details

    • rollHoliday

      public static final int rollHoliday​(int iDate, boolean bBalkOnYearShift, Weekend wkend) throws java.lang.Exception
      Roll the date to a non-holiday according to the rule specified
      Parameters:
      iDate - Date to be rolled
      bBalkOnYearShift - Throw an exception if the year change happens
      wkend - Object representing the weekend days
      Returns:
      The Adjusted Date
      Throws:
      java.lang.Exception - Thrown if the holiday cannot be rolled
    • description

      public java.lang.String description()
      Return the description
      Returns:
      Description
    • dateInYear

      public abstract int dateInYear​(int iYear, boolean bAdjusted)
      Generate the full date specific to the input year
      Parameters:
      iYear - Input Year
      bAdjusted - Whether adjustment is desired
      Returns:
      The full date