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
-
-
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 boolean
add(BasicArgument e)
boolean
addAll(java.util.Collection<? extends BasicArgument> c)
boolean
attacks(ArgumentStructure other, StructuredArgumentationFramework saf)
Checks whether this argument structure attacks the other argument structure, i.e.void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
boolean
equals(java.lang.Object obj)
Proposition
getClaim()
Returns the claim of this argument structure, i.e.BasicArgument
getTop()
Returns the first basic arguments of this argument structureint
hashCode()
boolean
isEmpty()
boolean
isValid(StructuredArgumentationFramework saf)
Checks whether this argument structure is valid wrt.java.util.Iterator<BasicArgument>
iterator()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
java.lang.String
toString()
-
Methods inherited from class net.sf.tweety.arg.dung.syntax.Argument
getLdoArgument, getLdoFormula, getName, getSignature, setName
-
-
-
-
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:
add
in interfacejava.util.Collection<BasicArgument>
-
addAll
public boolean addAll(java.util.Collection<? extends BasicArgument> c)
- Specified by:
addAll
in interfacejava.util.Collection<BasicArgument>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<BasicArgument>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<BasicArgument>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<BasicArgument>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<BasicArgument>
-
iterator
public java.util.Iterator<BasicArgument> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<BasicArgument>
- Specified by:
iterator
in interfacejava.lang.Iterable<BasicArgument>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<BasicArgument>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<BasicArgument>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<BasicArgument>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<BasicArgument>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<BasicArgument>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfacejava.util.Collection<BasicArgument>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<BasicArgument>
- Overrides:
hashCode
in classArgument
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejava.util.Collection<BasicArgument>
- Overrides:
equals
in classArgument
-
-