Class Predicate
java.lang.Object
org.tweetyproject.logics.commons.syntax.TypedStructureAdapter
org.tweetyproject.logics.commons.syntax.Predicate
- All Implemented Interfaces:
Comparable<TypedStructureAdapter>,TypedStructure
- Direct Known Subclasses:
ASPOperator.ClingoPredicate,ASPOperator.DLVPredicate,EqualityPredicate,FolActionName,FolFluentName,InequalityPredicate,PlPredicate
A general predicate which contains an identifier that describes its meaning,
an argument count referred as arity and a list of sorts defining the types for
the arguments of the predicate.
Sub classes might forbid some of the general features to form a predicate which fits
another language. Force the arity to be zero gives an propositional predicate for
example.
- Author:
- Matthias Thimm, Tim Janus
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a predicate of arity zero with the given name;Initializes a predicate with the given name and of the given arity.Initializes a predicate with the given name and the given list of argument sorts. -
Method Summary
Methods inherited from class org.tweetyproject.logics.commons.syntax.TypedStructureAdapter
addArgumentType, compareTo, getArgumentTypes, getArity, getName, isComplete, isTyped, removeArgumentType, removeArgumentType, setName, toString
-
Constructor Details
-
Predicate
public Predicate() -
Predicate
Initializes a predicate of arity zero with the given name;- Parameters:
name- the name of the predicate
-
Predicate
Initializes a predicate with the given name and of the given arity. Every argument gets the sort Sort.THING.- Parameters:
name- the name of the predicatearity- the arity of the predicate
-
Predicate
Initializes a predicate with the given name and the given list of argument sorts.- Parameters:
name- the name of the predicatearguments- the sorts of the arguments
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classTypedStructureAdapter
-
equals
- Overrides:
equalsin classTypedStructureAdapter
-
clone
Description copied from interface:TypedStructureCreates a deep copy of this object- Specified by:
clonein interfaceTypedStructure- Specified by:
clonein classTypedStructureAdapter- Returns:
- A deep copy of this object
-