Package net.sf.tweety.arg.dung.semantics
Class Extension
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<DungTheory,Argument>
-
- net.sf.tweety.arg.dung.semantics.AbstractArgumentationInterpretation
-
- net.sf.tweety.arg.dung.semantics.Extension
-
- All Implemented Interfaces:
Comparable<Extension>,Iterable<Argument>,Collection<Argument>,net.sf.tweety.commons.Interpretation<DungTheory,Argument>
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
Constructors Constructor Description Extension()Creates a new empty extension.Extension(Collection<? extends Argument> arguments)Creates a new extension with the given set of arguments.
-
Method Summary
Modifier and Type Method Description booleanadd(Argument arg0)booleanaddAll(Collection<? extends Argument> arg0)voidclear()intcompareTo(Extension arg0)booleancontains(Object arg0)booleancontainsAll(Collection<?> arg0)booleanequals(Object obj)ExtensiongetArgumentsOfStatus(ArgumentStatus status)Returns all arguments that have the given status in this interpretation.inthashCode()booleanisEmpty()Iterator<Argument>iterator()booleanremove(Object arg0)booleanremoveAll(Collection<?> arg0)booleanretainAll(Collection<?> arg0)intsize()Object[]toArray()<T> T[]toArray(T[] arg0)StringtoString()-
Methods inherited from class net.sf.tweety.arg.dung.semantics.AbstractArgumentationInterpretation
isAcceptable, isAdmissable, isConflictFree, satisfies, satisfies
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
Extension
public Extension()
Creates a new empty extension.
-
Extension
public Extension(Collection<? extends Argument> arguments)
Creates a new extension with the given set of arguments.- Parameters:
arguments- a set of arguments
-
-
Method Detail
-
toString
public String toString()
- Specified by:
toStringin classAbstractArgumentationInterpretation
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<Argument>- Overrides:
hashCodein classObject
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCollection<Argument>- Overrides:
equalsin classObject
-
getArgumentsOfStatus
public Extension getArgumentsOfStatus(ArgumentStatus status)
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
public boolean add(Argument arg0)
- Specified by:
addin interfaceCollection<Argument>
-
addAll
public boolean addAll(Collection<? extends Argument> arg0)
- Specified by:
addAllin interfaceCollection<Argument>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Argument>
-
contains
public boolean contains(Object arg0)
- Specified by:
containsin interfaceCollection<Argument>
-
containsAll
public boolean containsAll(Collection<?> arg0)
- Specified by:
containsAllin interfaceCollection<Argument>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Argument>
-
remove
public boolean remove(Object arg0)
- Specified by:
removein interfaceCollection<Argument>
-
removeAll
public boolean removeAll(Collection<?> arg0)
- Specified by:
removeAllin interfaceCollection<Argument>
-
retainAll
public boolean retainAll(Collection<?> arg0)
- Specified by:
retainAllin interfaceCollection<Argument>
-
size
public int size()
- Specified by:
sizein interfaceCollection<Argument>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Argument>
-
toArray
public <T> T[] toArray(T[] arg0)
- Specified by:
toArrayin interfaceCollection<Argument>
-
compareTo
public int compareTo(Extension arg0)
- Specified by:
compareToin interfaceComparable<Extension>
-
-