nars.entity
Class Judgment

java.lang.Object
  extended by nars.entity.Sentence
      extended by nars.entity.Judgment
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Goal

public class Judgment
extends Sentence

A Judgment is an piece of new knowledge to be absorbed.


Field Summary
 
Fields inherited from class nars.entity.Sentence
bestSolution, content, input, punctuation, stamp, temporalOrder, truth
 
Constructor Summary
Judgment(Goal g)
          Construct a Judgment to indicate an operation just executed
Judgment(Term term, char punc, TruthValue t, Stamp b)
          Constructor
 
Method Summary
(package private)  boolean equivalentTo(Judgment that)
          Check whether the judgment is equivalent to another one
 boolean isFuture()
          Check if the judgment predict a future event
 float solutionQuality(Sentence problem)
          Evaluate the quality of the judgment as a solution to a problem
 
Methods inherited from class nars.entity.Sentence
clone, cloneContent, getBestSolution, getContent, getCreationTime, getEventTime, getStamp, getTense, getTruth, isInput, isJudgment, make, make, noOverlapping, setBestSolution, setContent, setInput, tenseToString, toKey, toString, toString2
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Judgment

public Judgment(Term term,
                char punc,
                TruthValue t,
                Stamp b)
Constructor

Parameters:
term - The content
punc - The punctuation
t - The truth value
b - The stamp

Judgment

public Judgment(Goal g)
Construct a Judgment to indicate an operation just executed

Parameters:
g - The goal that trigger the execution
Method Detail

equivalentTo

boolean equivalentTo(Judgment that)
Check whether the judgment is equivalent to another one

The two may have different keys

Parameters:
that - The other judgment
Returns:
Whether the two are equivalent

solutionQuality

public float solutionQuality(Sentence problem)
Evaluate the quality of the judgment as a solution to a problem

Parameters:
problem - A goal or question
Returns:
The quality of the judgment as the solution

isFuture

public boolean isFuture()
Check if the judgment predict a future event

Returns:
Whether the judgment has a future sense