1 19 20 package org.netbeans.modules.editor.bookmarks; 21 22 import java.net.URL ; 23 import java.util.Collection ; 24 import java.util.HashMap ; 25 import java.util.Map ; 26 27 33 34 class FileBookmarksMap { 35 36 private Map url2FileBookmarks = new HashMap (); 37 38 private boolean modified; 39 40 FileBookmarksMap() { 41 } 42 43 public FileBookmarks get(URL url) { 44 return (FileBookmarks)url2FileBookmarks.get(url); 45 } 46 47 public void put(FileBookmarks fileBookmarks) { 48 url2FileBookmarks.put(fileBookmarks.getURL(), fileBookmarks); 49 markModified(); 50 } 51 52 public Collection all() { 53 return url2FileBookmarks.values(); 54 } 55 56 public boolean isModified() { 57 return modified; 58 } 59 60 private void markModified() { 61 modified = true; 62 } 63 64 public void markUnmodified() { 65 modified = false; 66 } 67 68 } 69 70 | Popular Tags |