Class LdoArgument

    • Constructor Detail

      • LdoArgument

        public LdoArgument()
        Default-Ctor for dynamic instantiation
      • LdoArgument

        public LdoArgument​(java.lang.String name)
        Creates a new proposition of the given name.
        name - the name of the proposition.
      • LdoArgument

        public LdoArgument​(LdoArgument other)
    • Method Detail

      • getArgument

        public Argument getArgument()
        Returns an argument representation (in Dung-style) of this LdoArgument.
        an argument representation (in Dung-style) of this LdoArgument.
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Atom
        the name of this proposition.
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • addArgument

        public void addArgument​(Term<?> arg)
        Description copied from interface: Atom
        Adds an argument to the atom's argument list
        Specified by:
        addArgument in interface Atom
        arg - The next argument
      • getArguments

        public java.util.List<? extends Term<?>> getArguments()
        Specified by:
        getArguments in interface Atom
        A list containing all the arguments of this specific atom
      • isComplete

        public boolean isComplete()
        Specified by:
        isComplete in interface Atom
        true if the size of the argument list is equal to the arity of the predicate
      • getLiterals

        public java.util.Set<LdoFormula> getLiterals()
        Description copied from class: LdoFormula
        Returns all literals, i.e. all formulas of the form "a" or "!a" where "a" is a proposition, that appear in this formula.
        Specified by:
        getLiterals in class LdoFormula
        all literals appearing in this formula.
      • setPredicate

        public Atom.RETURN_SET_PREDICATE setPredicate​(Predicate predicate)
        Description copied from interface: Atom
        Changes the predicate of the atom. Given an old Predicate po and a new predicate pn with their list of arguments types at(po) and at(pn) and the arguments of this Atom: arg(this) this method distinguishes between three cases: 1. The predicate only differ in the names, returning RSP_SUCCESS 2. The old predicates argument types is a sub-list of the new argument types then the method returns RSP_INCOMPLETE and the atoms isComplete() method returns false 3. The new predicates argument types is a sub-list of the old argument types then the method returns RSP_TRUNCATED and the arguments of this atom are truncated too and isComplete() returns true. 4. The old and new predicates' argument types differ then the list of arguments of the atom get cleared and isComplete() returns false.
        Specified by:
        setPredicate in interface Atom
        predicate - some predicate
        Depends on the cases described above: 1. RSP_SUCCESS 2. RSP_INCOMPLETE 3. RSP_TRUNCATED 4. RSP_CLEARED
      • compareTo

        public int compareTo​(LdoArgument o)
        Specified by:
        compareTo in interface java.lang.Comparable<LdoArgument>