Class Extension
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<ArgumentationFramework,Argument>
org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation
org.tweetyproject.arg.dung.semantics.Extension
- All Implemented Interfaces:
Comparable<Extension>
,Iterable<Argument>
,Collection<Argument>
,Interpretation<ArgumentationFramework,Argument>
- Direct Known Subclasses:
ExecutableExtension
public class Extension
extends AbstractArgumentationInterpretation
implements Collection<Argument>, Comparable<Extension>
This class models a (possible) extension of a Dung theory, i.e. a set of arguments.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionCreates a new empty extension.Extension(Collection<? extends Argument> arguments)
Creates a new extension with the given set of arguments. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll(Collection<? extends Argument> arg0)
void
clear()
int
boolean
boolean
containsAll(Collection<?> arg0)
boolean
getArgumentsOfStatus(ArgumentStatus status)
Returns all arguments that have the given status in this interpretation.int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll(Collection<?> arg0)
boolean
retainAll(Collection<?> arg0)
boolean
satisfies(ArgumentationFramework beliefBase)
Checks whether this interpretation satisfies the given knowledge base.int
size()
Object[]
toArray()
<T> T[]
toArray(T[] arg0)
toString()
Methods inherited from class org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation
satisfies
Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfies
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
Extension
public Extension()Creates a new empty extension. -
Extension
Creates a new extension with the given set of arguments.- Parameters:
arguments
- a set of arguments
-
-
Method Details
-
toString
- Specified by:
toString
in classAbstractArgumentationInterpretation
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<Argument>
- Overrides:
hashCode
in classObject
-
equals
- Specified by:
equals
in interfaceCollection<Argument>
- Overrides:
equals
in classObject
-
getArgumentsOfStatus
Description copied from class:AbstractArgumentationInterpretation
Returns all arguments that have the given status in this interpretation.- Specified by:
getArgumentsOfStatus
in classAbstractArgumentationInterpretation
- Parameters:
status
- the status of the arguments to be returned.- Returns:
- the set of arguments with the given status.
-
add
- Specified by:
add
in interfaceCollection<Argument>
-
addAll
- Specified by:
addAll
in interfaceCollection<Argument>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Argument>
-
contains
- Specified by:
contains
in interfaceCollection<Argument>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Argument>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Argument>
-
iterator
-
remove
- Specified by:
remove
in interfaceCollection<Argument>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Argument>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Argument>
-
size
public int size()- Specified by:
size
in interfaceCollection<Argument>
-
toArray
- Specified by:
toArray
in interfaceCollection<Argument>
-
toArray
public <T> T[] toArray(T[] arg0)- Specified by:
toArray
in interfaceCollection<Argument>
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Extension>
-
satisfies
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfies
in interfaceInterpretation<ArgumentationFramework,Argument>
- Overrides:
satisfies
in classAbstractArgumentationInterpretation
- 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.
-