Class LdoAssociativeFormula

    • Constructor Detail

      • LdoAssociativeFormula

        public LdoAssociativeFormula()
        Creates a new (empty) associative formula.
      • LdoAssociativeFormula

        public LdoAssociativeFormula​(java.util.Collection<? extends LdoFormula> formulas)
        Creates a new associative formula with the given inner formulas.
        Parameters:
        formulas - a collection of formulas.
      • LdoAssociativeFormula

        public LdoAssociativeFormula​(LdoFormula first,
                                     LdoFormula second)
        Creates a new associative formula with the two given formulae
        Parameters:
        first - a propositional formula.
        second - a propositional formula.
    • Method Detail

      • getFormulas

        public <C extends SimpleLogicalFormula> java.util.Set<C> getFormulas​(java.lang.Class<C> cls)
        Description copied from interface: AssociativeFormula
        Process the formulas of type C that are children of this associative formula
        Specified by:
        getFormulas in interface AssociativeFormula<LdoFormula>
        Type Parameters:
        C - the type of formulas
        Parameters:
        cls - the class structure defining the type of formulas which are searched.
        Returns:
        A set of formulas of type C which are members of the associative formula
      • 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
        Returns:
        all literals appearing in this formula.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • add

        public boolean add​(LdoFormula f)
        Specified by:
        add in interface java.util.Collection<LdoFormula>
        Specified by:
        add in interface java.util.List<LdoFormula>
      • add

        public boolean add​(LdoFormula... formulas)
        Adds the specified elements to the end of this collection (optional operation).
        Parameters:
        formulas - to be appended to collection
        Returns:
        true if all elements were added, false otherwise
      • addAll

        public boolean addAll​(java.util.Collection<? extends LdoFormula> c)
        Specified by:
        addAll in interface java.util.Collection<LdoFormula>
        Specified by:
        addAll in interface java.util.List<LdoFormula>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<LdoFormula>
        Specified by:
        clear in interface java.util.List<LdoFormula>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<LdoFormula>
        Specified by:
        contains in interface java.util.List<LdoFormula>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<LdoFormula>
        Specified by:
        containsAll in interface java.util.List<LdoFormula>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<LdoFormula>
        Specified by:
        isEmpty in interface java.util.List<LdoFormula>
      • iterator

        public java.util.Iterator<LdoFormula> iterator()
        Specified by:
        iterator in interface java.util.Collection<LdoFormula>
        Specified by:
        iterator in interface java.lang.Iterable<LdoFormula>
        Specified by:
        iterator in interface java.util.List<LdoFormula>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<LdoFormula>
        Specified by:
        remove in interface java.util.List<LdoFormula>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<LdoFormula>
        Specified by:
        removeAll in interface java.util.List<LdoFormula>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<LdoFormula>
        Specified by:
        retainAll in interface java.util.List<LdoFormula>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<LdoFormula>
        Specified by:
        size in interface java.util.List<LdoFormula>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<LdoFormula>
        Specified by:
        toArray in interface java.util.List<LdoFormula>
      • toArray

        public java.lang.Object[] toArray​(java.lang.Object[] a)
        Specified by:
        toArray in interface java.util.Collection<LdoFormula>
        Specified by:
        toArray in interface java.util.List<LdoFormula>
      • add

        public void add​(int index,
                        LdoFormula element)
        Specified by:
        add in interface java.util.List<LdoFormula>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends LdoFormula> c)
        Specified by:
        addAll in interface java.util.List<LdoFormula>
      • get

        public LdoFormula get​(int index)
        Specified by:
        get in interface java.util.List<LdoFormula>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<LdoFormula>
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<LdoFormula>
      • listIterator

        public java.util.ListIterator<LdoFormula> listIterator()
        Specified by:
        listIterator in interface java.util.List<LdoFormula>
      • listIterator

        public java.util.ListIterator<LdoFormula> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<LdoFormula>
      • remove

        public LdoFormula remove​(int index)
        Specified by:
        remove in interface java.util.List<LdoFormula>
      • subList

        public java.util.List<LdoFormula> subList​(int fromIndex,
                                                  int toIndex)
        Specified by:
        subList in interface java.util.List<LdoFormula>