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
ConstructorDescriptionDefault constructorExtension
(Collection<FolFormula> formulas) Creates a new extension with the given set of formulas. -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(FolFormula e) boolean
addAll
(Collection<? extends FolFormula> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) boolean
satisfies
(FolFormula formula) Checks whether this interpretation satisfies the given formula.boolean
satisfies
(DefaultTheory beliefBase) Checks whether this interpretation satisfies the given knowledge base.int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfies
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:Interpretation
Checks whether this interpretation satisfies the given formula.- Specified by:
satisfies
in 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:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfies
in 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:
size
in interfaceCollection<FolFormula>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<FolFormula>
-
contains
- Specified by:
contains
in interfaceCollection<FolFormula>
-
iterator
- Specified by:
iterator
in interfaceCollection<FolFormula>
- Specified by:
iterator
in interfaceIterable<FolFormula>
-
toArray
- Specified by:
toArray
in interfaceCollection<FolFormula>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<FolFormula>
-
add
- Specified by:
add
in interfaceCollection<FolFormula>
-
remove
- Specified by:
remove
in interfaceCollection<FolFormula>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<FolFormula>
-
addAll
- Specified by:
addAll
in interfaceCollection<FolFormula>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<FolFormula>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<FolFormula>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<FolFormula>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<FolFormula>
- Overrides:
hashCode
in classObject
-
equals
- Specified by:
equals
in interfaceCollection<FolFormula>
- Overrides:
equals
in classObject
-