|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprioritizer.Pairwise.ComparisonList
Represents the list containing the comparisons.
The comparison between two requirements are represented in an array
that we call a row, each row contains information about the two
requirements and the value of the prioritization between them. A row
has the format: row[index1][req1][index2][req2][value] where
Field Summary | |
private java.util.LinkedList |
theList
|
Constructor Summary | |
Pairwise.ComparisonList()
Creates a new ComparisonList. |
Method Summary | |
void |
addRow(int index1,
Requirement req1,
int index2,
Requirement req2,
double value)
Sets a row/array that represents a pair of requirements to be compared. |
void |
addRow(java.lang.Object[] row)
Adds an element (row/array of elements) that represents one comparison, to the list. |
int |
getLength()
Gets the number of elements in the list. |
java.lang.Object[] |
getRow(int i)
Gets the element at the specified position in the list |
java.lang.Object[] |
removeRow(int i)
Removes the element at the specified position in the list |
boolean |
rowExists(Requirement r1,
Requirement r2)
Checks if a comparison between the two specified requirements exists in the list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.LinkedList theList
Constructor Detail |
public Pairwise.ComparisonList()
Method Detail |
public void addRow(int index1, Requirement req1, int index2, Requirement req2, double value)
index1
- the RequirementList index of the first Requirementreq1
- the first Requirementindex2
- the RequirementList index of the second Requirementreq2
- the second Requirementvalue
- the result of the comparison. Will always be 0.0
here since no comparisons have been done yet.public void addRow(java.lang.Object[] row)
public int getLength()
public java.lang.Object[] getRow(int i)
i
- the index of the element to return
public java.lang.Object[] removeRow(int i)
i
- the index of the element to remove
public boolean rowExists(Requirement r1, Requirement r2)
r1
- the first requirementr2
- the second requirement
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |