Class Functor
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.TypedStructureAdapter
-
- net.sf.tweety.logics.commons.syntax.Functor
-
- All Implemented Interfaces:
java.lang.Comparable<TypedStructureAdapter>
,TypedStructure
public class Functor extends TypedStructureAdapter
A functor for logic language, i.e. an identifier for functional terms.- Author:
- Matthias Thimm, Tim Janus
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
-
Methods inherited from class net.sf.tweety.logics.commons.syntax.TypedStructureAdapter
addArgumentType, compareTo, getArgumentTypes, getArity, getName, isComplete, isTyped, removeArgumentType, removeArgumentType, setName
-
-
-
-
Constructor Detail
-
Functor
public Functor(java.lang.String name)
Initializes a functor of arity zero with the given name; the target sort is initialized to Sort.THING.- Parameters:
name
- the name of the functor
-
Functor
public Functor(java.lang.String name, int arity)
Initializes a functor with the given name and of the given arity. Every argument and the target gets the sort Sort.THING.- Parameters:
name
- the name of the functorarity
- the arity of the functor
-
Functor
public 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.- Parameters:
name
- the name of the functorarguments
- the sorts of the argumentstargetSort
- the sort of the range
-
-
Method Detail
-
getTargetSort
public Sort getTargetSort()
Returns the sort of this functor- Returns:
- the sort of this functor
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classTypedStructureAdapter
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classTypedStructureAdapter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classTypedStructureAdapter
-
clone
public Functor clone()
Description copied from interface:TypedStructure
Creates a deep copy of this object- Specified by:
clone
in interfaceTypedStructure
- Specified by:
clone
in classTypedStructureAdapter
- Returns:
- A deep copy of this object
-
-