Changeset 4685 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-12-21T15:44:53+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r4668 r4685 71 71 import org.openstreetmap.josm.actions.SelectAllAction; 72 72 import org.openstreetmap.josm.actions.SessionLoadAction; 73 import org.openstreetmap.josm.actions.SessionSaveAsAction; 73 74 import org.openstreetmap.josm.actions.ShowStatusReportAction; 74 75 import org.openstreetmap.josm.actions.SimplifyWayAction; … … 120 121 public final JosmAction saveAs = new SaveAsAction(); 121 122 public final JosmAction sessionLoad = new SessionLoadAction(); 123 public final JosmAction sessionSaveAs = new SessionSaveAsAction(); 122 124 public final JosmAction gpxExport = new GpxExportAction(); 123 125 public final DownloadAction download = new DownloadAction(); … … 365 367 sessionMenu.setToolTipText(tr("Save and load the current session (list of layers, etc.)")); 366 368 sessionMenu.setIcon(ImageProvider.get("session")); 369 add(sessionMenu, sessionSaveAs); 367 370 add(sessionMenu, sessionLoad); 368 371 fileMenu.add(sessionMenu); -
trunk/src/org/openstreetmap/josm/tools/MultiMap.java
r4668 r4685 31 31 32 32 /** 33 * Map a key to a value. Can be called multiple times with the same key, but different value. 33 * Map a key to a value. 34 * 35 * Can be called multiple times with the same key, but different value. 34 36 */ 35 37 public void put(A key, B value) { … … 44 46 /** 45 47 * Put a key that maps to nothing. (Only if it is not already in the map) 48 * 46 49 * Afterwards containsKey(key) will return true and get(key) will return 47 50 * an empty Set instead of null. … … 54 57 55 58 /** 56 * Get the keySet 59 * Map the key to all the given values. 60 * 61 * Adds to the mappings that are already there. 62 */ 63 public void putAll(A key, Collection<B> values) { 64 LinkedHashSet<B> vals = map.get(key); 65 if (vals == null) { 66 vals = new LinkedHashSet<B>(values); 67 map.put(key, vals); 68 } 69 vals.addAll(values); 70 } 71 72 /** 73 * Get the keySet. 57 74 */ 58 75 public Set<A> keySet() { … … 61 78 62 79 /** 63 * Return the Set associated with the given key. Result is null if 64 * nothing has been mapped to this key. Modifications of the returned list 65 * changes the underling map, but you should better not do that. 80 * Returns the Set associated with the given key. Result is null if 81 * nothing has been mapped to this key. 82 * 83 * Modifications of the returned list changes the underling map, 84 * but you should better not do that. 66 85 */ 67 86 public Set<B> get(A key) { … … 87 106 88 107 /** 89 * Returns true if the multimap contains a value for a key 108 * Returns true if the multimap contains a value for a key. 109 * 90 110 * @param key The key 91 111 * @param value The value … … 106 126 107 127 /** 108 * number of keys128 * Returns the number of keys. 109 129 */ 110 130 public int size() { … … 113 133 114 134 /** 115 * returns a collection of all value sets135 * Returns a collection of all value sets. 116 136 */ 117 137 public Collection<LinkedHashSet<B>> values() { … … 120 140 121 141 /** 122 * Removes a cerain key=value mapping 142 * Removes a cerain key=value mapping. 123 143 * 124 144 * @return true, if something was removed … … 133 153 134 154 /** 135 * Removes all mappings for a certain key 155 * Removes all mappings for a certain key. 136 156 */ 137 157 public LinkedHashSet<B> remove(A key) {
Note:
See TracChangeset
for help on using the changeset viewer.