Interface TypedStructure

    • Method Detail

      • getName

        java.lang.String getName()
        Returns:
        the unique name of the structure
      • setName

        void setName​(java.lang.String name)
              throws LanguageException
        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

        java.util.List<Sort> getArgumentTypes()
        Returns:
        An unmodifiable list which length equals the arity of the predicate if the structure isComplete().
      • addArgumentType

        void addArgumentType​(Sort argType)
                      throws LanguageException
        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

        Sort removeArgumentType​(int index)
                         throws LanguageException
        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

        boolean removeArgumentType​(Sort argType)
                            throws LanguageException
        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

        TypedStructure clone()
        Creates a deep copy of this object
        Returns:
        A deep copy of this object