Changeset 6317 in josm
- Timestamp:
- 2013-10-07T22:45:15+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r6316 r6317 10 10 import java.util.Collection; 11 11 import java.util.Collections; 12 import java.util.HashMap;13 12 import java.util.HashSet; 14 13 import java.util.LinkedHashMap; … … 16 15 import java.util.LinkedList; 17 16 import java.util.List; 17 import java.util.Map; 18 18 import java.util.Set; 19 19 import java.util.Stack; … … 427 427 } 428 428 429 static public NodeGraph createUndirectedGraphFromNodeWays(Collection<Way> ways) {429 public static NodeGraph createUndirectedGraphFromNodeWays(Collection<Way> ways) { 430 430 NodeGraph graph = new NodeGraph(); 431 431 for (Way w: ways) { … … 437 437 private Set<NodePair> edges; 438 438 private int numUndirectedEges = 0; 439 private HashMap<Node, List<NodePair>> successors;440 private HashMap<Node, List<NodePair>> predecessors;439 private Map<Node, List<NodePair>> successors; 440 private Map<Node, List<NodePair>> predecessors; 441 441 442 442 protected void rememberSuccessor(NodePair pair) { -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r6316 r6317 17 17 import java.util.LinkedList; 18 18 import java.util.List; 19 import java.util.Map; 19 20 import java.util.Set; 20 21 … … 71 72 * Remember movements, so the user can later undo it for certain nodes 72 73 */ 73 private static final HashMap<Node, EastNorth> rememberMovements = new HashMap<Node, EastNorth>();74 private static final Map<Node, EastNorth> rememberMovements = new HashMap<Node, EastNorth>(); 74 75 75 76 /** -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r6316 r6317 301 301 // events for crossplatform key holding processing 302 302 // thanks to http://www.arco.in-berlin.de/keyevent.html 303 private final TreeSet<Integer> set = new TreeSet<Integer>();303 private final Set<Integer> set = new TreeSet<Integer>(); 304 304 private KeyEvent releaseEvent; 305 305 private Timer timer; -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r6310 r6317 367 367 } 368 368 369 private boolean repaintIfRequired( HashSet<OsmPrimitive> newHighlights) {369 private boolean repaintIfRequired(Set<OsmPrimitive> newHighlights) { 370 370 if(!drawTargetHighlight) 371 371 return false; -
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r6316 r6317 10 10 import java.util.LinkedList; 11 11 import java.util.List; 12 import java.util.Map; 12 13 import java.util.Set; 13 14 import java.util.Stack; … … 35 36 */ 36 37 public class APIDataSet { 37 private Li nkedList<OsmPrimitive> toAdd;38 private Li nkedList<OsmPrimitive> toUpdate;39 private Li nkedList<OsmPrimitive> toDelete;38 private List<OsmPrimitive> toAdd; 39 private List<OsmPrimitive> toUpdate; 40 private List<OsmPrimitive> toDelete; 40 41 41 42 /** … … 267 268 */ 268 269 private static class RelationUploadDependencyGraph { 269 private HashMap<Relation, Set<Relation>> children;270 private Map<Relation, Set<Relation>> children; 270 271 private Collection<Relation> relations; 271 272 private Set<Relation> visited; -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6312 r6317 476 476 } 477 477 478 synchronized public TreeMap<String, String> getAllColors() {479 final TreeMap<String,String> all = new TreeMap<String,String>();478 synchronized public Map<String, String> getAllColors() { 479 final Map<String,String> all = new TreeMap<String,String>(); 480 480 for (final Entry<String,String> e : defaults.entrySet()) { 481 481 if (e.getKey().startsWith("color.") && e.getValue() != null) { -
trunk/src/org/openstreetmap/josm/data/Version.java
r6248 r6317 8 8 import java.net.URL; 9 9 import java.util.HashMap; 10 import java.util.Map; 10 11 import java.util.Map.Entry; 11 12 import java.util.regex.Matcher; … … 74 75 private boolean isLocalBuild; 75 76 76 protected HashMap<String, String> parseManifestStyleFormattedString(String content) {77 HashMap<String, String> properties = new HashMap<String, String>();77 protected Map<String, String> parseManifestStyleFormattedString(String content) { 78 Map<String, String> properties = new HashMap<String, String>(); 78 79 if (content == null) return properties; 79 80 Pattern p = Pattern.compile("^([^:]+):(.*)$"); … … 106 107 } 107 108 108 HashMap<String, String> properties = parseManifestStyleFormattedString(revisionInfo);109 Map<String, String> properties = parseManifestStyleFormattedString(revisionInfo); 109 110 String value = properties.get("Revision"); 110 111 if (value != null) { -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r6285 r6317 15 15 import java.util.List; 16 16 import java.util.Map; 17 import java.util.Set; 17 18 import java.util.concurrent.CopyOnWriteArrayList; 18 19 import java.util.concurrent.locks.Lock; … … 432 433 } 433 434 434 private LinkedHashSet<OsmPrimitive> selectedPrimitives = new LinkedHashSet<OsmPrimitive>();435 private Set<OsmPrimitive> selectedPrimitives = new LinkedHashSet<OsmPrimitive>(); 435 436 private Collection<OsmPrimitive> selectionSnapshot; 436 437 -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6296 r6317 140 140 * @return the sub-set of OSM primitives of type <code>type</code> 141 141 */ 142 static public <T extends OsmPrimitive> LinkedHashSet<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) {143 LinkedHashSet<T> ret = new LinkedHashSet<T>();142 static public <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) { 143 Set<T> ret = new LinkedHashSet<T>(); 144 144 if (set != null) { 145 145 for(OsmPrimitive p: set) { -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java
r6084 r6317 4 4 import java.util.Comparator; 5 5 import java.util.HashMap; 6 import java.util.Map; 6 7 7 8 import org.openstreetmap.josm.gui.DefaultNameFormatter; … … 9 10 /** Comparator, comparing by type and objects display names */ 10 11 public class OsmPrimitiveComparator implements Comparator<OsmPrimitive> { 11 final private HashMap<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>();12 final private Map<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>(); 12 13 final private DefaultNameFormatter df = DefaultNameFormatter.getInstance(); 13 14 public boolean relationsFirst = false; -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r6087 r6317 139 139 } 140 140 141 private final HashSet<Tag> tags = new HashSet<Tag>();141 private final Set<Tag> tags = new HashSet<Tag>(); 142 142 143 143 /** -
trunk/src/org/openstreetmap/josm/data/osm/User.java
r6316 r6317 8 8 import java.util.HashSet; 9 9 import java.util.List; 10 import java.util.Map; 11 import java.util.Set; 10 12 import java.util.concurrent.atomic.AtomicLong; 11 13 … … 28 30 * the map of known users 29 31 */ 30 private static HashMap<Long,User> userMap = new HashMap<Long,User>();32 private static Map<Long,User> userMap = new HashMap<Long,User>(); 31 33 private final static User anonymous = createLocalUser(tr("<anonymous>")); 32 34 … … 118 120 119 121 /** the user name */ 120 private final HashSet<String> names = new HashSet<String>();122 private final Set<String> names = new HashSet<String>(); 121 123 /** the user id */ 122 124 private final long uid; -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
r6316 r6317 6 6 import java.util.HashMap; 7 7 import java.util.List; 8 import java.util.Map; 8 9 import java.util.concurrent.CopyOnWriteArrayList; 9 10 … … 40 41 41 42 /** the history data */ 42 private HashMap<PrimitiveId, ArrayList<HistoryOsmPrimitive>> data;43 private Map<PrimitiveId, ArrayList<HistoryOsmPrimitive>> data; 43 44 private CopyOnWriteArrayList<HistoryDataSetListener> listeners; 44 45 46 /** 47 * Constructs a new {@code HistoryDataSet}. 48 */ 45 49 public HistoryDataSet() { 46 50 data = new HashMap<PrimitiveId, ArrayList<HistoryOsmPrimitive>>(); -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r6296 r6317 34 34 private Date timestamp; 35 35 private long version; 36 private HashMap<String, String> tags;36 private Map<String, String> tags; 37 37 38 38 protected void ensurePositiveLong(long value, String name) { 39 if (value <= 0) 39 if (value <= 0) { 40 40 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value)); 41 } 41 42 } 42 43 -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
r6316 r6317 70 70 * @throws IllegalArgumentException thrown if preconditions are violated 71 71 */ 72 public HistoryRelation(long id, long version, boolean visible, User user, long changesetId, 73 Date timestamp, ArrayList<RelationMemberData> members) { 72 public HistoryRelation(long id, long version, boolean visible, User user, long changesetId, Date timestamp, List<RelationMemberData> members) { 74 73 this(id, version, visible, user, changesetId, timestamp); 75 74 if (members != null) { -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
r6316 r6317 68 68 * @throws IllegalArgumentException if preconditions are violated 69 69 */ 70 public HistoryWay(long id, long version, boolean visible, User user, long changesetId, Date timestamp, ArrayList<Long> nodeIdList) throws IllegalArgumentException {70 public HistoryWay(long id, long version, boolean visible, User user, long changesetId, Date timestamp, List<Long> nodeIdList) throws IllegalArgumentException { 71 71 this(id, version, visible, user, changesetId, timestamp); 72 72 CheckParameterUtil.ensureParameterNotNull(nodeIdList, "nodeIdList"); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java
r6084 r6317 5 5 import java.util.HashMap; 6 6 import java.util.List; 7 import java.util.Map; 7 8 8 9 import org.openstreetmap.josm.data.osm.DataSet; … … 33 34 private DataSet selectionBase; 34 35 private DataSet hull; 35 private HashMap<OsmPrimitive, PrimitiveData> mappedPrimitives;36 private Map<OsmPrimitive, PrimitiveData> mappedPrimitives; 36 37 37 38 /** -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r6313 r6317 1542 1542 } 1543 1543 1544 private LinkedList<CursorInfo> Cursors = new LinkedList<CursorInfo>(); 1544 private LinkedList<CursorInfo> cursors = new LinkedList<CursorInfo>(); 1545 1545 1546 /** 1546 1547 * Set new cursor. 1547 1548 */ 1548 1549 public void setNewCursor(Cursor cursor, Object reference) { 1549 if (!Cursors.isEmpty()) {1550 CursorInfo l = Cursors.getLast();1550 if (!cursors.isEmpty()) { 1551 CursorInfo l = cursors.getLast(); 1551 1552 if(l != null && l.cursor == cursor && l.object == reference) 1552 1553 return; 1553 1554 stripCursors(reference); 1554 1555 } 1555 Cursors.add(new CursorInfo(cursor, reference));1556 cursors.add(new CursorInfo(cursor, reference)); 1556 1557 setCursor(cursor); 1557 1558 } 1559 1558 1560 public void setNewCursor(int cursor, Object reference) { 1559 1561 setNewCursor(Cursor.getPredefinedCursor(cursor), reference); 1560 1562 } 1563 1561 1564 /** 1562 1565 * Remove the new cursor and reset to previous 1563 1566 */ 1564 1567 public void resetCursor(Object reference) { 1565 if (Cursors.isEmpty()) {1568 if (cursors.isEmpty()) { 1566 1569 setCursor(null); 1567 1570 return; 1568 1571 } 1569 CursorInfo l = Cursors.getLast();1572 CursorInfo l = cursors.getLast(); 1570 1573 stripCursors(reference); 1571 if (l != null && l.object == reference) {1572 if (Cursors.isEmpty()) {1574 if (l != null && l.object == reference) { 1575 if (cursors.isEmpty()) { 1573 1576 setCursor(null); 1574 1577 } else { 1575 setCursor( Cursors.getLast().cursor);1578 setCursor(cursors.getLast().cursor); 1576 1579 } 1577 1580 } … … 1580 1583 private void stripCursors(Object reference) { 1581 1584 LinkedList<CursorInfo> c = new LinkedList<CursorInfo>(); 1582 for(CursorInfo i : Cursors) {1585 for(CursorInfo i : cursors) { 1583 1586 if(i.object != reference) { 1584 1587 c.add(i); 1585 1588 } 1586 1589 } 1587 Cursors = c;1590 cursors = c; 1588 1591 } 1589 1592 -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r6316 r6317 831 831 public class ComparePairListModel extends AbstractListModel implements ComboBoxModel { 832 832 833 private 834 private final ArrayList<ComparePairType> compareModes;833 private int selectedIdx; 834 private final List<ComparePairType> compareModes; 835 835 836 836 public ComparePairListModel() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java
r6316 r6317 30 30 public final static String CHANGESET_IN_DETAIL_VIEW_PROP = ChangesetCacheManagerModel.class.getName() + ".changesetInDetailView"; 31 31 32 private final ArrayList<Changeset> data = new ArrayList<Changeset>();32 private final List<Changeset> data = new ArrayList<Changeset>(); 33 33 private DefaultListSelectionModel selectionModel; 34 34 private Changeset changesetInDetailView; -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r6316 r6317 424 424 425 425 protected static class AvailableSourcesListModel extends DefaultListModel { 426 private ArrayList<ExtendedSourceEntry> data;426 private List<ExtendedSourceEntry> data; 427 427 private DefaultListSelectionModel selectionModel; 428 428 -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r6296 r6317 475 475 476 476 public JToolBar control = new JToolBar(); 477 private HashMap<Object, ActionDefinition> buttonActions = new HashMap<Object, ActionDefinition>(30);477 private Map<Object, ActionDefinition> buttonActions = new HashMap<Object, ActionDefinition>(30); 478 478 479 479 @Override -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
r6084 r6317 11 11 import java.util.LinkedList; 12 12 import java.util.List; 13 import java.util.Map; 13 14 import java.util.Observable; 14 15 import java.util.Set; … … 21 22 22 23 public class PluginPreferencesModel extends Observable{ 23 private final ArrayList<PluginInformation> availablePlugins = new ArrayList<PluginInformation>();24 private final ArrayList<PluginInformation> displayedPlugins = new ArrayList<PluginInformation>();25 private final HashMap<PluginInformation, Boolean> selectedPluginsMap = new HashMap<PluginInformation, Boolean>();24 private final List<PluginInformation> availablePlugins = new ArrayList<PluginInformation>(); 25 private final List<PluginInformation> displayedPlugins = new ArrayList<PluginInformation>(); 26 private final Map<PluginInformation, Boolean> selectedPluginsMap = new HashMap<PluginInformation, Boolean>(); 26 27 private Set<String> pendingDownloads = new HashSet<String>(); 27 28 private String filterExpression; 28 29 private Set<String> currentActivePlugins; 29 30 31 /** 32 * Constructs a new {@code PluginPreferencesModel}. 33 */ 30 34 public PluginPreferencesModel() { 31 35 currentActivePlugins = new HashSet<String>(); -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
r6316 r6317 31 31 32 32 /** the bare list of AutoCompletionItems */ 33 private ArrayList<AutoCompletionListItem> list = null;33 private List<AutoCompletionListItem> list = null; 34 34 /** the filtered list of AutoCompletionItems */ 35 35 private ArrayList<AutoCompletionListItem> filtered = null; -
trunk/src/org/openstreetmap/josm/gui/util/TableCellEditorSupport.java
r3083 r6317 11 11 public class TableCellEditorSupport { 12 12 private Object editor; 13 private Li nkedList<CellEditorListener> listeners;13 private List<CellEditorListener> listeners; 14 14 15 15 public TableCellEditorSupport(Object editor) { -
trunk/src/org/openstreetmap/josm/io/Capabilities.java
r6316 r6317 8 8 import java.util.HashMap; 9 9 import java.util.List; 10 import java.util.Map; 10 11 11 12 import org.openstreetmap.josm.Main; … … 42 43 public class Capabilities { 43 44 44 private HashMap<String, HashMap<String,String>> capabilities;45 private Map<String, HashMap<String,String>> capabilities; 45 46 private List<String> imageryBlacklist; 46 47 -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r6313 r6317 24 24 import java.util.Collections; 25 25 import java.util.HashMap; 26 import java.util.Map; 26 27 27 28 import javax.xml.parsers.ParserConfigurationException; … … 75 76 76 77 // The collection of instantiated OSM APIs 77 private static HashMap<String, OsmApi> instances = new HashMap<String, OsmApi>();78 private static Map<String, OsmApi> instances = new HashMap<String, OsmApi>(); 78 79 79 80 /** -
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6310 r6317 103 103 } 104 104 105 private static double parseDouble( HashMap<String, String> map, String key) {105 private static double parseDouble(Map<String, String> map, String key) { 106 106 if (map.containsKey(key)) 107 107 return Double.parseDouble(map.get(key));
Note:
See TracChangeset
for help on using the changeset viewer.