Package org.drip.analytics.eventday
Class Weekend
java.lang.Object
org.drip.analytics.eventday.Weekend
public class Weekend
extends java.lang.Object
Weekend holds the left and the right weekend days. It provides functionality to retrieve them,
check if the given day is a weekend, and serialize/de-serialize weekend days.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Date, Cash Flow, and Cash Flow Period Measure Generation Utilities
- Package = Fixed, Variable, and Custom Holiday Creation
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description Weekend(int[] aiDay)
Create the weekend instance object from the array of the weekend days -
Method Summary
Modifier and Type Method Description int[]
days()
Retrieve the weekend daysboolean
isLeftWeekend(int iDate)
Is the given date a left weekend dayboolean
isRightWeekend(double dblDate)
Is the given date a right weekend dayboolean
isWeekend(int iDate)
Is the given date a weekend daystatic Weekend
StandardWeekend()
Create a Weekend Instance with SATURDAY and SUNDAYMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Weekend
public Weekend(int[] aiDay) throws java.lang.ExceptionCreate the weekend instance object from the array of the weekend days- Parameters:
aiDay
- Array of the weekend days- Throws:
java.lang.Exception
- Thrown if cannot properly de-serialize Weekend
-
-
Method Details
-
StandardWeekend
Create a Weekend Instance with SATURDAY and SUNDAY- Returns:
- Weekend object
-
days
public int[] days()Retrieve the weekend days- Returns:
- Array of the weekend days
-
isLeftWeekend
public boolean isLeftWeekend(int iDate)Is the given date a left weekend day- Parameters:
iDate
- Date- Returns:
- True (Left weekend day)
-
isRightWeekend
public boolean isRightWeekend(double dblDate)Is the given date a right weekend day- Parameters:
dblDate
- Date- Returns:
- True (Right weekend day)
-
isWeekend
public boolean isWeekend(int iDate)Is the given date a weekend day- Parameters:
iDate
- Date- Returns:
- True (Weekend day)
-