Package jmri.jmrit.revhistory
Class FileHistory
- java.lang.Object
-
- jmri.jmrit.revhistory.FileHistory
-
- All Implemented Interfaces:
InstanceManagerAutoDefault
public class FileHistory extends java.lang.Object implements InstanceManagerAutoDefault
Memo class to remember a file revision history.These can be nested: A revision can come with a history.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileHistory.OperationMemo
Memo class for each revision itself.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<FileHistory.OperationMemo>
list
-
Constructor Summary
Constructors Constructor Description FileHistory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOperation(java.lang.String type, java.lang.String date, java.lang.String filename, FileHistory history)
Add a revision from complete information created elsewhere.void
addOperation(java.lang.String type, java.lang.String filename, FileHistory history)
void
addOperation(FileHistory.OperationMemo r)
java.util.ArrayList<FileHistory.OperationMemo>
getList()
void
purge(int keep)
java.lang.String
toString()
java.lang.String
toString(java.lang.String prefix)
-
-
-
Field Detail
-
list
java.util.ArrayList<FileHistory.OperationMemo> list
-
-
Constructor Detail
-
FileHistory
public FileHistory()
-
-
Method Detail
-
addOperation
public void addOperation(java.lang.String type, java.lang.String date, java.lang.String filename, FileHistory history)
Add a revision from complete information created elsewhere.- Parameters:
type
- operation typedate
- operation datefilename
- file operated onhistory
- source history instance
-
addOperation
public void addOperation(FileHistory.OperationMemo r)
-
addOperation
public void addOperation(java.lang.String type, java.lang.String filename, FileHistory history)
-
purge
public void purge(int keep)
- Parameters:
keep
- Number of levels to keep
-
toString
public java.lang.String toString(java.lang.String prefix)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getList
public java.util.ArrayList<FileHistory.OperationMemo> getList()
-
-