|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IOrderedAssignmentsWithCredibilities
A set of assignments where one assignment is a mapping of an alternative to a set of ordered categories, with associated credibilities, meaning that each category to which an alternative is mapped has an associated degree of credibility (a real number greater than zero) indicating how strong the alternative belongs to that category. An alternative is said to be assigned if it is assigned to at least one category (i.e. the set of categories to which it is mapped may not be empty).
This interface is an equivalent to IAssignmentsWithCredibilities, to use when the categories the alternatives
are assigned to are provided with a total ordering, thus can be sorted (the categories) from worst to best without
ex-æquo.
Contrary to IAssignmentsWithCredibilities however, this object mandates that when setting an
assignment of an alternative to some categories, these categories be pre-defined. This can be done using the
setCategories(SortedSet) method and is necessary for this object to know the ordering on the categories, to
know how to interpret the assignments in terms of ordered categories. This interface does not extend
IAssignmentsWithCredibilities because of this very restriction it has on the categories to which an
alternative may be assigned, which must be predefined. The other interface does not have such a requirement.
This interface does not extend IOrderedAssignmentsToMultiple because that would require it to guess
some credibilities when an alternative is simply affected to a set of categories. See
IOrderedAssignmentsToMultiple for more informations.
| Method Summary | |
|---|---|
boolean |
clear()
|
boolean |
setCategories(SortedSet<Category> categories)
Sets the categories and the order of the categories in this object. |
boolean |
setCredibilities(Alternative alternative,
Map<Category,Double> credibilities)
Sets, replaces, or removes the assignment of an alternative and the associated degrees of credibility. |
| Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.credibilities.IOrderedAssignmentsWithCredibilitiesRead |
|---|
equals, getCredibilities |
| Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IOrderedAssignmentsToMultipleRead |
|---|
getCategories, getCategories |
| Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IAssignmentsToMultipleRead |
|---|
getAlternatives, getAlternatives |
| Method Detail |
|---|
boolean setCredibilities(Alternative alternative,
Map<Category,Double> credibilities)
IAssignmentsToMultipleRead.getCategories(). A zero value as a degree of credibility is considered as
equivalent to a missing entry: it is interpreted as meaning that the given alternative is not assigned to the
corresponding category.
alternative - not null.credibilities - null or empty to assign the alternative to no category, i.e., to remove the assignment of
the given alternative. The map entries may not contain a null key or value, the values
must be positive or zero, the categories must be contained in IAssignmentsToMultipleRead.getCategories(). If the map
contains only zeroes, it is considered empty.
true iff the call changed the assignments, i.e., iff the assignment existed and has been
removed, or existed and has changed (be it a change in some credibility degrees or a change of category),
or did not exist and has been added.boolean clear()
boolean setCategories(SortedSet<Category> categories)
Sets the categories and the order of the categories in this object.
Caution should be execised when using this method on a non empty object. The simple case is when the given categories ordering is compatible with the ordering already used. If on the countrary the given categories order is not compatible with the already given ordered assignments, the assignments will be changed to reflect the new order. The user should check whether the order is compatible before using this method if she does not want this to happen.
categories - null to remove the associated categories (all the orderings are lost), authorized only
when no assignments are contained in this object. Must be a superset of the categories already used.
true iff the categories changed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||