Class AssociativeDlFormula
java.lang.Object
org.tweetyproject.logics.dl.syntax.ComplexConcept
org.tweetyproject.logics.dl.syntax.AssociativeDlFormula
- All Implemented Interfaces:
- Iterable<ComplexConcept>,- Collection<ComplexConcept>,- List<ComplexConcept>,- Formula,- AssociativeFormulaSupport.AssociativeSupportBridge,- AssociativeFormula<ComplexConcept>,- ClassicalFormula,- Conjunctable,- Disjunctable,- Invertable,- ProbabilityAware,- SimpleLogicalFormula
- Direct Known Subclasses:
- Intersection,- Union
public abstract class AssociativeDlFormula
extends ComplexConcept
implements AssociativeFormula<ComplexConcept>, AssociativeFormulaSupport.AssociativeSupportBridge
This class captures the common functionalities of description logic associative formulas 
 (union and intersection).
- Author:
- Anna Gessler, Matthias Thimm, Tim Janus
- 
Constructor SummaryConstructorsConstructorDescriptionCreates 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 SummaryModifier and TypeMethodDescriptionvoidadd(int index, ComplexConcept element) booleanbooleanadd(ComplexConcept... formulas) Adds the specified elements to the end of this collection (optional operation).booleanaddAll(int index, Collection<? extends ComplexConcept> c) booleanaddAll(Collection<? extends ComplexConcept> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanget(int index) <C extends SimpleLogicalFormula>
 Set<C>getFormulas(Class<C> cls) Process the formulas of type C that are children of this associative formulaProcesses the set of all predicates which appear in this formulaReturns the signature of the language of this formula.inthashCode()intbooleanisEmpty()booleaniterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) set(int index, ComplexConcept element) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class org.tweetyproject.logics.dl.syntax.ComplexConceptclone, collapseAssociativeFormulas, combineWithAnd, combineWithOr, complement, getAtoms, getPredicateCls, getUniformProbabilityMethods inherited from interface org.tweetyproject.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridgecreateEmptyFormula, getEmptySymbol, getOperatorSymbolMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.ListreplaceAll, sort, spliteratorMethods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone, getAtoms, getPredicateCls
- 
Constructor Details- 
AssociativeDlFormulapublic AssociativeDlFormula()Creates a new (empty) associative formula.
- 
AssociativeDlFormulaCreates a new associative formula with the two given formulae- Parameters:
- first- a relational formula.
- second- a relational formula.
 
- 
AssociativeDlFormulaCreates a new associative formula with the given inner formulas.- Parameters:
- formulas- a collection of formulas.
 
 
- 
- 
Method Details- 
createEmptySignature- Specified by:
- createEmptySignaturein interface- AssociativeFormulaSupport.AssociativeSupportBridge
- Returns:
- An empty signature of the language of the AssociativeFormula implementation
 
- 
getSignatureDescription copied from interface:FormulaReturns the signature of the language of this formula.- Specified by:
- getSignaturein interface- Formula
- Specified by:
- getSignaturein class- ComplexConcept
- Returns:
- the signature of the language of this formula.
 
- 
getPredicatesDescription copied from interface:SimpleLogicalFormulaProcesses the set of all predicates which appear in this formula- Specified by:
- getPredicatesin interface- SimpleLogicalFormula
- Specified by:
- getPredicatesin class- ComplexConcept
- Returns:
- all predicates that appear in this formula
 
- 
isLiteralpublic boolean isLiteral()- Specified by:
- isLiteralin interface- SimpleLogicalFormula
- Returns:
- true if the formula represents a literal in the language or false otherwise
 
- 
hashCodepublic int hashCode()- Specified by:
- hashCodein interface- Collection<ComplexConcept>
- Specified by:
- hashCodein interface- List<ComplexConcept>
- Specified by:
- hashCodein interface- SimpleLogicalFormula
- Specified by:
- hashCodein class- ComplexConcept
 
- 
equals- Specified by:
- equalsin interface- Collection<ComplexConcept>
- Specified by:
- equalsin interface- List<ComplexConcept>
- Specified by:
- equalsin interface- SimpleLogicalFormula
- Specified by:
- equalsin class- ComplexConcept
 
- 
getFormulas- Specified by:
- getFormulasin interface- AssociativeFormula<ComplexConcept>
- Returns:
- all the formulas saved as childs in the associative formula
 
- 
getFormulasDescription copied from interface:AssociativeFormulaProcess the formulas of type C that are children of this associative formula- Specified by:
- getFormulasin interface- AssociativeFormula<ComplexConcept>
- 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
 
- 
toString
- 
add- Specified by:
- addin interface- Collection<ComplexConcept>
- Specified by:
- addin interface- List<ComplexConcept>
 
- 
addAdds the specified elements to the end of this collection (optional operation).- Parameters:
- formulas- to be appended to collection
- Returns:
- true if all elements were added, false otherwise
 
- 
addAll- Specified by:
- addAllin interface- Collection<ComplexConcept>
- Specified by:
- addAllin interface- List<ComplexConcept>
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Collection<ComplexConcept>
- Specified by:
- clearin interface- List<ComplexConcept>
 
- 
contains- Specified by:
- containsin interface- Collection<ComplexConcept>
- Specified by:
- containsin interface- List<ComplexConcept>
 
- 
containsAll- Specified by:
- containsAllin interface- Collection<ComplexConcept>
- Specified by:
- containsAllin interface- List<ComplexConcept>
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Collection<ComplexConcept>
- Specified by:
- isEmptyin interface- List<ComplexConcept>
 
- 
iterator- Specified by:
- iteratorin interface- Collection<ComplexConcept>
- Specified by:
- iteratorin interface- Iterable<ComplexConcept>
- Specified by:
- iteratorin interface- List<ComplexConcept>
 
- 
remove- Specified by:
- removein interface- Collection<ComplexConcept>
- Specified by:
- removein interface- List<ComplexConcept>
 
- 
removeAll- Specified by:
- removeAllin interface- Collection<ComplexConcept>
- Specified by:
- removeAllin interface- List<ComplexConcept>
 
- 
retainAll- Specified by:
- retainAllin interface- Collection<ComplexConcept>
- Specified by:
- retainAllin interface- List<ComplexConcept>
 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<ComplexConcept>
- Specified by:
- sizein interface- List<ComplexConcept>
 
- 
toArray- Specified by:
- toArrayin interface- Collection<ComplexConcept>
- Specified by:
- toArrayin interface- List<ComplexConcept>
 
- 
toArraypublic <T> T[] toArray(T[] a) - Specified by:
- toArrayin interface- Collection<ComplexConcept>
- Specified by:
- toArrayin interface- List<ComplexConcept>
 
- 
add- Specified by:
- addin interface- List<ComplexConcept>
 
- 
addAll- Specified by:
- addAllin interface- List<ComplexConcept>
 
- 
get- Specified by:
- getin interface- List<ComplexConcept>
 
- 
indexOf- Specified by:
- indexOfin interface- List<ComplexConcept>
 
- 
lastIndexOf- Specified by:
- lastIndexOfin interface- List<ComplexConcept>
 
- 
listIterator- Specified by:
- listIteratorin interface- List<ComplexConcept>
 
- 
listIterator- Specified by:
- listIteratorin interface- List<ComplexConcept>
 
- 
remove- Specified by:
- removein interface- List<ComplexConcept>
 
- 
set- Specified by:
- setin interface- List<ComplexConcept>
 
- 
subList- Specified by:
- subListin interface- List<ComplexConcept>
 
 
-