public abstract class LdoAssociativeFormula extends LdoFormula implements AssociativeFormula<LdoFormula>, AssociativeFormulaSupport.AssociativeSupportBridge, java.util.Collection<LdoFormula>
Modifier and Type | Field and Description |
---|---|
protected AssociativeFormulaSupport<LdoFormula> |
support
The inner formulas of this formula
|
Constructor and Description |
---|
LdoAssociativeFormula()
Creates a new (empty) associative formula.
|
LdoAssociativeFormula(java.util.Collection<? extends LdoFormula> formulas)
Creates a new associative formula with the given inner formulas.
|
LdoAssociativeFormula(LdoFormula first,
LdoFormula second)
Creates a new associative formula with the two given formulae
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
LdoFormula element) |
boolean |
add(LdoFormula f) |
boolean |
addAll(java.util.Collection<? extends LdoFormula> c) |
boolean |
addAll(int index,
java.util.Collection<? extends LdoFormula> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
Signature |
createEmptySignature() |
boolean |
equals(java.lang.Object obj) |
LdoFormula |
get(int index) |
java.util.Set<LdoArgument> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
java.util.List<LdoFormula> |
getFormulas() |
<C extends SimpleLogicalFormula> |
getFormulas(java.lang.Class<C> cls)
Process the formulas of type C that are children of this associative
formula
|
java.util.Set<LdoFormula> |
getLiterals()
Returns all literals, i.e.
|
java.util.Set<PropositionalPredicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
DungSignature |
getSignature()
Returns the signature of the language of this formula.
|
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<LdoFormula> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<LdoFormula> |
listIterator() |
java.util.ListIterator<LdoFormula> |
listIterator(int index) |
LdoFormula |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
LdoFormula |
set(int index,
LdoFormula element) |
int |
size() |
java.util.List<LdoFormula> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
java.lang.String |
toString() |
clone, combineWithAnd, combineWithOr, complement, getDividers, getPredicateCls, getUniformProbability, isLiteral
finalize, getClass, notify, notifyAll, wait, wait, wait
clone, getPredicateCls, isLiteral
createEmptyFormula, getEmptySymbol, getOperatorSymbol
protected AssociativeFormulaSupport<LdoFormula> support
public LdoAssociativeFormula()
public LdoAssociativeFormula(java.util.Collection<? extends LdoFormula> formulas)
formulas
- a collection of formulas.public LdoAssociativeFormula(LdoFormula first, LdoFormula second)
first
- a propositional formula.second
- a propositional formula.public java.util.Set<PropositionalPredicate> getPredicates()
SimpleLogicalFormula
getPredicates
in interface SimpleLogicalFormula
getPredicates
in class LdoFormula
public java.util.List<LdoFormula> getFormulas()
getFormulas
in interface AssociativeFormula<LdoFormula>
public <C extends SimpleLogicalFormula> java.util.Set<C> getFormulas(java.lang.Class<C> cls)
AssociativeFormula
getFormulas
in interface AssociativeFormula<LdoFormula>
cls
- the class structure defining the type of formulas which
are searched.public java.util.Set<LdoArgument> getAtoms()
SimpleLogicalFormula
getAtoms
in interface SimpleLogicalFormula
getAtoms
in class LdoFormula
public java.util.Set<LdoFormula> getLiterals()
LdoFormula
getLiterals
in class LdoFormula
public java.lang.String toString()
toString
in class java.lang.Object
public DungSignature getSignature()
Formula
getSignature
in interface Formula
getSignature
in class LdoFormula
public Signature createEmptySignature()
createEmptySignature
in interface AssociativeFormulaSupport.AssociativeSupportBridge
public int hashCode()
hashCode
in interface java.util.Collection<LdoFormula>
hashCode
in interface java.util.List<LdoFormula>
hashCode
in interface SimpleLogicalFormula
hashCode
in class LdoFormula
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection<LdoFormula>
equals
in interface java.util.List<LdoFormula>
equals
in interface SimpleLogicalFormula
equals
in class LdoFormula
public boolean add(LdoFormula f)
add
in interface java.util.Collection<LdoFormula>
add
in interface java.util.List<LdoFormula>
public boolean addAll(java.util.Collection<? extends LdoFormula> c)
addAll
in interface java.util.Collection<LdoFormula>
addAll
in interface java.util.List<LdoFormula>
public void clear()
clear
in interface java.util.Collection<LdoFormula>
clear
in interface java.util.List<LdoFormula>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<LdoFormula>
contains
in interface java.util.List<LdoFormula>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<LdoFormula>
containsAll
in interface java.util.List<LdoFormula>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<LdoFormula>
isEmpty
in interface java.util.List<LdoFormula>
public java.util.Iterator<LdoFormula> iterator()
iterator
in interface java.lang.Iterable<LdoFormula>
iterator
in interface java.util.Collection<LdoFormula>
iterator
in interface java.util.List<LdoFormula>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<LdoFormula>
remove
in interface java.util.List<LdoFormula>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<LdoFormula>
removeAll
in interface java.util.List<LdoFormula>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<LdoFormula>
retainAll
in interface java.util.List<LdoFormula>
public int size()
size
in interface java.util.Collection<LdoFormula>
size
in interface java.util.List<LdoFormula>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<LdoFormula>
toArray
in interface java.util.List<LdoFormula>
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection<LdoFormula>
toArray
in interface java.util.List<LdoFormula>
public void add(int index, LdoFormula element)
add
in interface java.util.List<LdoFormula>
public boolean addAll(int index, java.util.Collection<? extends LdoFormula> c)
addAll
in interface java.util.List<LdoFormula>
public LdoFormula get(int index)
get
in interface java.util.List<LdoFormula>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<LdoFormula>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<LdoFormula>
public java.util.ListIterator<LdoFormula> listIterator()
listIterator
in interface java.util.List<LdoFormula>
public java.util.ListIterator<LdoFormula> listIterator(int index)
listIterator
in interface java.util.List<LdoFormula>
public LdoFormula remove(int index)
remove
in interface java.util.List<LdoFormula>
public LdoFormula set(int index, LdoFormula element)
set
in interface java.util.List<LdoFormula>
public java.util.List<LdoFormula> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<LdoFormula>