Serializable
, Cloneable
public class Sentence<T extends Term> extends Object implements Cloneable, Serializable
Modifier and Type | Field | Description |
---|---|---|
private int |
hash |
|
private CharSequence |
key |
caches the 'getKey()' result
|
boolean |
producedByTemporalInduction |
|
char |
punctuation |
The punctuation indicates the type of the Sentence:
Judgment '.', Question '?', Goal '!', or Quest '@'
|
private boolean |
revisible |
Whether the sentence can be revised
|
Stamp |
stamp |
Partial record of the derivation path
|
T |
term |
The content of a Sentence is a Term
|
TruthValue |
truth |
The truth value of Judgment, or desire value of Goal
|
Modifier | Constructor | Description |
---|---|---|
|
Sentence(T term,
char punctuation,
TruthValue newTruth,
Stamp newStamp) |
|
private |
Sentence(T _content,
char punctuation,
TruthValue truth,
Stamp stamp,
boolean normalize) |
Create a Sentence with the given fields
|
Modifier and Type | Method | Description |
---|---|---|
Sentence |
clone() |
Clone the Sentence
|
Sentence |
clone(boolean makeEternal) |
|
Sentence |
clone(Term t) |
clone with a different term
|
void |
discountConfidence(Parameters narParameters) |
discounts the truth value of the sentence
|
boolean |
equals(Object that) |
To check whether two sentences are equal
|
CharSequence |
getKey() |
Get a String representation of the sentence for key of Task and TaskLink
|
long |
getOccurenceTime() |
|
boolean |
getRevisible() |
|
int |
getTemporalOrder() |
|
T |
getTerm() |
|
TruthValue |
getTruth() |
|
int |
hashCode() |
To produce the hashcode of a sentence
|
boolean |
isEternal() |
|
boolean |
isGoal() |
|
boolean |
isJudgment() |
|
protected boolean |
isNotTermlinkNormalizer() |
|
boolean |
isQuest() |
|
boolean |
isQuestion() |
|
Sentence |
projection(long targetTime,
long currentTime,
Memory mem) |
project a judgment to a difference occurrence time
|
TruthValue |
projectionTruth(long targetTime,
long currentTime,
Memory mem) |
|
void |
setRevisible(boolean b) |
|
String |
toString() |
Get a String representation of the sentence
|
CharSequence |
toString(Nar nar,
boolean showStamp) |
public boolean producedByTemporalInduction
public final char punctuation
public final TruthValue truth
public final Stamp stamp
private boolean revisible
private CharSequence key
private final int hash
public Sentence(T term, char punctuation, TruthValue newTruth, Stamp newStamp)
private Sentence(T _content, char punctuation, TruthValue truth, Stamp stamp, boolean normalize)
_content
- The Term that forms the content of the sentencepunctuation
- The punctuation indicating the type of the sentencetruth
- The truth value of the sentence, null for questionstamp
- The stamp of the sentence indicating its derivation time and
baseprotected boolean isNotTermlinkNormalizer()
public boolean equals(Object that)
public int hashCode()
public Sentence clone()
public Sentence clone(boolean makeEternal)
public final Sentence clone(Term t)
t
- term which has to get clonedpublic Sentence projection(long targetTime, long currentTime, Memory mem)
targetTime
- The time to be projected intocurrentTime
- The current time as a referencepublic TruthValue projectionTruth(long targetTime, long currentTime, Memory mem)
public boolean isJudgment()
public boolean isQuestion()
public boolean isGoal()
public boolean isQuest()
public boolean getRevisible()
public void setRevisible(boolean b)
public int getTemporalOrder()
public long getOccurenceTime()
public String toString()
public CharSequence getKey()
public CharSequence toString(Nar nar, boolean showStamp)
nar
- Reasoner instanceshowStamp
- must the stamp get appended to the string?public void discountConfidence(Parameters narParameters)
public boolean isEternal()
public T getTerm()
public TruthValue getTruth()
Copyright © 2020 OpenNARS. All rights reserved.