Interface TypedStructure
- All Known Implementing Classes:
ASPOperator.ClingoPredicate
,ASPOperator.DLVPredicate
,EqualityPredicate
,FolActionName
,FolFluentName
,Functor
,InequalityPredicate
,PlPredicate
,Predicate
,TypedStructureAdapter
public interface TypedStructure
This interface defines method which are given by every TypedStructure like a
Predicate or an Functor. It has an name, an arity (argument count) and a list
of Sort representing the types for the different arguments.
- Author:
- Tim Janus
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArgumentType
(Sort argType) Adds the given Sort as argument type to the typed Structureclone()
Creates a deep copy of this objectint
getArity()
getName()
boolean
boolean
isTyped()
removeArgumentType
(int index) Removes the argument type at the specified indexboolean
removeArgumentType
(Sort argType) Removes the given Sort from the list of argument typesvoid
Changes the name of the Structure
-
Method Details
-
getName
String getName()- Returns:
- the unique name of the structure
-
setName
Changes the name of the Structure- Parameters:
name
- The new name of the structure- Throws:
LanguageException
- if the new name is illegal in the language.
-
getArity
int getArity()- Returns:
- the arity of this structure
-
getArgumentTypes
-
addArgumentType
Adds the given Sort as argument type to the typed Structure- Parameters:
argType
- The Sort descibing the argument type- Throws:
LanguageException
- if there is some language issue
-
removeArgumentType
Removes the argument type at the specified index- Parameters:
index
- The index- Returns:
- A reference to the sort that has been remove or null if no sort has been removed.
- Throws:
LanguageException
- if something is wrong with the language
-
removeArgumentType
Removes the given Sort from the list of argument types- Parameters:
argType
- The Sort which is removed- Returns:
- true if the Sort exists in the list of argument types and is successfully removed, false otherwise.
- Throws:
LanguageException
- if there is some language issue
-
isTyped
boolean isTyped()- Returns:
- true if at least one sort for an argument is not "Thing".
-
isComplete
boolean isComplete()- Returns:
- true if the arity of this structure matches the length of it's arguments, false if the arity is bigger than the length of it's arguments.
-
clone
-