T - The type of the formulas which are saved by the
associative formula support.public class AssociativeFormulaSupport<T extends SimpleLogicalFormula> extends ComplexLogicalFormulaAdapter implements AssociativeFormula<T>
| Modifier and Type | Class and Description |
|---|---|
static interface |
AssociativeFormulaSupport.AssociativeSupportBridge
This interface defines a bridge between the AssociativeFormula
implementation like a concrete Disjunction and the AssociativeFormulaSupport
object which adds the implementation of the common functionality.
|
| Constructor and Description |
|---|
AssociativeFormulaSupport(AssociativeFormulaSupport.AssociativeSupportBridge bridge)
Ctor: Creates a AssociativeFormulaSupport object that uses the
given bridge
|
AssociativeFormulaSupport(AssociativeFormulaSupport<T> other)
Copy-Ctor creates a deep copy of the associative formula support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T element) |
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
void |
clear() |
AssociativeFormulaSupport<T> |
clone()
Creates a deep copy of this formula
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Collection<T> |
copyHelper(Collection<T> collection)
This method generates a deep copy of the given collection of RelationalFormula
|
boolean |
equals(Object other) |
T |
get(int index) |
Set<? extends Atom> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
List<T> |
getFormulas() |
<C extends SimpleLogicalFormula> |
getFormulas(Class<C> cls)
Process the formulas of type C that are children of this associative
formula
|
Class<? extends Predicate> |
getPredicateCls() |
Set<? extends Predicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
net.sf.tweety.commons.Signature |
getSignature() |
Set<Term<?>> |
getTerms() |
<C extends Term<?>> |
getTerms(Class<C> cls)
Processes the set containing all terms of type C.
|
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
boolean |
isWellFormed()
Checks if this formula is well formed in the logical langauge.
|
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
int |
size() |
List<T> |
subList(int fromIndex,
int toIndex) |
ComplexLogicalFormula |
substitute(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
Object[] |
toArray() |
<C> C[] |
toArray(C[] a) |
String |
toString() |
containsTermsOfType, exchange, isGround, isLiteral, substitutefinalize, getClass, notify, notifyAll, wait, wait, waitisLiteralreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic AssociativeFormulaSupport(AssociativeFormulaSupport.AssociativeSupportBridge bridge)
bridge - public AssociativeFormulaSupport(AssociativeFormulaSupport<T> other)
other - public Collection<T> copyHelper(Collection<T> collection)
collection - The collection of RelationalFormula to copypublic List<T> getFormulas()
getFormulas in interface AssociativeFormula<T extends SimpleLogicalFormula>public <C extends SimpleLogicalFormula> Set<C> getFormulas(Class<C> cls)
AssociativeFormulagetFormulas in interface AssociativeFormula<T extends SimpleLogicalFormula>cls - the class structure defining the type of formulas which
are searched.public Set<? extends Atom> getAtoms()
SimpleLogicalFormulagetAtoms in interface SimpleLogicalFormulapublic Set<? extends Predicate> getPredicates()
SimpleLogicalFormulagetPredicates in interface SimpleLogicalFormulapublic net.sf.tweety.commons.Signature getSignature()
getSignature in interface net.sf.tweety.commons.Formulapublic boolean equals(Object other)
equals in interface Collection<T extends SimpleLogicalFormula>equals in interface List<T extends SimpleLogicalFormula>equals in interface SimpleLogicalFormulaequals in class Objectpublic int hashCode()
hashCode in interface Collection<T extends SimpleLogicalFormula>hashCode in interface List<T extends SimpleLogicalFormula>hashCode in interface SimpleLogicalFormulahashCode in class Objectpublic AssociativeFormulaSupport<T> clone()
SimpleLogicalFormulaclone in interface ComplexLogicalFormulaclone in interface SimpleLogicalFormulaclone in class ComplexLogicalFormulaAdapterpublic Set<Term<?>> getTerms()
getTerms in interface LogicStructurepublic <C extends Term<?>> Set<C> getTerms(Class<C> cls)
LogicStructuregetTerms in interface LogicStructuregetTerms in class ComplexLogicalFormulaAdaptercls - The Class structure containing type information about the
searched termpublic ComplexLogicalFormula substitute(Term<?> v, Term<?> t) throws IllegalArgumentException
ComplexLogicalFormulasubstitute in interface ComplexLogicalFormulav - the term to be substituted.t - the term to substitute.IllegalArgumentException - if "v" and "t" are of different sortspublic boolean isWellFormed()
ComplexLogicalFormulaisWellFormed in interface ComplexLogicalFormulaisWellFormed in class ComplexLogicalFormulaAdapterpublic boolean add(T e)
add in interface Collection<T extends SimpleLogicalFormula>add in interface List<T extends SimpleLogicalFormula>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T extends SimpleLogicalFormula>addAll in interface List<T extends SimpleLogicalFormula>public void clear()
clear in interface Collection<T extends SimpleLogicalFormula>clear in interface List<T extends SimpleLogicalFormula>public boolean contains(Object o)
contains in interface Collection<T extends SimpleLogicalFormula>contains in interface List<T extends SimpleLogicalFormula>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T extends SimpleLogicalFormula>containsAll in interface List<T extends SimpleLogicalFormula>public boolean isEmpty()
isEmpty in interface Collection<T extends SimpleLogicalFormula>isEmpty in interface List<T extends SimpleLogicalFormula>public Iterator<T> iterator()
iterator in interface Iterable<T extends SimpleLogicalFormula>iterator in interface Collection<T extends SimpleLogicalFormula>iterator in interface List<T extends SimpleLogicalFormula>public boolean remove(Object o)
remove in interface Collection<T extends SimpleLogicalFormula>remove in interface List<T extends SimpleLogicalFormula>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T extends SimpleLogicalFormula>removeAll in interface List<T extends SimpleLogicalFormula>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T extends SimpleLogicalFormula>retainAll in interface List<T extends SimpleLogicalFormula>public int size()
size in interface Collection<T extends SimpleLogicalFormula>size in interface List<T extends SimpleLogicalFormula>public Object[] toArray()
toArray in interface Collection<T extends SimpleLogicalFormula>toArray in interface List<T extends SimpleLogicalFormula>public <C> C[] toArray(C[] a)
toArray in interface Collection<T extends SimpleLogicalFormula>toArray in interface List<T extends SimpleLogicalFormula>public Class<? extends Predicate> getPredicateCls()
getPredicateCls in interface SimpleLogicalFormulapublic void add(int index,
T element)
add in interface List<T extends SimpleLogicalFormula>public boolean addAll(int index,
Collection<? extends T> c)
addAll in interface List<T extends SimpleLogicalFormula>public T get(int index)
get in interface List<T extends SimpleLogicalFormula>public int indexOf(Object o)
indexOf in interface List<T extends SimpleLogicalFormula>public int lastIndexOf(Object o)
lastIndexOf in interface List<T extends SimpleLogicalFormula>public ListIterator<T> listIterator()
listIterator in interface List<T extends SimpleLogicalFormula>public ListIterator<T> listIterator(int index)
listIterator in interface List<T extends SimpleLogicalFormula>public T remove(int index)
remove in interface List<T extends SimpleLogicalFormula>public T set(int index, T element)
set in interface List<T extends SimpleLogicalFormula>Copyright © 2018. All rights reserved.