|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAssignmentsRead
A read interface for a set of assignments where one assignment is a mapping of an alternative to exactly one category.
A set of such assignments can also be considered as a degenerate case of a set of assignments to multiple categories, where each alternative is assigned to exactly one category (which is a legal assignment to ''multiple'' categories), hence the inheritance relation. Objects implementing this interface however may only implement the degenerate case of the multiple categories case: it is impossible to satisfy both the contract for this interface (ensuring that every alternative is assigned to exactly one category) and the general case of the multiple categories interface (allowing an alternative to be assigned to more than one category). Having the inheritance relation permits to use objects implementing the single category case (this interface) for algorithms dealing with multiple categories assignments.
An assignments object equals an other one iff they contain the same alternatives assigned to the same categories and the same set of overall categories. The last condition is not redundant as the set of categories may be a superset of the set of categories to which alternatives are assigned. This definition is compatible with the definition of the assignments to multiple categories object.
TODO could also define a method that provides a simple map Map
| Method Summary | |
|---|---|
Set<Category> |
getCategories(Alternative alternative)
Retrieves, if it exists, the category to which an alternative is assigned as a singleton set. |
Category |
getCategory(Alternative alternative)
|
| Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IAssignmentsToMultipleRead |
|---|
equals, getAlternatives, getAlternatives, getCategories |
| Method Detail |
|---|
Category getCategory(Alternative alternative)
alternative - not null.
null iff this alternative is not
assigned.Set<Category> getCategories(Alternative alternative)
IAssignmentsToMultipleRead interface. The method
getCategory(Alternative) is functionally equivalent and should be preferred over this one as it is
clearer.
getCategories in interface IAssignmentsToMultipleReadalternative - not null.
null iff the alternative is not assigned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||