Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.negotiation.FileListDiff Class Reference

List of all members.

Public Member Functions

List< String > getAddedPaths ()
List< String > getAddedFolders ()
void clearAddedFolders ()
List< String > getRemovedPaths ()
List< String > getRemovedPathsSanitized ()
void clearRemovedPaths ()
List< String > getUnalteredPaths ()
List< String > getAlteredPaths ()
int hashCode ()
boolean equals (Object obj)
String toString ()

Static Public Member Functions

static FileListDiff diff (FileList base, FileList target)

Detailed Description

A diff between two FileLists.

See also:
FileList.diff(FileList)
Author:
ahaferburg

Member Function Documentation

void de.fu_berlin.inf.dpp.negotiation.FileListDiff.clearAddedFolders ( )

Excludes all added empty folders from this diff.

void de.fu_berlin.inf.dpp.negotiation.FileListDiff.clearRemovedPaths ( )

Excludes all removed paths from this diff.

static FileListDiff de.fu_berlin.inf.dpp.negotiation.FileListDiff.diff ( FileList  base,
FileList  target 
) [static]

Returns a new FileListDiff which contains the difference of the two FileLists.

The diff describes the operations needed to transform base into target. For example, the result's getAddedPaths() returns the list of files and folders that are present in target, but not in base.

If either of the two parameters is null, the result is an empty diff.

Parameters:
baseThe base FileList.
targetThe FileList to compare to.
Returns:
a new FileListDiff which contains the difference information of the two FileLists.
boolean de.fu_berlin.inf.dpp.negotiation.FileListDiff.equals ( Object  obj)
List<String> de.fu_berlin.inf.dpp.negotiation.FileListDiff.getAddedFolders ( )

Subset of target.getPaths(): All empty folders that do not exist in base.

Returns:
Same format as FileList#getPaths(). It is safe to manipulate the returned list; this diff won't be affected.
List<String> de.fu_berlin.inf.dpp.negotiation.FileListDiff.getAddedPaths ( )

Subset of target.getPaths(): All entries that do not exist in base.

Returns:
Same format as FileList#getPaths(). It is safe to manipulate the returned list; this diff won't be affected.
List<String> de.fu_berlin.inf.dpp.negotiation.FileListDiff.getAlteredPaths ( )

Subset of the intersection of base.getPaths() and target.getPaths(): All entries that have been changed.

Returns:
Same format as FileList#getPaths(). It is safe to manipulate the returned list; this diff won't be affected.
List<String> de.fu_berlin.inf.dpp.negotiation.FileListDiff.getRemovedPaths ( )

Subset of base.getPaths(): All entries that do not exist in target.

Returns:
Same format as FileList#getPaths(). It is safe to manipulate the returned list; this diff won't be affected.
List<String> de.fu_berlin.inf.dpp.negotiation.FileListDiff.getRemovedPathsSanitized ( )

Subset of base.getPaths(): All entries that do not exist in target, except folders that contain unaltered entries.

Returns:
Same format as FileList#getPaths(). It is safe to manipulate the returned list; this diff won't be affected.
List<String> de.fu_berlin.inf.dpp.negotiation.FileListDiff.getUnalteredPaths ( )

Subset of the intersection of base.getPaths() and target.getPaths(): All entries that have not been changed.

Returns:
Same format as FileList#getPaths(). It is safe to manipulate the returned list; this diff won't be affected.
int de.fu_berlin.inf.dpp.negotiation.FileListDiff.hashCode ( )
String de.fu_berlin.inf.dpp.negotiation.FileListDiff.toString ( )
 All Classes Namespaces Files Functions Variables Enumerations