Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. private void goToPreviousVersion(Document doc)
  2. {
  3. Document oldVersion = hashmap.get(doc.getVersionId());
  4. doc.setContent(oldVersion);
  5. //copy all properties from old version the the document
  6.  
  7. //Update the view (GUI)
  8. }
  9.  
  10. private void saveVersion(Document doc)
  11. {
  12. hashmap.put(doc.getVersionId(), doc.clone());
  13. doc.setVersionId(doc.getVersionId +1);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement