abstract class AbstractOperator extends java.lang.Object implements Operator
Modifier and Type | Field and Description |
---|---|
private int |
arity |
private boolean |
isRigid |
private Name |
name |
private ImmutableArray<java.lang.Boolean> |
whereToBind |
Modifier | Constructor and Description |
---|---|
protected |
AbstractOperator(Name name,
int arity,
boolean isRigid) |
protected |
AbstractOperator(Name name,
int arity,
java.lang.Boolean[] whereToBind,
boolean isRigid) |
protected |
AbstractOperator(Name name,
int arity,
ImmutableArray<java.lang.Boolean> whereToBind,
boolean isRigid) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
additionalValidTopLevel(Term term)
Allows subclasses to impose custom demands on what constitutes a
valid term using the operator represented by the subclass.
|
int |
arity()
the arity of this operator
|
boolean |
bindVarsAt(int n)
Tells whether the operator binds variables at the n-th subterm.
|
boolean |
isRigid()
Tells whether the operator is rigid.
|
Name |
name()
returns the name of this element
|
java.lang.String |
toString() |
boolean |
validTopLevel(Term term)
Checks whether the top level structure of the given @link Term
is syntactically valid, given the assumption that the top level
operator of the term is the same as this Operator.
|
protected ImmutableArray<java.lang.Boolean> |
whereToBind() |
private final Name name
private final int arity
private final ImmutableArray<java.lang.Boolean> whereToBind
private final boolean isRigid
protected AbstractOperator(Name name, int arity, ImmutableArray<java.lang.Boolean> whereToBind, boolean isRigid)
protected AbstractOperator(Name name, int arity, java.lang.Boolean[] whereToBind, boolean isRigid)
protected AbstractOperator(Name name, int arity, boolean isRigid)
protected final ImmutableArray<java.lang.Boolean> whereToBind()
public final Name name()
Named
public final int arity()
Operator
public final boolean bindVarsAt(int n)
Operator
bindVarsAt
in interface Operator
public final boolean isRigid()
Operator
protected abstract boolean additionalValidTopLevel(Term term)
public boolean validTopLevel(Term term)
Operator
validTopLevel
in interface Operator
Term
is valid.public java.lang.String toString()
toString
in class java.lang.Object