Class AbaExtension<T extends Formula>
- java.lang.Object
-
- org.tweetyproject.commons.AbstractInterpretation<AbaTheory<T>,Assumption<T>>
-
- org.tweetyproject.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 booleanadd(Assumption<T> e)booleanaddAll(java.util.Collection<? extends Assumption<T>> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanequals(java.lang.Object obj)inthashCode()booleanisEmpty()java.util.Iterator<Assumption<T>>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)booleansatisfies(AbaTheory<T> beliefBase)Checks whether this interpretation satisfies the given knowledge base.booleansatisfies(Assumption<T> formula)Checks whether this interpretation satisfies the given formula.intsize()java.lang.Object[]toArray()<R> R[]toArray(R[] a)java.lang.StringtoString()-
Methods inherited from class org.tweetyproject.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:InterpretationChecks whether this interpretation satisfies the given formula.- Specified by:
satisfiesin 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:InterpretationChecks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfiesin 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:
toStringin classjava.lang.Object
-
-