|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IProblemData
An object representing the objective data of a typical MCDA problem:
This object provides methods to check that it is in a consistent state. Note however that if its state is changed after a check for consistency, the consistency is not guaranteed any more.
This object is consistent iff all the following holds.
getAlternatives() are evaluated on all the criteria given by
getCriteria(). Thus the evaluation is complete.
Read-only versions of this interface may be used where the setter methods throw UnsupportedOperationException
. Note that read-only does not imply immutable: the implementing class may be a read-only view of some mutable
delegate.
Implementing objects might want to impose further restrictions to the data this object accepts, e.g., to accept only
evaluations in the right scale, or accept only all equal scales. Such objects will not be fully compliant with this
interface but it is suggested that a non accepted input throw as a result an UnsupportedOperationException.
Objects using this interface and wanting to capture such case might then react, e.g., by wrapping this exception into
an InvalidInputException.
Objects implementing this interface are forbidden to implement an auto-remove behavior, that is, once a criterion (e.g.) has been added to the data, e.g. through addition of a new scale, deletion of that scale does not automatically remove the criterion from the data, even though no information is linked to that criterion any more. Such a behavior would generally be difficult to implement efficiently, would be most of the time useless, and would render this interface difficult to understand e.g. when setting manually the sets of criteria (the user would not want these criteria to be auto-removed).
| Method Summary | |
|---|---|
Set<Alternative> |
getAlternatives()
Retrieves a writable view of the alternatives. |
IRdEvaluations |
getAlternativesEvaluations()
Retrieves a read-only view of the evaluations of the alternatives. |
Set<Criterion> |
getCriteria()
Retrieves a writable view of the criteria. |
Map<Criterion,IOrderedInterval> |
getScales()
Retrieves a read-only view of the scales. |
boolean |
setEvaluation(Alternative alternative,
Criterion criterion,
Double value)
Sets, replaces, or removes the evaluation of the given alternative according to the given criterion. |
boolean |
setEvaluations(IRdEvaluations evaluations)
Sets replaces, or remove the evaluations of the alternatives. |
boolean |
setScale(Criterion criterion,
IOrderedInterval scale)
Sets, replaces, or removes the scale of the given criterion. |
| Method Detail |
|---|
IRdEvaluations getAlternativesEvaluations()
Retrieves a read-only view of the evaluations of the alternatives. The set of alternatives on which evaluations
are provided is a subset of the set returned by getAlternatives(). The set of criteria on which
evaluations are provided is a subset of the set returned by getCriteria().
null.Set<Criterion> getCriteria()
null.Set<Alternative> getAlternatives()
null.Map<Criterion,IOrderedInterval> getScales()
null, no null key or value.
boolean setEvaluation(Alternative alternative,
Criterion criterion,
Double value)
alternative - not null.criterion - not null.value - null to remove a possibly previously associated value.
true iff this call changed the data contained in this object.boolean setEvaluations(IRdEvaluations evaluations)
evaluations - if null, the possibly existing evaluations will be removed.
true iff this call changed this object.
boolean setScale(Criterion criterion,
IOrderedInterval scale)
Sets, replaces, or removes the scale of the given criterion. The criterion is added to this object if it is not known already.
criterion - not null.scale - null to remove a possibly previously associated scale.
true iff this call changed the data contained in this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||