Class Extension
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<DefaultTheory,FolFormula>
-
- net.sf.tweety.logics.rdl.semantics.Extension
-
- All Implemented Interfaces:
java.lang.Iterable<FolFormula>,java.util.Collection<FolFormula>,Interpretation<DefaultTheory,FolFormula>
public class Extension extends AbstractInterpretation<DefaultTheory,FolFormula> implements java.util.Collection<FolFormula>
An extension of a default theory, i.e. a set of first-order formulas.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description Extension()Default constructorExtension(java.util.Collection<FolFormula> formulas)Creates a new extension with the given set of formulas.
-
Method Summary
Modifier and Type Method Description booleanadd(FolFormula e)booleanaddAll(java.util.Collection<? extends FolFormula> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanequals(java.lang.Object obj)inthashCode()booleanisEmpty()java.util.Iterator<FolFormula>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.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()java.lang.Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class net.sf.tweety.commons.AbstractInterpretation
satisfies
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
Extension
public Extension()
Default constructor
-
Extension
public Extension(java.util.Collection<FolFormula> formulas)
Creates a new extension with the given set of formulas.- Parameters:
formulas- some formulas.
-
-
Method Detail
-
satisfies
public boolean satisfies(FolFormula formula) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException- if the formula does not correspond to the expected language.
-
satisfies
public boolean satisfies(DefaultTheory beliefBase) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException- IllegalArgumentException if the knowledgebase does not correspond to the expected language.
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<FolFormula>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<FolFormula>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<FolFormula>
-
iterator
public java.util.Iterator<FolFormula> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<FolFormula>- Specified by:
iteratorin interfacejava.lang.Iterable<FolFormula>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<FolFormula>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfacejava.util.Collection<FolFormula>
-
add
public boolean add(FolFormula e)
- Specified by:
addin interfacejava.util.Collection<FolFormula>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<FolFormula>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<FolFormula>
-
addAll
public boolean addAll(java.util.Collection<? extends FolFormula> c)
- Specified by:
addAllin interfacejava.util.Collection<FolFormula>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<FolFormula>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<FolFormula>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<FolFormula>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<FolFormula>- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Collection<FolFormula>- Overrides:
equalsin classjava.lang.Object
-
-