Package fr.marcwrobel.jbanking.calendar
Enum DayOfWeekHoliday
- java.lang.Object
-
- java.lang.Enum<DayOfWeekHoliday>
-
- fr.marcwrobel.jbanking.calendar.DayOfWeekHoliday
-
- All Implemented Interfaces:
Holiday,Serializable,Comparable<DayOfWeekHoliday>
public enum DayOfWeekHoliday extends Enum<DayOfWeekHoliday> implements Holiday
- Since:
- 2.1.0
- Author:
- Marc Wrobel
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FRIDAYFriday is the day of the week between Thursday and Saturday.MONDAYMonday is the day of the week between Sunday and Tuesday.SATURDAYSaturday is the day of the week between Friday and Sunday.SUNDAYSunday is the day of the week between Saturday and Monday.THURSDAYThursday is the day of the week between Wednesday and Friday.TUESDAYTuesday is the day of the week between Monday and Wednesday.WEDNESDAYWednesday is the day of the week between Tuesday and Thursday.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck(LocalDate date)Check whether the given date is an occurrence of this holiday.static DayOfWeekHolidayvalueOf(String name)Returns the enum constant of this type with the specified name.static DayOfWeekHoliday[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MONDAY
public static final DayOfWeekHoliday MONDAY
Monday is the day of the week between Sunday and Tuesday. It seems it is never a weekend day.- See Also:
- Wikipedia
-
TUESDAY
public static final DayOfWeekHoliday TUESDAY
Tuesday is the day of the week between Monday and Wednesday. It seems it is never a weekend day.- See Also:
- Wikipedia
-
WEDNESDAY
public static final DayOfWeekHoliday WEDNESDAY
Wednesday is the day of the week between Tuesday and Thursday. It seems it is never a weekend day.- See Also:
- Wikipedia
-
THURSDAY
public static final DayOfWeekHoliday THURSDAY
Thursday is the day of the week between Wednesday and Friday. It seems is never a weekend day.- See Also:
- Wikipedia
-
FRIDAY
public static final DayOfWeekHoliday FRIDAY
Friday is the day of the week between Thursday and Saturday. Friday is the first day of the weekend in some countries, with Saturday the second.- See Also:
- Wikipedia
-
SATURDAY
public static final DayOfWeekHoliday SATURDAY
Saturday is the day of the week between Friday and Sunday. In most countries, Saturday is a weekend day.- See Also:
- Wikipedia
-
SUNDAY
public static final DayOfWeekHoliday SUNDAY
Sunday is the day of the week between Saturday and Monday. Sunday is a day of rest in most Western countries, and a part of the weekend.- See Also:
- Wikipedia
-
-
Method Detail
-
values
public static DayOfWeekHoliday[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DayOfWeekHoliday c : DayOfWeekHoliday.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DayOfWeekHoliday valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
check
public boolean check(LocalDate date)
Description copied from interface:HolidayCheck whether the given date is an occurrence of this holiday.- Specified by:
checkin interfaceHoliday- Parameters:
date- the date to check.- Returns:
trueif the given date is an occurrence of this holiday,falseotherwise.- See Also:
Holiday.check(LocalDate)
-
-