Enum Class Event.Dates

java.lang.Object
java.lang.Enum<Event.Dates>
com.syzygy.events.database.Event.Dates
All Implemented Interfaces:
Serializable, Comparable<Event.Dates>, Constable
Enclosing class:
Event

public static enum Event.Dates extends Enum<Event.Dates>
Used to store repetition of dates in the database
See Also:
  • Field Details

  • Constructor Details

    • Dates

      private Dates()
  • Method Details

    • values

      public static Event.Dates[] 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

      public static Event.Dates valueOf(String name)
      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 name
      NullPointerException - 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 of Event.Dates to check
      day - The Event.Dates to look for
      Returns:
      true if the collection contains the day. Will return true 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 of Event.Dates to check
      Returns:
      The number of days in the selection
    • format

      public static String format(Long collection)
      Formats the set of days to a user friendly string
      Parameters:
      collection - The set of days
      Returns:
      The formated string