Enum Class RequirementLevel

java.lang.Object
java.lang.Enum<RequirementLevel>
io.github.chrimle.exceptionfactory.RequirementLevel
All Implemented Interfaces:
Serializable, Comparable<RequirementLevel>, Constable

public enum RequirementLevel extends Enum<RequirementLevel>
Keywords to indicate requirement levels, as described in RFC 2119.
Since:
0.3.0
Author:
Chrimle
  • Enum Constant Details

    • MAY

      public static final RequirementLevel MAY
      Synonymous with OPTIONAL.

      Definition

      "This word, or the adjective "OPTIONAL", mean that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option MUST be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.)"

      - RFC 2119 Section 5

      Since:
      0.3.0
      See Also:
    • MUST

      public static final RequirementLevel MUST
      Synonymous with SHALL and REQUIRED.

      Definition

      "This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification."

      - RFC 2119 Section 1

      Since:
      0.3.0
      See Also:
    • MUST_NOT

      public static final RequirementLevel MUST_NOT
      Synonymous with SHALL_NOT.

      Definition

      "This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification."

      - RFC 2119 Section 2

      Since:
      0.3.0
      See Also:
    • OPTIONAL

      public static final RequirementLevel OPTIONAL
      Synonymous with MAY.
      Since:
      0.3.0
      See Also:
    • REQUIRED

      public static final RequirementLevel REQUIRED
      Synonymous with MUST and SHALL.
      Since:
      0.3.0
      See Also:
    • SHALL

      public static final RequirementLevel SHALL
      Synonymous with MUST and REQUIRED.
      Since:
      0.3.0
      See Also:
    • SHALL_NOT

      public static final RequirementLevel SHALL_NOT
      Synonymous with MUST_NOT.
      Since:
      0.3.0
      See Also:
    • SHOULD

      public static final RequirementLevel SHOULD
      Synonymous with RECOMMENDED.

      Definition

      "This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course."

      - RFC 2119 Section 3

      Since:
      0.3.0
      See Also:
    • SHOULD_NOT

      public static final RequirementLevel SHOULD_NOT
      Synonymous with NOT_RECOMMENDED.

      Definition

      "This phrase, or the phrase "NOT_RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label."

      - RFC 2119 Section 4

      Since:
      0.3.0
      See Also:
  • Method Details

    • values

      public static RequirementLevel[] 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 RequirementLevel 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
    • toString

      public String toString()
      Overrides:
      toString in class Enum<RequirementLevel>