public class PsiTerm extends OsfExpression
| Constructor and Description |
|---|
PsiTerm() |
PsiTerm(SortExpression sort) |
PsiTerm(java.lang.String sortName) |
PsiTerm(Tag tag) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContiguousPositionSubterm(PsiTerm psiterm)
This stores the provided term at the next contiguous position,
whether or not a term is already stored there.
|
PsiTerm |
deref() |
java.lang.String |
displayForm()
Returns a pretty-printed form of this ψ-term.
|
static boolean |
evaluateSorts()
Returns the current sort expression evaluation flag's value.
|
java.util.HashMap |
features() |
PsiTerm |
getNextContiguousPositionSubterm()
Returns the subterm at the next contiguous position if any, or
null) if there isn't any.
|
PsiTerm |
getSubterm(Feature feature)
This returns the subterm for the specified feature (which may be null).
|
PsiTerm |
getSubterm(int position)
This returns the subterm at the given position if there is one stored
there, or null otherwise, where positions are counted sarting
from 1.
|
int |
maxPosition() |
PsiTerm |
merge(PsiTerm other)
This merges the uninterpreted structure of the specified ψ-term
into this one's as explained in the specification, and returns this
ψ-term resulting after the merging.
|
ArrayList |
positions() |
java.lang.StringBuffer |
prettyPrint(int margin,
java.util.HashSet tags)
Returns a pretty printed form of this ψ-term, starting at the
specified margin width and the array list of already processed tags.
|
PsiTerm |
setSort(SortExpression sort)
Sets this ψ-term's sort expression to the provided one and
returns this ψ-term.
|
void |
setSubterm(Feature feature,
PsiTerm psiterm)
This stores the provided term for the specified feature, whether or
not a term is already stored there.
|
void |
setSubterm(int position,
PsiTerm psiterm)
This stores the provided ψ-term at the specified position
(counting positions from 1), whether or not a term is already
stored there.
|
PsiTerm |
setTag(Tag tag)
Set this tag's ψ-term to the specified tag, sets the
specified tag's term to this ψ-term, and returns this tag.
|
SortExpression |
sort()
Returns the sort expression of this ψ-term, or null
if none has been set for it yet.
|
Tag |
tag() |
static void |
toggleSortEvaluation()
Toggles sort expression evaluation.
|
context, setContextpublic PsiTerm()
public PsiTerm(Tag tag)
public PsiTerm(java.lang.String sortName)
public PsiTerm(SortExpression sort)
public Tag tag()
public PsiTerm deref()
public PsiTerm setTag(Tag tag)
public SortExpression sort()
public PsiTerm setSort(SortExpression sort)
public ArrayList positions()
public java.util.HashMap features()
public int maxPosition()
public PsiTerm getNextContiguousPositionSubterm()
public void addContiguousPositionSubterm(PsiTerm psiterm)
public PsiTerm getSubterm(int position)
public void setSubterm(int position,
PsiTerm psiterm)
public PsiTerm getSubterm(Feature feature)
public void setSubterm(Feature feature, PsiTerm psiterm)
public PsiTerm merge(PsiTerm other)
public java.lang.String displayForm()
displayForm in class OsfExpressionpublic static boolean evaluateSorts()
public static void toggleSortEvaluation()
public java.lang.StringBuffer prettyPrint(int margin,
java.util.HashSet tags)