Package net.sf.tweety.logics.dl.syntax
Class AssociativeDlFormula
- java.lang.Object
-
- net.sf.tweety.logics.dl.syntax.ComplexConcept
-
- net.sf.tweety.logics.dl.syntax.AssociativeDlFormula
-
- All Implemented Interfaces:
Iterable<ComplexConcept>,Collection<ComplexConcept>,List<ComplexConcept>,net.sf.tweety.commons.Formula,net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridge,net.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<ComplexConcept>,net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Invertable,net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
- Direct Known Subclasses:
Intersection,Union
public abstract class AssociativeDlFormula extends ComplexConcept implements net.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<ComplexConcept>, net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridge
This class captures the common functionalities of description logic associative formulas (union and intersection).- Author:
- Anna Gessler, Matthias Thimm, Tim Janus
-
-
Field Summary
Fields Modifier and Type Field Description protected net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport<ComplexConcept>supportThis helper class implements most of the common functionality of an associative formula, so the implementation can delegate the method calls to the support class.
-
Constructor Summary
Constructors Constructor Description AssociativeDlFormula()Creates a new (empty) associative formula.AssociativeDlFormula(Collection<? extends ComplexConcept> formulas)Creates a new associative formula with the given inner formulas.AssociativeDlFormula(ComplexConcept first, ComplexConcept second)Creates a new associative formula with the two given formulae
-
Method Summary
Modifier and Type Method Description voidadd(int index, ComplexConcept element)booleanadd(ComplexConcept e)booleanaddAll(int index, Collection<? extends ComplexConcept> c)booleanaddAll(Collection<? extends ComplexConcept> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)net.sf.tweety.commons.SignaturecreateEmptySignature()booleanequals(Object obj)ComplexConceptget(int index)List<ComplexConcept>getFormulas()<C extends net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula>
Set<C>getFormulas(Class<C> cls)Set<net.sf.tweety.logics.commons.syntax.Predicate>getPredicates()DlSignaturegetSignature()inthashCode()intindexOf(Object o)booleanisEmpty()booleanisLiteral()Iterator<ComplexConcept>iterator()intlastIndexOf(Object o)ListIterator<ComplexConcept>listIterator()ListIterator<ComplexConcept>listIterator(int index)ComplexConceptremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)ComplexConceptset(int index, ComplexConcept element)intsize()List<ComplexConcept>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)StringtoString()-
Methods inherited from class net.sf.tweety.logics.dl.syntax.ComplexConcept
clone, collapseAssociativeFormulas, combineWithAnd, combineWithOr, complement, getAtoms, getPredicateCls, getUniformProbability
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridge
createEmptyFormula, getEmptySymbol, getOperatorSymbol
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
support
protected net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport<ComplexConcept> support
This helper class implements most of the common functionality of an associative formula, so the implementation can delegate the method calls to the support class.
-
-
Constructor Detail
-
AssociativeDlFormula
public AssociativeDlFormula()
Creates a new (empty) associative formula.
-
AssociativeDlFormula
public AssociativeDlFormula(ComplexConcept first, ComplexConcept second)
Creates a new associative formula with the two given formulae- Parameters:
first- a relational formula.second- a relational formula.
-
AssociativeDlFormula
public AssociativeDlFormula(Collection<? extends ComplexConcept> formulas)
Creates a new associative formula with the given inner formulas.- Parameters:
formulas- a collection of formulas.
-
-
Method Detail
-
createEmptySignature
public net.sf.tweety.commons.Signature createEmptySignature()
- Specified by:
createEmptySignaturein interfacenet.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridge
-
getSignature
public DlSignature getSignature()
- Specified by:
getSignaturein interfacenet.sf.tweety.commons.Formula- Specified by:
getSignaturein classComplexConcept
-
getPredicates
public Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
- Specified by:
getPredicatesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
getPredicatesin classComplexConcept
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteralin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<ComplexConcept>- Specified by:
hashCodein interfaceList<ComplexConcept>- Specified by:
hashCodein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
hashCodein classComplexConcept
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCollection<ComplexConcept>- Specified by:
equalsin interfaceList<ComplexConcept>- Specified by:
equalsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
equalsin classComplexConcept
-
getFormulas
public List<ComplexConcept> getFormulas()
- Specified by:
getFormulasin interfacenet.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<ComplexConcept>
-
getFormulas
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula> Set<C> getFormulas(Class<C> cls)
- Specified by:
getFormulasin interfacenet.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<ComplexConcept>
-
add
public boolean add(ComplexConcept e)
- Specified by:
addin interfaceCollection<ComplexConcept>- Specified by:
addin interfaceList<ComplexConcept>
-
addAll
public boolean addAll(Collection<? extends ComplexConcept> c)
- Specified by:
addAllin interfaceCollection<ComplexConcept>- Specified by:
addAllin interfaceList<ComplexConcept>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<ComplexConcept>- Specified by:
clearin interfaceList<ComplexConcept>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<ComplexConcept>- Specified by:
containsin interfaceList<ComplexConcept>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<ComplexConcept>- Specified by:
containsAllin interfaceList<ComplexConcept>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<ComplexConcept>- Specified by:
isEmptyin interfaceList<ComplexConcept>
-
iterator
public Iterator<ComplexConcept> iterator()
- Specified by:
iteratorin interfaceCollection<ComplexConcept>- Specified by:
iteratorin interfaceIterable<ComplexConcept>- Specified by:
iteratorin interfaceList<ComplexConcept>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<ComplexConcept>- Specified by:
removein interfaceList<ComplexConcept>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<ComplexConcept>- Specified by:
removeAllin interfaceList<ComplexConcept>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<ComplexConcept>- Specified by:
retainAllin interfaceList<ComplexConcept>
-
size
public int size()
- Specified by:
sizein interfaceCollection<ComplexConcept>- Specified by:
sizein interfaceList<ComplexConcept>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<ComplexConcept>- Specified by:
toArrayin interfaceList<ComplexConcept>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<ComplexConcept>- Specified by:
toArrayin interfaceList<ComplexConcept>
-
add
public void add(int index, ComplexConcept element)- Specified by:
addin interfaceList<ComplexConcept>
-
addAll
public boolean addAll(int index, Collection<? extends ComplexConcept> c)- Specified by:
addAllin interfaceList<ComplexConcept>
-
get
public ComplexConcept get(int index)
- Specified by:
getin interfaceList<ComplexConcept>
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOfin interfaceList<ComplexConcept>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<ComplexConcept>
-
listIterator
public ListIterator<ComplexConcept> listIterator()
- Specified by:
listIteratorin interfaceList<ComplexConcept>
-
listIterator
public ListIterator<ComplexConcept> listIterator(int index)
- Specified by:
listIteratorin interfaceList<ComplexConcept>
-
remove
public ComplexConcept remove(int index)
- Specified by:
removein interfaceList<ComplexConcept>
-
set
public ComplexConcept set(int index, ComplexConcept element)
- Specified by:
setin interfaceList<ComplexConcept>
-
subList
public List<ComplexConcept> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceList<ComplexConcept>
-
-