Class AssociativePlFormula

    • Constructor Detail

      • AssociativePlFormula

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

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

        public AssociativePlFormula​(PlFormula first,
                                    PlFormula 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<PlFormula>
        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<PlFormula> getLiterals()
        Description copied from class: PlFormula
        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 PlFormula
        Returns:
        all literals appearing in this formula.
      • toString

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

        public PlSignature getSignature()
        Description copied from interface: Formula
        Returns the signature of the language of this formula.
        Specified by:
        getSignature in interface Formula
        Overrides:
        getSignature in class PlFormula
        Returns:
        the signature of the language of this formula.
      • numberOfOccurrences

        public int numberOfOccurrences​(Proposition p)
        Description copied from class: PlFormula
        Returns the number of occurrences of the given proposition within this formula
        Specified by:
        numberOfOccurrences in class PlFormula
        Parameters:
        p - some proposition
        Returns:
        the number of occurrences of the given proposition within this formula
      • add

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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