Enum JohnsonEventLevel

  • All Implemented Interfaces:
    Serializable, Comparable<JohnsonEventLevel>

    @ParametersAreNonnullByDefault
    public enum JohnsonEventLevel
    extends Enum<JohnsonEventLevel>
    The Johnson event levels defined by this product. Motivation: enum values are more typesafe than strings. TestJohnsonEventLevel ensures that this file remains in sync with johnson-config.xml.
    Since:
    6.5.0
    • Method Detail

      • values

        public static JohnsonEventLevel[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JohnsonEventLevel c : JohnsonEventLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JohnsonEventLevel valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • withName

        public static JohnsonEventLevel withName​(String levelName)
        Returns the enum value with the given level name.
        Parameters:
        levelName - the name to match upon (case-insensitively)
        Returns:
        see above
        Throws:
        IllegalArgumentException - if the name is unknown
      • isAtLeast

        public boolean isAtLeast​(JohnsonEventLevel minimumLevel)
        Indicates whether this event level is at least as severe as the given level.
        Parameters:
        minimumLevel - the minimum level to check against
        Returns:
        see above
      • levelName

        public @NonNull String levelName()
        Returns the name of the event level for this enum value.
        Returns:
        see above
      • level

        public @NonNull com.atlassian.johnson.event.EventLevel level()
        Returns the Johnson-typed event level for this enum value.
        Returns:
        see above