public class Argument
extends java.lang.Object
Constructor and Description |
---|
Argument(java.lang.String s,
java.util.List<Opinion> o,
Spectrum spec,
ImportanceFunction i)
Creates a new argument
|
Argument(java.lang.String s,
Spectrum spec,
ImportanceFunction i)
Creates a new argument
|
Modifier and Type | Method and Description |
---|---|
void |
addOpinion(double num)
Creates a new opinion from the double and adds it to the argument's opinions.
|
void |
addOpinion(Opinion o)
Creates a new opinion from the double and adds it to the argument's opinions.
|
java.util.List<Opinion> |
getOpinions() |
java.lang.String |
getStatement() |
java.lang.Boolean |
in(Spectrum spec)
Looks if the argument's opinions are defined in the spectrum passed as parameter
|
double |
numberOpinions()
Returns the number of opinions of the argument
|
void |
printStatus(java.io.PrintStream out)
Prints the information of the argument, that is: statement: support number of opinions
|
void |
setOpinions(java.util.List<Opinion> opinions) |
void |
setStatement(java.lang.String statement) |
double |
support()
Computes the support for the argument as described in the author's project
|
double |
weight()
Returns the weight of the argument as the sum of the importance of all its opinions
|
public Argument(java.lang.String s, Spectrum spec, ImportanceFunction i)
s
- the argument's statementspec
- the argument's spectrumi
- the argument's importance functionpublic Argument(java.lang.String s, java.util.List<Opinion> o, Spectrum spec, ImportanceFunction i)
s
- the argument's statemento
- the list of opinions of the argumentspec
- the argument's spectrumi
- the argument's importance functionpublic void addOpinion(double num)
num
- The value of the opinion to add.public void addOpinion(Opinion o)
o
- The opinion to add.public double support()
public java.lang.Boolean in(Spectrum spec)
spec
- the spectrum to comparepublic double numberOpinions()
public double weight()
public void printStatus(java.io.PrintStream out)
out
- The PrintStream in which the information is printedpublic java.lang.String getStatement()
public void setStatement(java.lang.String statement)
public java.util.List<Opinion> getOpinions()
public void setOpinions(java.util.List<Opinion> opinions)