Class KappaValue

java.lang.Object
org.tweetyproject.logics.cl.kappa.KappaValue
All Implemented Interfaces:
KappaTerm

public class KappaValue extends Object implements KappaTerm
Represents a Kappa-Value for the c-revision, it contains two KappaMin instances, both KappaValue and KappaMin implement the KappaTerm interface. Internally the value of the Kappa is represented using an integer and as long as the Kappa cannot be evaluated correctly its value member is -1.
Author:
Tim Janus
  • Constructor Summary

    Constructors
    Constructor
    Description
    KappaValue(int index, Conditional cond)
    Ctor: Generates a kappa value for the given Conditional with the given index.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tries to evaluate the kappa term, if the evaluation is successful then the next call of value returns the evaluated value.
    Get the full string.
    Processes all the sub-terms
    int
    Return The minimum value of this kappa term, such that the caller knows the kappa term is greater or equal the returned value.
     
    int
    Return The value of this kappa term or -1 if the kappa-term's evaluate() method returns false.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • KappaValue

      public KappaValue(int index, Conditional cond)
      Ctor: Generates a kappa value for the given Conditional with the given index.
      Parameters:
      index - an int
      cond - some conditional
  • Method Details

    • evaluate

      public boolean evaluate()
      Description copied from interface: KappaTerm
      Tries to evaluate the kappa term, if the evaluation is successful then the next call of value returns the evaluated value.
      Specified by:
      evaluate in interface KappaTerm
      Returns:
      True if the evaluation is sucessful, false otherwise
    • value

      public int value()
      Description copied from interface: KappaTerm
      Return The value of this kappa term or -1 if the kappa-term's evaluate() method returns false.
      Specified by:
      value in interface KappaTerm
      Returns:
      The value of this kappa term or -1 if the kappa-term's evaluate() method returns false.
    • greaterEqualThan

      public int greaterEqualThan()
      Description copied from interface: KappaTerm
      Return The minimum value of this kappa term, such that the caller knows the kappa term is greater or equal the returned value.
      Specified by:
      greaterEqualThan in interface KappaTerm
      Returns:
      The minimum value of this kappa term, such that the caller knows the kappa term is greater or equal the returned value.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fullString

      public String fullString()
      Get the full string.
      Returns:
      String
    • getSubTerms

      public Set<KappaTerm> getSubTerms()
      Description copied from interface: KappaTerm
      Processes all the sub-terms
      Specified by:
      getSubTerms in interface KappaTerm
      Returns:
      A set containing all the sub-terms of the kappa term