Enum Class WrapperProperty.Existence

java.lang.Object
java.lang.Enum<WrapperProperty.Existence>
io.github.valentinherrmann.levenshtein.WrapperProperty.Existence
All Implemented Interfaces:
Serializable, Comparable<WrapperProperty.Existence>, Constable
Enclosing class:
WrapperProperty<T>

public static enum WrapperProperty.Existence extends Enum<WrapperProperty.Existence>
Enumeration representing the existence state of a property.

UNCHECKED means "unknown" and never takes part in "worst state wins" aggregation (see worst(Existence, Existence)). The remaining states are ordered by their explicit severity(), not by their declaration order.

  • Enum Constant Details

  • Method Details

    • values

      public static WrapperProperty.Existence[] 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 WrapperProperty.Existence 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
    • severity

      public int severity()
      Returns:
      the severity used for aggregation; -1 for UNCHECKED
    • worst

      Returns the worse of two states. UNCHECKED is ignored: it only results if both states are unchecked.
      Parameters:
      a - first state
      b - second state
      Returns:
      the state with the higher severity, ignoring unchecked states