public enum Cycle extends Enum<Cycle>
| Enum Constant and Description |
|---|
HALF_YEARLY |
MONTHLY |
QUARTERLY |
TWO_MONTHLY |
WEEKLY |
YEARLY |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxDays() |
int |
getMinDays() |
boolean |
isBookingGroupValid(List<WrappedBooking> bookings,
LocalDate bookingDate) |
boolean |
isOneValidWithinTolerance(LocalDate bookingDate,
List<LocalDate> bookingDates) |
boolean |
isReferenceDateBeforeBookingDateWithTolerance(LocalDate bookingDate,
LocalDate referenceDate) |
boolean |
isValid(LocalDate bookingDate,
LocalDate referenceDate) |
boolean |
isValidWithinTolerance(LocalDate nextBookingDate,
LocalDate lastBookingDate) |
LocalDate |
nextBookingDate(LocalDate bookingDate) |
static Cycle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Cycle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Cycle WEEKLY
public static final Cycle MONTHLY
public static final Cycle TWO_MONTHLY
public static final Cycle QUARTERLY
public static final Cycle HALF_YEARLY
public static final Cycle YEARLY
public static Cycle[] values()
for (Cycle c : Cycle.values()) System.out.println(c);
public static Cycle valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isReferenceDateBeforeBookingDateWithTolerance(LocalDate bookingDate, LocalDate referenceDate)
public boolean isOneValidWithinTolerance(LocalDate bookingDate, List<LocalDate> bookingDates)
public boolean isValidWithinTolerance(LocalDate nextBookingDate, LocalDate lastBookingDate)
public boolean isBookingGroupValid(List<WrappedBooking> bookings, LocalDate bookingDate)
public int getMinDays()
public int getMaxDays()
Copyright © 2018. All rights reserved.