public enum EquivalentClassReasoningMode extends Enum<EquivalentClassReasoningMode>
Enum of the three different equivalent class reasoning strategies. ALL means all equivalent classes detected are allowed. NONE means any equivalent class should fail, and ASSERTED_ONLY means that only if the inferred equivalence class has been previously asserted directly in the ontology is the equivalence class allowed.
This is also how the command line options are detected. For backwards compatibility, the old "true" is a synonym for ALL, and "false" is a synonym for NONE. The #validates(String) method detects if the given String is a synonym or the uncapitalized name of the enum instance. For example, either "all" or "true" would validate to the instance ALL.
Lastly, one of the enum instances can easily be returned from a string with the static #from(String) method. This is like a constructor. If the given string validates to any of the enum instances, then that instance is returned. By default ALL is returned. This is how a Mode instance should be retrieved from a string (say from the command line).
Enum Constant and Description |
---|
ALL
Allows all equivalent classes in the reason step.
|
ASSERTED_ONLY
Only allows directly asserted equivalent classes.
|
NONE
Does not allow any detected equivalent classes.
|
Modifier and Type | Method and Description |
---|---|
static EquivalentClassReasoningMode |
from(String s)
Canonical way to find make a Mode instance from a String (say from a command line argument).
|
String |
getExplanation()
Get the explanation.
|
boolean |
validates(String s)
Checks if the given string counts as this mode.
|
static EquivalentClassReasoningMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EquivalentClassReasoningMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
String |
written()
Change mode to command line format.
|
public static final EquivalentClassReasoningMode ALL
public static final EquivalentClassReasoningMode NONE
public static final EquivalentClassReasoningMode ASSERTED_ONLY
public static EquivalentClassReasoningMode[] values()
for (EquivalentClassReasoningMode c : EquivalentClassReasoningMode.values()) System.out.println(c);
public static EquivalentClassReasoningMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getExplanation()
public String written()
public boolean validates(String s)
s
- String to validatepublic static EquivalentClassReasoningMode from(String s)
s
- String to match to a Mode instance.Copyright © 2015–2020. All rights reserved.