Package net.sf.tweety.arg.saf.syntax
Class ArgumentStructure
- java.lang.Object
-
- net.sf.tweety.arg.dung.syntax.Argument
-
- net.sf.tweety.arg.saf.syntax.ArgumentStructure
-
- All Implemented Interfaces:
Iterable<BasicArgument>,Collection<BasicArgument>,net.sf.tweety.arg.dung.syntax.DungEntity,net.sf.tweety.commons.Formula,net.sf.tweety.graphs.Node
public class ArgumentStructure extends net.sf.tweety.arg.dung.syntax.Argument implements Collection<BasicArgument>
This class models an argument structure, i.e. a minimal (with respect to set inclusion) conflict-free sequence of basic arguments AS = [A1, ... ,An] such that for any Ai and for any p in supp(Ai) there is an Aj with j > i and claim(Aj) = p.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description ArgumentStructure()Creates a new empty argument structure.ArgumentStructure(String name)Deprecated.ArgumentStructure(List<BasicArgument> arguments)Creates a new argument structure with the given list of arguments.
-
Method Summary
Modifier and Type Method Description booleanadd(BasicArgument e)booleanaddAll(Collection<? extends BasicArgument> c)booleanattacks(ArgumentStructure other, StructuredArgumentationFramework saf)Checks whether this argument structure attacks the other argument structure, i.e.voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object obj)net.sf.tweety.logics.pl.syntax.PropositiongetClaim()Returns the claim of this argument structure, i.e.BasicArgumentgetTop()Returns the first basic arguments of this argument structureinthashCode()booleanisEmpty()booleanisValid(StructuredArgumentationFramework saf)Checks whether this argument structure is valid wrt.Iterator<BasicArgument>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T> T[]toArray(T[] a)StringtoString()-
Methods inherited from class net.sf.tweety.arg.dung.syntax.Argument
getLdoArgument, getLdoFormula, getName, getSignature, setName
-
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
-
ArgumentStructure
@Deprecated public ArgumentStructure(String name)
Deprecated.Deprecated for argument structures.- Parameters:
name- a string
-
ArgumentStructure
public ArgumentStructure()
Creates a new empty argument structure.
-
ArgumentStructure
public ArgumentStructure(List<BasicArgument> arguments)
Creates a new argument structure with the given list of arguments.- Parameters:
arguments- a list of basic arguments.
-
-
Method Detail
-
isValid
public boolean isValid(StructuredArgumentationFramework saf)
Checks whether this argument structure is valid wrt. to the given structured argumentation framework, i.e. whether it is a minimal (with respect to set inclusion) conflict-free sequence of basic arguments AS = [A1, ... ,An] such that for any Ai and for any p in supp(Ai) there is an Aj with j > i and claim(Aj) = p.- Parameters:
saf- a structured argumentation framework.- Returns:
- "true" iff this argument structure is valid.
-
attacks
public boolean attacks(ArgumentStructure other, StructuredArgumentationFramework saf)
Checks whether this argument structure attacks the other argument structure, i.e. whether getTop(this) attacks some basic argument "a" in "other" wrt. "saf".- Parameters:
other- an argument structuresaf- a structured argumentation framework- Returns:
- "true" if this attacks "other".
-
getClaim
public net.sf.tweety.logics.pl.syntax.Proposition getClaim()
Returns the claim of this argument structure, i.e. the claim of its first basic argument.- Returns:
- the claim of this argument structure or "null" if it is empty.
-
getTop
public BasicArgument getTop()
Returns the first basic arguments of this argument structure- Returns:
- the first basic argument or "null" if this is empty.
-
add
public boolean add(BasicArgument e)
- Specified by:
addin interfaceCollection<BasicArgument>
-
addAll
public boolean addAll(Collection<? extends BasicArgument> c)
- Specified by:
addAllin interfaceCollection<BasicArgument>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<BasicArgument>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<BasicArgument>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<BasicArgument>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<BasicArgument>
-
iterator
public Iterator<BasicArgument> iterator()
- Specified by:
iteratorin interfaceCollection<BasicArgument>- Specified by:
iteratorin interfaceIterable<BasicArgument>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<BasicArgument>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<BasicArgument>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<BasicArgument>
-
size
public int size()
- Specified by:
sizein interfaceCollection<BasicArgument>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<BasicArgument>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<BasicArgument>
-
toString
public String toString()
- Overrides:
toStringin classnet.sf.tweety.arg.dung.syntax.Argument
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<BasicArgument>- Overrides:
hashCodein classnet.sf.tweety.arg.dung.syntax.Argument
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCollection<BasicArgument>- Overrides:
equalsin classnet.sf.tweety.arg.dung.syntax.Argument
-
-