org.drools.planner.examples.nurserostering.domain
Enum WeekendDefinition
java.lang.Object
java.lang.Enum<WeekendDefinition>
org.drools.planner.examples.nurserostering.domain.WeekendDefinition
- All Implemented Interfaces:
- Serializable, Comparable<WeekendDefinition>
public enum WeekendDefinition
- extends Enum<WeekendDefinition>
SATURDAY_SUNDAY
public static final WeekendDefinition SATURDAY_SUNDAY
FRIDAY_SATURDAY_SUNDAY
public static final WeekendDefinition FRIDAY_SATURDAY_SUNDAY
FRIDAY_SATURDAY_SUNDAY_MONDAY
public static final WeekendDefinition FRIDAY_SATURDAY_SUNDAY_MONDAY
SATURDAY_SUNDAY_MONDAY
public static final WeekendDefinition SATURDAY_SUNDAY_MONDAY
values
public static WeekendDefinition[] 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 (WeekendDefinition c : WeekendDefinition.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static WeekendDefinition 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 name
NullPointerException
- if the argument is null
valueOfCode
public static WeekendDefinition valueOfCode(String code)
getCode
public String getCode()
getFirstDayOfWeekend
public DayOfWeek getFirstDayOfWeekend()
getLastDayOfWeekend
public DayOfWeek getLastDayOfWeekend()
toString
public String toString()
- Overrides:
toString
in class Enum<WeekendDefinition>
isWeekend
public boolean isWeekend(DayOfWeek dayOfWeek)
getWeekendLength
public int getWeekendLength()
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.