Changeset 10788 in josm
- Timestamp:
- 2016-08-12T12:17:25+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r10657 r10788 67 67 import org.openstreetmap.josm.tools.CheckParameterUtil; 68 68 import org.openstreetmap.josm.tools.ColorHelper; 69 import org.openstreetmap.josm.tools.FilteredCollection;70 69 import org.openstreetmap.josm.tools.I18n; 71 70 import org.openstreetmap.josm.tools.MultiMap; 71 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 72 72 import org.openstreetmap.josm.tools.Utils; 73 73 import org.xml.sax.SAXException; … … 507 507 public synchronized void save() throws IOException { 508 508 save(getPreferenceFile(), 509 new FilteredCollection<>(settingsMap.entrySet(), NO_DEFAULT_SETTINGS_ENTRY), false);509 new SubclassFilteredCollection<>(settingsMap.entrySet(), NO_DEFAULT_SETTINGS_ENTRY), false); 510 510 } 511 511 -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r10748 r10788 47 47 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 48 48 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager; 49 import org.openstreetmap.josm.tools.FilteredCollection;50 49 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 51 50 import org.openstreetmap.josm.tools.Utils; … … 613 612 */ 614 613 public Collection<OsmPrimitive> getSelectedNodesAndWays() { 615 return new FilteredCollection<>(getSelected(), primitive -> primitive instanceof Node || primitive instanceof Way);614 return new SubclassFilteredCollection<>(getSelected(), primitive -> primitive instanceof Node || primitive instanceof Way); 616 615 } 617 616 -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r10611 r10788 12 12 import java.util.ArrayList; 13 13 import java.util.Arrays; 14 import java.util.Collection; 14 15 import java.util.LinkedHashSet; 15 16 import java.util.List; … … 45 46 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener; 46 47 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 47 import org.openstreetmap.josm.tools.FilteredCollection;48 48 import org.openstreetmap.josm.tools.GBC; 49 49 import org.openstreetmap.josm.tools.ImageProvider; 50 50 import org.openstreetmap.josm.tools.InputMapUtils; 51 51 import org.openstreetmap.josm.tools.Shortcut; 52 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 52 53 53 54 /** … … 331 332 * @return collection of affected primitives, onluy usable ones 332 333 */ 333 protected static FilteredCollection<? extends OsmPrimitive> getAffectedPrimitives(TreePath path) {334 protected static Collection<? extends OsmPrimitive> getAffectedPrimitives(TreePath path) { 334 335 PseudoCommand c = ((CommandListMutableTreeNode) path.getLastPathComponent()).getCommand(); 335 336 final OsmDataLayer currentLayer = Main.getLayerManager().getEditLayer(); 336 return new FilteredCollection<>(337 return new SubclassFilteredCollection<>( 337 338 c.getParticipatingPrimitives(), 338 339 o -> { -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r10716 r10788 96 96 import org.openstreetmap.josm.io.OsmImporter; 97 97 import org.openstreetmap.josm.tools.CheckParameterUtil; 98 import org.openstreetmap.josm.tools.FilteredCollection;99 98 import org.openstreetmap.josm.tools.GBC; 100 99 import org.openstreetmap.josm.tools.ImageOverlay; 101 100 import org.openstreetmap.josm.tools.ImageProvider; 102 101 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 102 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 103 103 import org.openstreetmap.josm.tools.date.DateUtils; 104 104 … … 425 425 426 426 @Override public String getToolTipText() { 427 int nodes = new FilteredCollection<>(data.getNodes(), p -> !p.isDeleted()).size();428 int ways = new FilteredCollection<>(data.getWays(), p -> !p.isDeleted()).size();429 int rels = new FilteredCollection<>(data.getRelations(), p -> !p.isDeleted()).size();427 int nodes = new SubclassFilteredCollection<>(data.getNodes(), p -> !p.isDeleted()).size(); 428 int ways = new SubclassFilteredCollection<>(data.getWays(), p -> !p.isDeleted()).size(); 429 int rels = new SubclassFilteredCollection<>(data.getRelations(), p -> !p.isDeleted()).size(); 430 430 431 431 String tool = trn("{0} node", "{0} nodes", nodes, nodes)+", ";
Note:
See TracChangeset
for help on using the changeset viewer.