Package com.syzygy.events.database
Enum Class Event.Dates
- All Implemented Interfaces:
Serializable
,Comparable<Event.Dates>
,Constable
- Enclosing class:
- Event
Used to store repetition of dates in the database
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
collectionContainsDay
(long collection, long day) Checks if the collection of dates contains the specific daystatic String
Formats the set of days to a user friendly stringstatic int
numberOfDays
(long collection) Gets the number of days selectedstatic Event.Dates
Returns the enum constant of this class with the specified name.static Event.Dates[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Field Details
-
NO_REPEAT
public static final long NO_REPEAT- See Also:
-
MONDAY
public static final long MONDAY- See Also:
-
TUESDAY
public static final long TUESDAY- See Also:
-
WEDNESDAY
public static final long WEDNESDAY- See Also:
-
THURSDAY
public static final long THURSDAY- See Also:
-
FRIDAY
public static final long FRIDAY- See Also:
-
SATURDAY
public static final long SATURDAY- See Also:
-
SUNDAY
public static final long SUNDAY- See Also:
-
WEEKDAYS
public static final long WEEKDAYS- See Also:
-
EVERY_DAY
public static final long EVERY_DAY- See Also:
-
-
Constructor Details
-
Dates
private Dates()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
collectionContainsDay
public static boolean collectionContainsDay(long collection, long day) Checks if the collection of dates contains the specific day- Parameters:
collection
- The set ofEvent.Dates
to checkday
- TheEvent.Dates
to look for- Returns:
true
if the collection contains the day. Will returntrue
if the collection contains other days as well
-
numberOfDays
public static int numberOfDays(long collection) Gets the number of days selected- Parameters:
collection
- The set ofEvent.Dates
to check- Returns:
- The number of days in the selection
-
format
Formats the set of days to a user friendly string- Parameters:
collection
- The set of days- Returns:
- The formated string
-