Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet Class Reference

List of all members.

Public Member Functions

void insertElementRecords (Collection< IRecord > targets)
void insertRecord (ElementRecord record)
List< ElementRecordgetRootRecords ()
Collection< ElementRecordgetSubtreeRecords ()
boolean isEmpty ()
void clear ()

Protected Attributes

LinkedList< ElementRecordrootRecords = new LinkedList<ElementRecord>()
TreeSet< ElementRecordsubtreeRecords = new TreeSet<ElementRecord>()

Detailed Description

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.

Author:
jurke

Member Function Documentation

void de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.clear ( )
List<ElementRecord> de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.getRootRecords ( )
Returns:
all records so that
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.

Parameters:
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.

Parameters:
record
boolean de.fu_berlin.inf.dpp.whiteboard.sxe.util.HierarchicalRecordSet.isEmpty ( )

Member Data Documentation

 All Classes Namespaces Files Functions Variables Enumerations