Enum Class IntendedUse

java.lang.Object
java.lang.Enum<IntendedUse>
de.gustavblass.fsu.fmi.roombooking.model.reservation.IntendedUse
All Implemented Interfaces:
Serializable, Comparable<IntendedUse>, Constable

public enum IntendedUse extends Enum<IntendedUse>

Represents the purpose of a room booking:

  • Enum Constant Details

    • OFFICIAL_MEETING

      public static final IntendedUse OFFICIAL_MEETING
      Indicates that the user who booked the room wishes to hold an official conference related to their work at FMI.
    • REGULAR_MEETING

      public static final IntendedUse REGULAR_MEETING
      Indicates that the user who booked the room wishes to hold some general conference of unspecified type. May be official or unofficial, related or unrelated to work or studies.
    • STUDYING

      public static final IntendedUse STUDYING
      Indicates that the user who booked the room wishes to work rather silently and not to hold any kind of conference.
  • Field Details

    • name

      public final String name
  • Constructor Details

    • IntendedUse

      private IntendedUse(String name)
  • Method Details

    • values

      public static IntendedUse[] 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 IntendedUse 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
    • ofName

      @Contract(pure=true) @NonNull public static @NonNull Optional<IntendedUse> ofName(String name)
      Converts the given label to the matching enum value.
      Parameters:
      name - A String suspected to be an enum value.
      Returns:
      The corresponding enum value if the given label matches one.