Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void goToPreviousVersion(Document doc)
- {
- Document oldVersion = hashmap.get(doc.getVersionId());
- doc.setContent(oldVersion);
- //copy all properties from old version the the document
- //Update the view (GUI)
- }
- private void saveVersion(Document doc)
- {
- hashmap.put(doc.getVersionId(), doc.clone());
- doc.setVersionId(doc.getVersionId +1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement