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>
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintseverity()static WrapperProperty.ExistenceReturns the enum constant of this class with the specified name.static WrapperProperty.Existence[]values()Returns an array containing the constants of this enum class, in the order they are declared.static WrapperProperty.ExistenceReturns the worse of two states.
-
Enum Constant Details
-
UNCHECKED
Property has not yet been checked (unknown). -
EXACT
Property matches exactly with expected value -
DEVIATES
Property exists but deviates from expected value -
MISSING
Property is missing or does not match at all
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
severity
public int severity()- Returns:
- the severity used for aggregation;
-1forUNCHECKED
-
worst
public static WrapperProperty.Existence worst(WrapperProperty.Existence a, WrapperProperty.Existence b) Returns the worse of two states.UNCHECKEDis ignored: it only results if both states are unchecked.- Parameters:
a- first stateb- second state- Returns:
- the state with the higher severity, ignoring unchecked states
-