Class OutputField

java.lang.Object
org.tweetyproject.plugin.OutputField

public class OutputField extends Object
This class models individual fields used for the PluginOutput. Each field consists of a description and its corresponding value.

For example, in the following case:

 Query:
 a + b || !a + !b
 

"Query:" is the description and "a + b || !a + !b" is the value.

Authors: Bastian Wolf

  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an OutputField with an empty value and no description.
    Constructs an OutputField with the specified value and no description.
    OutputField(String description, String val)
    Constructs an OutputField with the specified description and value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Merges the description and value into a single string representation.

    Methods inherited from class java.lang.Object

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

    • OutputField

      public OutputField()
      Constructs an OutputField with an empty value and no description.
    • OutputField

      public OutputField(String val)
      Constructs an OutputField with the specified value and no description.
      Parameters:
      val - the value to be associated with this field.
    • OutputField

      public OutputField(String description, String val)
      Constructs an OutputField with the specified description and value.
      Parameters:
      description - the description of the field's value.
      val - the value to be associated with this field.
  • Method Details

    • merge

      public String merge()
      Merges the description and value into a single string representation.

      The resulting string is formatted as:

       description:
       value
       
      Returns:
      a string that merges the description and value.