Package org.tweetyproject.arg.saf.syntax
Class ArgumentStructure
java.lang.Object
org.tweetyproject.arg.dung.syntax.Argument
org.tweetyproject.arg.saf.syntax.ArgumentStructure
- All Implemented Interfaces:
Comparable<Argument>
,Iterable<BasicArgument>
,Collection<BasicArgument>
,DungEntity
,Formula
,Node
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
ConstructorDescriptionCreates 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 TypeMethodDescriptionboolean
add
(BasicArgument e) boolean
addAll
(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
boolean
containsAll
(Collection<?> c) boolean
getClaim()
Returns the claim of this argument structure, i.e.getTop()
Returns the first basic arguments of this argument structureint
hashCode()
boolean
isEmpty()
boolean
Checks whether this argument structure is valid wrt.iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
Methods inherited from class org.tweetyproject.arg.dung.syntax.Argument
compareTo, getLdoArgument, getLdoFormula, getName, getSignature, setName
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
ArgumentStructure
Deprecated.Deprecated for argument structures.- Parameters:
name
- a string
-
ArgumentStructure
public ArgumentStructure()Creates a new empty argument structure. -
ArgumentStructure
Creates a new argument structure with the given list of arguments.- Parameters:
arguments
- a list of basic arguments.
-
-
Method Details
-
isValid
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
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
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
Returns the first basic arguments of this argument structure- Returns:
- the first basic argument or "null" if this is empty.
-
add
- Specified by:
add
in interfaceCollection<BasicArgument>
-
addAll
- Specified by:
addAll
in interfaceCollection<BasicArgument>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<BasicArgument>
-
contains
- Specified by:
contains
in interfaceCollection<BasicArgument>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<BasicArgument>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<BasicArgument>
-
iterator
- Specified by:
iterator
in interfaceCollection<BasicArgument>
- Specified by:
iterator
in interfaceIterable<BasicArgument>
-
remove
- Specified by:
remove
in interfaceCollection<BasicArgument>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<BasicArgument>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<BasicArgument>
-
size
public int size()- Specified by:
size
in interfaceCollection<BasicArgument>
-
toArray
- Specified by:
toArray
in interfaceCollection<BasicArgument>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<BasicArgument>
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<BasicArgument>
- Overrides:
hashCode
in classArgument
-
equals
- Specified by:
equals
in interfaceCollection<BasicArgument>
- Overrides:
equals
in classArgument
-