public class Functor extends TypedStructureAdapter
Modifier and Type | Field and Description |
---|---|
private Sort |
targetSort
The sort of a functional term using this functor
|
Constructor and Description |
---|
Functor(java.lang.String name)
Initializes a functor of arity zero with the given name;
the target sort is initialized to Sort.THING.
|
Functor(java.lang.String name,
int arity)
Initializes a functor with the given name and of the given arity.
|
Functor(java.lang.String name,
java.util.List<Sort> arguments,
Sort targetSort)
Initializes a functor with the given name, the given list
of argument sorts, and the given target sort.
|
Modifier and Type | Method and Description |
---|---|
Functor |
clone()
Creates a deep copy of this object
|
boolean |
equals(java.lang.Object obj) |
Sort |
getTargetSort()
Returns the sort of this functor
|
int |
hashCode() |
addArgumentType, compareTo, copyArgumentTypes, getArgumentTypes, getArity, getName, isComplete, isTyped, removeArgumentType, removeArgumentType, setArity, setName, toString
private Sort targetSort
public Functor(java.lang.String name)
name
- the name of the functorpublic Functor(java.lang.String name, int arity)
name
- the name of the functorpublic Sort getTargetSort()
public int hashCode()
hashCode
in class TypedStructureAdapter
public boolean equals(java.lang.Object obj)
equals
in class TypedStructureAdapter
public Functor clone()
TypedStructure
clone
in interface TypedStructure
clone
in class TypedStructureAdapter