Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
void | insertElementRecords (Collection< IRecord > targets) |
void | insertRecord (ElementRecord record) |
List< ElementRecord > | getRootRecords () |
Collection< ElementRecord > | getSubtreeRecords () |
boolean | isEmpty () |
void | clear () |
Protected Attributes | |
LinkedList< ElementRecord > | rootRecords = new LinkedList<ElementRecord>() |
TreeSet< ElementRecord > | subtreeRecords = new TreeSet<ElementRecord>() |
Use this class to divide a bunch of records in root records and records that are descendants of top records, subtree records.
Especially useful to achieve the records to delete or to copy because subtrees will be deleted/copied with the parent.
void de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.clear | ( | ) |
List<ElementRecord> de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.getRootRecords | ( | ) |
Collection<ElementRecord> de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.getSubtreeRecords | ( | ) |
void de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.insertElementRecords | ( | Collection< IRecord > | targets | ) |
Inserts all records of the targets collection of type ElementRecord to this set.
targets |
void de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.insertRecord | ( | ElementRecord | record | ) |
If any of the passed record's parents or itself is already contained there is nothing to do. Else it will be inserted as a new root record. Furthermore all its descendants will be added to subtree records and removed from root records if applicable.
record |
boolean de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.isEmpty | ( | ) |
LinkedList<ElementRecord> de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.rootRecords = new LinkedList<ElementRecord>() [protected] |
TreeSet<ElementRecord> de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.subtreeRecords = new TreeSet<ElementRecord>() [protected] |