Changeset 36270 in osm for applications/editors
- Timestamp:
- 2024-06-04T23:55:44+02:00 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/property/RoadMaxspeed.java
r32620 r36270 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.graphview.core.property; 3 4 import java.util.Objects; 3 5 4 6 import org.openstreetmap.josm.plugins.graphview.core.access.AccessParameters; … … 34 36 public <N, W, R, M> Float evaluateN(N node, AccessParameters accessParameters, 35 37 DataSource<N, W, R, M> dataSource) { 36 assert node != null && accessParameters != null && dataSource != null; 38 Objects.requireNonNull(node); 39 Objects.requireNonNull(dataSource); 37 40 38 41 initializeIfNecessary(dataSource); … … 44 47 public <N, W, R, M> Float evaluateW(W way, boolean forward, AccessParameters accessParameters, 45 48 DataSource<N, W, R, M> dataSource) { 46 assert way != null && accessParameters != null && dataSource != null; 49 Objects.requireNonNull(dataSource); 50 Objects.requireNonNull(way); 47 51 48 52 initializeIfNecessary(dataSource); … … 55 59 56 60 if (maxspeedString != null) { 57 58 Float maxspeed = ValueStringParser.parseSpeed(maxspeedString); 59 if (maxspeed != null) { 60 return maxspeed; 61 } 62 61 return ValueStringParser.parseSpeed(maxspeedString); 63 62 } 64 63 … … 68 67 @Override 69 68 public boolean isUsable(Object propertyValue, AccessParameters accessParameters) { 70 assert propertyValue instanceof Float; 71 return true; 69 return propertyValue instanceof Float; 72 70 } 73 71
Note:
See TracChangeset
for help on using the changeset viewer.