Enum Class RiskMatrix.ProbabilityCategory

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

public static enum RiskMatrix.ProbabilityCategory extends Enum<RiskMatrix.ProbabilityCategory>
Probability categories (1-5).
Version:
1.0
Author:
NeqSim Development Team
  • Enum Constant Details

  • Field Details

    • level

      private final int level
    • name

      private final String name
    • minFreq

      private final double minFreq
    • maxFreq

      private final double maxFreq
  • Constructor Details

    • ProbabilityCategory

      private ProbabilityCategory(int level, String name, double minFreq, double maxFreq)
  • Method Details

    • values

      public static RiskMatrix.ProbabilityCategory[] 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.ProbabilityCategory 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
    • getLevel

      public int getLevel()
    • getName

      public String getName()
    • fromFrequency

      public static RiskMatrix.ProbabilityCategory fromFrequency(double failuresPerYear)
      Gets category from failure frequency.
      Parameters:
      failuresPerYear - failures per year
      Returns:
      probability category