Class SourcedValue

java.lang.Object
com.aquima.interactions.rule.SourcedValue
All Implemented Interfaces:
Serializable

public class SourcedValue extends Object implements Serializable
This class holds the inference result for a single attribute. The inference result consists of the attribute name the result belongs to, the value that was determined and optionally the justification.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • SourcedValue

      public SourcedValue(String target, IValue attributeValue)
      Constructs an sourced value with the name of the attribute, and the value that was determined.
      Parameters:
      target - The name of the attribute for which the value was determined.
      attributeValue - The value for the attribute.
    • SourcedValue

      public SourcedValue(String target, IValue attributeValue, String justificationId)
      Constructs a sourced value with the name of the attribute, the value, and a justification.
      Parameters:
      target - The name of the attribute for which the value was determined.
      attributeValue - The value for the attribute.
      justificationId - The justification ID of the value.
  • Method Details

    • getAttributeName

      public String getAttributeName()
      This method returns the name of the attribute for which the value was inferenced.
      Returns:
      the name of the attribute for which the value was inferenced.
    • getValue

      public IValue getValue()
      This method returns the value that was inferenced for the attribute.
      Returns:
      the value that was inferenced for the attribute.
    • getJustificationId

      public String getJustificationId()
      This method returns the justification ID of the inferenced value. The justification is optional, so this method might return null when no justification was provided.
      Returns:
      the justification ID of the inferenced value.
    • toString

      public String toString()
      Overrides:
      toString in class Object