Enum DelpAnswer.Type

java.lang.Object
java.lang.Enum<DelpAnswer.Type>
org.tweetyproject.arg.delp.semantics.DelpAnswer.Type
All Implemented Interfaces:
Serializable, Comparable<DelpAnswer.Type>, Constable
Enclosing class:
DelpAnswer

public static enum DelpAnswer.Type extends Enum<DelpAnswer.Type>
The `Type` enum represents the possible types of answers: `YES`, `NO`, `UNDECIDED`, and `UNKNOWN`. Each type has an associated textual description.
  • Enum Constant Details

    • YES

      public static final DelpAnswer.Type YES
      Represents an affirmative answer.
    • NO

      public static final DelpAnswer.Type NO
      Represents a negative answer.
    • UNDECIDED

      public static final DelpAnswer.Type UNDECIDED
      Represents an undecided answer, indicating that the reasoner cannot determine a clear yes or no.
    • UNKNOWN

      public static final DelpAnswer.Type UNKNOWN
      Represents an unknown answer, typically used when the state of the answer is indeterminate or unclassified.
  • Method Details

    • values

      public static DelpAnswer.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DelpAnswer.Type valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns the textual description of the answer type.
      Overrides:
      toString in class Enum<DelpAnswer.Type>
      Returns:
      the textual description of the answer type.
    • getBooleanAnswer

      public boolean getBooleanAnswer()
      Returns the boolean representation of the answer type.
      Returns:
      `true` if the type is `YES`, otherwise `false`.
    • getDoubleAnswer

      public Double getDoubleAnswer()
      Returns the `Double` representation of the answer type.
      Returns:
      `0d` for `YES`, `-1d` for `NO`, `1d` for `UNDECIDED`, and `Double.NaN` for `UNKNOWN`.
      Throws:
      IllegalStateException - if the type cannot be converted to a `Double`.