Enum Class RiskMatrix.RiskLevel

java.lang.Object
java.lang.Enum<RiskMatrix.RiskLevel>
neqsim.process.safety.risk.RiskMatrix.RiskLevel
All Implemented Interfaces:
Serializable, Comparable<RiskMatrix.RiskLevel>, Constable
Enclosing class:
RiskMatrix

public static enum RiskMatrix.RiskLevel extends Enum<RiskMatrix.RiskLevel>
Risk level categories.
Version:
1.0
Author:
NeqSim Development Team
  • Enum Constant Details

  • Field Details

    • name

      private final String name
    • color

      private final String color
    • minScore

      private final int minScore
    • maxScore

      private final int maxScore
  • Constructor Details

    • RiskLevel

      private RiskLevel(String name, String color, int minScore, int maxScore)
  • Method Details

    • values

      public static RiskMatrix.RiskLevel[] 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 RiskMatrix.RiskLevel 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
    • getName

      public String getName()
    • getColor

      public String getColor()
    • fromScore

      public static RiskMatrix.RiskLevel fromScore(int score)
      Gets risk level from risk score.
      Parameters:
      score - risk score (probability * consequence)
      Returns:
      risk level