org.acm.seguin.refactor.undo
Class FileSet

java.lang.Object
  extended by org.acm.seguin.refactor.undo.FileSet
All Implemented Interfaces:
java.io.Serializable

public class FileSet
extends java.lang.Object
implements java.io.Serializable

A set of files that are bound together by the undo operation. This object stores three files. The first file is the original file name. The second file is the renamed instance of the original file. The third file is the new file.

To undo a refactoring on this particular file you need to delete the old file, then rename the renamed file back to the original file.

Author:
Chris Seguin
See Also:
Serialized Form

Constructor Summary
FileSet(java.io.File one, java.io.File two, java.io.File three)
          Creates a set of files that can be undone.
 
Method Summary
 void undo()
          Performs the undo operation on this particular file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSet

public FileSet(java.io.File one,
               java.io.File two,
               java.io.File three)
Creates a set of files that can be undone.

Parameters:
one - the original file
two - the renamed orginal
three - the new file
Method Detail

undo

public void undo()
Performs the undo operation on this particular file