Package net.sf.tweety.arg.aba.semantics
Class AbaExtension<T extends Formula>
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<AbaTheory<T>,Assumption<T>>
-
- net.sf.tweety.arg.aba.semantics.AbaExtension<T>
-
- Type Parameters:
T
- The type of formulas
- All Implemented Interfaces:
java.lang.Iterable<Assumption<T>>
,java.util.Collection<Assumption<T>>
,Interpretation<AbaTheory<T>,Assumption<T>>
public class AbaExtension<T extends Formula> extends AbstractInterpretation<AbaTheory<T>,Assumption<T>> implements java.util.Collection<Assumption<T>>
This class models an ABA Extension, meaning a set of assumptions.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description AbaExtension()
Default constructorAbaExtension(java.util.Collection<Assumption<T>> assumptions)
Creates a new extension with the given assumptions.
-
Method Summary
Modifier and Type Method Description boolean
add(Assumption<T> e)
boolean
addAll(java.util.Collection<? extends Assumption<T>> c)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isEmpty()
java.util.Iterator<Assumption<T>>
iterator()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
boolean
satisfies(AbaTheory<T> beliefBase)
Checks whether this interpretation satisfies the given knowledge base.boolean
satisfies(Assumption<T> formula)
Checks whether this interpretation satisfies the given formula.int
size()
java.lang.Object[]
toArray()
<R> R[]
toArray(R[] a)
java.lang.String
toString()
-
Methods inherited from class net.sf.tweety.commons.AbstractInterpretation
satisfies
-
-
-
-
Constructor Detail
-
AbaExtension
public AbaExtension()
Default constructor
-
AbaExtension
public AbaExtension(java.util.Collection<Assumption<T>> assumptions)
Creates a new extension with the given assumptions.- Parameters:
assumptions
- a set of assumptions
-
-
Method Detail
-
satisfies
public boolean satisfies(Assumption<T> formula) throws java.lang.IllegalArgumentException
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given formula.- Specified by:
satisfies
in interfaceInterpretation<AbaTheory<T extends Formula>,Assumption<T extends Formula>>
- 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(AbaTheory<T> beliefBase) throws java.lang.IllegalArgumentException
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfies
in interfaceInterpretation<AbaTheory<T extends Formula>,Assumption<T extends Formula>>
- 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.
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<Assumption<T>> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <R> R[] toArray(R[] a)
-
add
public boolean add(Assumption<T> e)
-
remove
public boolean remove(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends Assumption<T>> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
hashCode
public int hashCode()
-
equals
public boolean equals(java.lang.Object obj)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-