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
ConstructorsConstructorDescriptionCreates a new empty extension.Extension(Collection<? extends Argument> arguments)Creates a new extension with the given set of arguments. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Argument> arg0)voidclear()intbooleanbooleancontainsAll(Collection<?> arg0)booleangetArgumentsOfStatus(ArgumentStatus status)Returns all arguments that have the given status in this interpretation.inthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> arg0)booleanretainAll(Collection<?> arg0)booleansatisfies(ArgumentationFramework beliefBase)Checks whether this interpretation satisfies the given knowledge base.intsize()Object[]toArray()<T> T[]toArray(T[] arg0)toString()Methods inherited from class org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation
satisfiesMethods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfiesMethods 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:
toStringin classAbstractArgumentationInterpretation
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Argument>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<Argument>- Overrides:
equalsin classObject
-
getArgumentsOfStatus
Description copied from class:AbstractArgumentationInterpretationReturns all arguments that have the given status in this interpretation.- Specified by:
getArgumentsOfStatusin classAbstractArgumentationInterpretation- Parameters:
status- the status of the arguments to be returned.- Returns:
- the set of arguments with the given status.
-
add
- Specified by:
addin interfaceCollection<Argument>
-
addAll
- Specified by:
addAllin interfaceCollection<Argument>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Argument>
-
contains
- Specified by:
containsin interfaceCollection<Argument>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Argument>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Argument>
-
iterator
-
remove
- Specified by:
removein interfaceCollection<Argument>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Argument>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Argument>
-
size
public int size()- Specified by:
sizein interfaceCollection<Argument>
-
toArray
- Specified by:
toArrayin interfaceCollection<Argument>
-
toArray
public <T> T[] toArray(T[] arg0)- Specified by:
toArrayin interfaceCollection<Argument>
-
compareTo
- Specified by:
compareToin interfaceComparable<Extension>
-
satisfies
Description copied from interface:InterpretationChecks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfiesin interfaceInterpretation<ArgumentationFramework,Argument>- Overrides:
satisfiesin 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.
-