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()
Namedpublic final int arity()
Operatorpublic final boolean bindVarsAt(int n)
OperatorbindVarsAt in interface Operatorpublic final boolean isRigid()
Operatorprotected abstract boolean additionalValidTopLevel(Term term)
public boolean validTopLevel(Term term)
OperatorvalidTopLevel in interface OperatorTerm is valid.public java.lang.String toString()
toString in class java.lang.Object