public class DLPHead extends DLPElementAdapter implements AssociativeFormula<DLPLiteral>, Disjunctable, ComplexLogicalFormula, AssociativeFormulaSupport.AssociativeSupportBridge
| Modifier and Type | Field and Description |
|---|---|
private AssociativeFormulaSupport<DLPLiteral> |
assocSupport |
| Constructor and Description |
|---|
DLPHead()
Default-Ctor: Generates empty head
|
DLPHead(DLPHead other)
Copy-Ctor: Generates a deep copy from the given head
|
DLPHead(DLPLiteral literal)
Ctor: Generates a head with one literal
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(DLPLiteral arg0) |
void |
add(int index,
DLPLiteral element) |
boolean |
addAll(java.util.Collection<? extends DLPLiteral> arg0) |
boolean |
addAll(int index,
java.util.Collection<? extends DLPLiteral> c) |
void |
clear() |
DLPHead |
clone()
Creates a deep copy of this formula
|
SimpleLogicalFormula |
combineWithOr(Disjunctable f) |
boolean |
contains(java.lang.Object arg0) |
boolean |
containsAll(java.util.Collection<?> arg0) |
<T extends SimpleLogicalFormula> |
createEmptyFormula() |
Signature |
createEmptySignature() |
boolean |
equals(java.lang.Object other) |
DLPLiteral |
get(int index) |
java.util.Set<DLPAtom> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
java.lang.String |
getEmptySymbol() |
java.util.List<DLPLiteral> |
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.SortedSet<DLPLiteral> |
getLiterals() |
java.lang.String |
getOperatorSymbol() |
java.lang.Class<? extends Predicate> |
getPredicateCls() |
java.util.Set<DLPPredicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
FolSignature |
getSignature()
Returns the signature of the language of this formula.
|
java.util.Set<Term<?>> |
getTerms() |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<DLPLiteral> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<DLPLiteral> |
listIterator() |
java.util.ListIterator<DLPLiteral> |
listIterator(int index) |
DLPLiteral |
remove(int index) |
boolean |
remove(java.lang.Object arg0) |
boolean |
removeAll(java.util.Collection<?> arg0) |
boolean |
retainAll(java.util.Collection<?> arg0) |
DLPLiteral |
set(int index,
DLPLiteral element) |
int |
size() |
java.util.List<DLPLiteral> |
subList(int fromIndex,
int toIndex) |
DLPHead |
substitute(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] arg0) |
java.lang.String |
toString() |
containsTermsOfType, exchange, getTerms, isGround, isLiteral, isWellFormed, substitutefinalize, getClass, notify, notifyAll, wait, wait, waitexchange, isGround, isWellFormed, substituteisLiteralcontainsTermsOfType, getTermsprivate AssociativeFormulaSupport<DLPLiteral> assocSupport
public DLPHead()
public DLPHead(DLPLiteral literal)
literal - The literal of the headpublic DLPHead(DLPHead other)
other - The DLPHead object which acts as source for the copy operation.public java.util.Set<DLPAtom> getAtoms()
SimpleLogicalFormulagetAtoms in interface SimpleLogicalFormulagetAtoms in interface DLPElementpublic java.util.Set<DLPPredicate> getPredicates()
SimpleLogicalFormulagetPredicates in interface SimpleLogicalFormulagetPredicates in interface DLPElementpublic java.lang.Class<? extends Predicate> getPredicateCls()
getPredicateCls in interface SimpleLogicalFormulagetPredicateCls in class DLPElementAdapterpublic FolSignature getSignature()
FormulagetSignature in interface FormulagetSignature in interface DLPElementpublic java.util.List<DLPLiteral> getFormulas()
getFormulas in interface AssociativeFormula<DLPLiteral>public <C extends SimpleLogicalFormula> java.util.Set<C> getFormulas(java.lang.Class<C> cls)
AssociativeFormulagetFormulas in interface AssociativeFormula<DLPLiteral>cls - the class structure defining the type of formulas which
are searched.public DLPHead substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
ComplexLogicalFormulasubstitute in interface ComplexLogicalFormulasubstitute in interface DLPElementv - the term to be substituted.t - the term to substitute.java.lang.IllegalArgumentException - if "v" and "t" are of different sortspublic SimpleLogicalFormula combineWithOr(Disjunctable f)
combineWithOr in interface Disjunctablef - a formula to be combined with OR and this.public <T extends SimpleLogicalFormula> AssociativeFormula<T> createEmptyFormula()
createEmptyFormula in interface AssociativeFormulaSupport.AssociativeSupportBridgepublic Signature createEmptySignature()
createEmptySignature in interface AssociativeFormulaSupport.AssociativeSupportBridgepublic java.lang.String getOperatorSymbol()
getOperatorSymbol in interface AssociativeFormulaSupport.AssociativeSupportBridgepublic java.lang.String getEmptySymbol()
getEmptySymbol in interface AssociativeFormulaSupport.AssociativeSupportBridgepublic DLPHead clone()
SimpleLogicalFormulaclone in interface ComplexLogicalFormulaclone in interface SimpleLogicalFormulaclone in interface DLPElementclone in class DLPElementAdapterpublic java.util.SortedSet<DLPLiteral> getLiterals()
getLiterals in interface DLPElementpublic boolean equals(java.lang.Object other)
equals in interface java.util.Collection<DLPLiteral>equals in interface java.util.List<DLPLiteral>equals in interface SimpleLogicalFormulaequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<DLPLiteral>hashCode in interface java.util.List<DLPLiteral>hashCode in interface SimpleLogicalFormulahashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean add(DLPLiteral arg0)
add in interface java.util.Collection<DLPLiteral>add in interface java.util.List<DLPLiteral>public boolean addAll(java.util.Collection<? extends DLPLiteral> arg0)
addAll in interface java.util.Collection<DLPLiteral>addAll in interface java.util.List<DLPLiteral>public void clear()
clear in interface java.util.Collection<DLPLiteral>clear in interface java.util.List<DLPLiteral>public boolean contains(java.lang.Object arg0)
contains in interface java.util.Collection<DLPLiteral>contains in interface java.util.List<DLPLiteral>public boolean containsAll(java.util.Collection<?> arg0)
containsAll in interface java.util.Collection<DLPLiteral>containsAll in interface java.util.List<DLPLiteral>public boolean isEmpty()
isEmpty in interface java.util.Collection<DLPLiteral>isEmpty in interface java.util.List<DLPLiteral>public java.util.Iterator<DLPLiteral> iterator()
iterator in interface java.lang.Iterable<DLPLiteral>iterator in interface java.util.Collection<DLPLiteral>iterator in interface java.util.List<DLPLiteral>public boolean remove(java.lang.Object arg0)
remove in interface java.util.Collection<DLPLiteral>remove in interface java.util.List<DLPLiteral>public boolean removeAll(java.util.Collection<?> arg0)
removeAll in interface java.util.Collection<DLPLiteral>removeAll in interface java.util.List<DLPLiteral>public boolean retainAll(java.util.Collection<?> arg0)
retainAll in interface java.util.Collection<DLPLiteral>retainAll in interface java.util.List<DLPLiteral>public int size()
size in interface java.util.Collection<DLPLiteral>size in interface java.util.List<DLPLiteral>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<DLPLiteral>toArray in interface java.util.List<DLPLiteral>public <T> T[] toArray(T[] arg0)
toArray in interface java.util.Collection<DLPLiteral>toArray in interface java.util.List<DLPLiteral>public java.util.Set<Term<?>> getTerms()
getTerms in interface LogicStructurepublic void add(int index,
DLPLiteral element)
add in interface java.util.List<DLPLiteral>public boolean addAll(int index,
java.util.Collection<? extends DLPLiteral> c)
addAll in interface java.util.List<DLPLiteral>public DLPLiteral get(int index)
get in interface java.util.List<DLPLiteral>public int indexOf(java.lang.Object o)
indexOf in interface java.util.List<DLPLiteral>public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<DLPLiteral>public java.util.ListIterator<DLPLiteral> listIterator()
listIterator in interface java.util.List<DLPLiteral>public java.util.ListIterator<DLPLiteral> listIterator(int index)
listIterator in interface java.util.List<DLPLiteral>public DLPLiteral remove(int index)
remove in interface java.util.List<DLPLiteral>public DLPLiteral set(int index, DLPLiteral element)
set in interface java.util.List<DLPLiteral>public java.util.List<DLPLiteral> subList(int fromIndex, int toIndex)
subList in interface java.util.List<DLPLiteral>