|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.xmcda_oo.structure.Criterion
public class Criterion
A criterion object. Has a unique id (not null) and possibly an indication of whether it should be
maximized or minimized.
A criterion may also represent an attribute, the difference is simply whether it has a preference direction. And after all, the preference direction should be removed from the criterion, thus it really should be taken as representing either an attribute or a criterion depending on the context. An advantage is that a matrix of evaluation of alternatives against criteria may also be used to represent evaluations of alternatives against attributes. The difference exists when more context is known.
Objects of this type are immutable.
A criterion equals(Object) an other one iff they have the same id.
| Nested Class Summary | |
|---|---|
static class |
Criterion.PreferenceDirection
|
| Constructor Summary | |
|---|---|
Criterion(Criterion criterion)
Creates a new criterion by copying the one given. |
|
Criterion(String id)
|
|
Criterion(String id,
Criterion.PreferenceDirection dir)
|
|
| Method Summary | |
|---|---|
int |
compareTo(Criterion o)
|
boolean |
equals(Object obj)
|
String |
getId()
|
Criterion.PreferenceDirection |
getPreferenceDirection()
Indicates whether this criterion should be maximized (i.e. the values associated with it are set such that the higher, the better) or minimized (or if this information is not known). |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Criterion(String id)
id - not null.public Criterion(Criterion criterion)
criterion - not null.
public Criterion(String id,
Criterion.PreferenceDirection dir)
id - not null.dir - not null.| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectpublic String getId()
public Criterion.PreferenceDirection getPreferenceDirection()
Criterion.PreferenceDirection.UNKNOWN, but not null.public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int compareTo(Criterion o)
compareTo in interface Comparable<Criterion>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||