org.decisiondeck.jmcda.structure.sorting.assignment
Interface IAssignments

All Superinterfaces:
IAssignmentsRead, IAssignmentsToMultipleRead
All Known Implementing Classes:
Assignments

public interface IAssignments
extends IAssignmentsRead

A set of assignments, where an assignment is a mapping of an alternative to exactly one category.

Also implements degenerate cases of multiple categories assignments (where multiple reduces to exactly one), see the note about inheritance in IAssignmentsRead.

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.


Method Summary
 boolean clear()
           
 boolean setCategory(Alternative alternative, Category category)
          Sets, replaces, or removes the assignment of an alternative.
 
Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IAssignmentsRead
getCategories, getCategory
 
Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IAssignmentsToMultipleRead
equals, getAlternatives, getAlternatives, getCategories
 

Method Detail

setCategory

boolean setCategory(Alternative alternative,
                    Category category)
Sets, replaces, or removes the assignment of an alternative.

Parameters:
alternative - not null.
category - null to remove the assignment.
Returns:
true iff the call changed the assignments, i.e. true iff the given alternative was assigned and the assignment has been removed, or was assigned to a different category, or was not assigned and has been assigned to a category.

clear

boolean clear()


Copyright © 2011. All Rights Reserved.