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:
java.lang.Iterable<BasicArgument>,java.util.Collection<BasicArgument>,DungEntity,Formula,Node
public class ArgumentStructure extends Argument implements java.util.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
-
-
Field Summary
Fields Modifier and Type Field Description private Derivation<BasicArgument>derivationThe derivation of this argument structure
-
Constructor Summary
Constructors Constructor Description ArgumentStructure()Creates a new empty argument structure.ArgumentStructure(java.lang.String name)Deprecated.ArgumentStructure(java.util.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(java.util.Collection<? extends BasicArgument> c)booleanattacks(ArgumentStructure other, StructuredArgumentationFramework saf)Checks whether this argument structure attacks the other argument structure, i.e.voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanequals(java.lang.Object obj)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.java.util.Iterator<BasicArgument>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.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
-
-
-
-
Field Detail
-
derivation
private Derivation<BasicArgument> derivation
The derivation of this argument structure
-
-
Constructor Detail
-
ArgumentStructure
@Deprecated public ArgumentStructure(java.lang.String name)
Deprecated.Deprecated for argument structures.- Parameters:
name- a string
-
ArgumentStructure
public ArgumentStructure()
Creates a new empty argument structure.
-
ArgumentStructure
public ArgumentStructure(java.util.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 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 interfacejava.util.Collection<BasicArgument>
-
addAll
public boolean addAll(java.util.Collection<? extends BasicArgument> c)
- Specified by:
addAllin interfacejava.util.Collection<BasicArgument>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<BasicArgument>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<BasicArgument>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<BasicArgument>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<BasicArgument>
-
iterator
public java.util.Iterator<BasicArgument> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<BasicArgument>- Specified by:
iteratorin interfacejava.lang.Iterable<BasicArgument>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<BasicArgument>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<BasicArgument>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<BasicArgument>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<BasicArgument>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<BasicArgument>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfacejava.util.Collection<BasicArgument>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<BasicArgument>- Overrides:
hashCodein classArgument
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Collection<BasicArgument>- Overrides:
equalsin classArgument
-
-