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

All Superinterfaces:
IAssignmentsToMultipleRead, IOrderedAssignmentsToMultipleRead
All Known Subinterfaces:
IOrderedAssignments, IOrderedAssignmentsToMultiple
All Known Implementing Classes:
OrderedAssignments, OrderedAssignmentsForwarder, OrderedAssignmentsFromRead, OrderedAssignmentsToMultiple, OrderedAssignmentsToMultipleExtended, OrderedAssignmentsToMultipleForwarder, OrderedAssignmentsToMultipleFromRead

public interface IOrderedAssignmentsWriteable
extends IOrderedAssignmentsToMultipleRead

A set of assignments that can be cleared and associated with an ordered set of categories. This is the base interface of the writeable interfaces defining the ordered assignment objects.

An assignments to multiple categories 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.


Method Summary
 boolean clear()
           
 boolean setCategories(SortedSet<Category> categories)
           Sets the categories and the order of the categories in this object.
 
Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IOrderedAssignmentsToMultipleRead
equals, getCategories, getCategories
 
Methods inherited from interface org.decisiondeck.jmcda.structure.sorting.assignment.IAssignmentsToMultipleRead
getAlternatives, getAlternatives
 

Method Detail

setCategories

boolean setCategories(SortedSet<Category> categories)

Sets the categories and the order of the categories in this object.

Caution should be used 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.

Parameters:
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.
Returns:
true iff the categories changed.

clear

boolean clear()


Copyright © 2011. All Rights Reserved.