Class Extension
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<DefaultTheory,FolFormula>
org.tweetyproject.logics.rdl.semantics.Extension
- All Implemented Interfaces:
Iterable<FolFormula>,Collection<FolFormula>,Interpretation<DefaultTheory,FolFormula>
public class Extension
extends AbstractInterpretation<DefaultTheory,FolFormula>
implements Collection<FolFormula>
An extension of a default theory, i.e. a set of first-order formulas.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorExtension(Collection<FolFormula> formulas) Creates a new extension with the given set of formulas. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(FolFormula e) booleanaddAll(Collection<? extends FolFormula> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) booleansatisfies(FolFormula formula) Checks whether this interpretation satisfies the given formula.booleansatisfies(DefaultTheory beliefBase) Checks whether this interpretation satisfies the given knowledge base.intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfiesMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
Extension
public Extension()Default constructor -
Extension
Creates a new extension with the given set of formulas.- Parameters:
formulas- some formulas.
-
-
Method Details
-
satisfies
Description copied from interface:InterpretationChecks whether this interpretation satisfies the given formula.- Specified by:
satisfiesin interfaceInterpretation<DefaultTheory,FolFormula> - Parameters:
formula- a formula .- Returns:
- "true" if this interpretation satisfies the given formula.
- Throws:
IllegalArgumentException- if the formula does not correspond to the expected language.
-
satisfies
Description copied from interface:InterpretationChecks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfiesin interfaceInterpretation<DefaultTheory,FolFormula> - Parameters:
beliefBase- a knowledge base.- Returns:
- "true" if this interpretation satisfies the given knowledge base.
- Throws:
IllegalArgumentException- IllegalArgumentException if the knowledgebase does not correspond to the expected language.
-
size
public int size()- Specified by:
sizein interfaceCollection<FolFormula>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<FolFormula>
-
contains
- Specified by:
containsin interfaceCollection<FolFormula>
-
iterator
- Specified by:
iteratorin interfaceCollection<FolFormula>- Specified by:
iteratorin interfaceIterable<FolFormula>
-
toArray
- Specified by:
toArrayin interfaceCollection<FolFormula>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<FolFormula>
-
add
- Specified by:
addin interfaceCollection<FolFormula>
-
remove
- Specified by:
removein interfaceCollection<FolFormula>
-
containsAll
- Specified by:
containsAllin interfaceCollection<FolFormula>
-
addAll
- Specified by:
addAllin interfaceCollection<FolFormula>
-
removeAll
- Specified by:
removeAllin interfaceCollection<FolFormula>
-
retainAll
- Specified by:
retainAllin interfaceCollection<FolFormula>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<FolFormula>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<FolFormula>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<FolFormula>- Overrides:
equalsin classObject
-