Changeset 32902 in osm for applications/editors
- Timestamp:
- 2016-09-03T11:37:33+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/public_transport/src/public_transport
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/public_transport/src/public_transport/AbstractImporterDialog.java
r32357 r32902 139 139 140 140 public static double parseTime(String s) { 141 if ((s.charAt(2) != ':') || (s.charAt( 2) != ':') || (s.length() < 8))141 if ((s.charAt(2) != ':') || (s.charAt(5) != ':') || (s.length() < 8)) 142 142 return -1; 143 143 int hour = Integer.parseInt(s.substring(0, 2)); -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSAddCommand.java
r32357 r32902 34 34 } else { 35 35 for (int i = 0; i < gtfsStopTM.getRowCount(); ++i) 36 consideredLines.add( new Integer(i));36 consideredLines.add(Integer.valueOf(i)); 37 37 } 38 38 -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSDeleteCommand.java
r32357 r32902 34 34 } else { 35 35 for (int i = 0; i < gtfsStopTM.getRowCount(); ++i) 36 consideredLines.add( new Integer(i));36 consideredLines.add(Integer.valueOf(i)); 37 37 } 38 38 -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSImporterAction.java
r32357 r32902 7 7 import java.io.File; 8 8 import java.io.FileNotFoundException; 9 import java.io.FileReader;10 9 import java.io.IOException; 10 import java.nio.charset.StandardCharsets; 11 import java.nio.file.Files; 11 12 import java.text.DecimalFormat; 12 13 import java.text.Format; … … 148 149 149 150 private void importData(final File file) { 150 try { 151 FileReader is = new FileReader(file); 152 final BufferedReader r = new BufferedReader(is); 153 151 try (BufferedReader r = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) { 154 152 if (data == null) 155 153 data = new Vector<>(); … … 260 258 } else { 261 259 for (int i = 0; i < table.getRowCount(); ++i) 262 consideredLines.add( new Integer(i));260 consideredLines.add(Integer.valueOf(i)); 263 261 } 264 262 return consideredLines; -
applications/editors/josm/plugins/public_transport/src/public_transport/ItineraryTableModel.java
r32357 r32902 57 57 buf[0] = curName; 58 58 else 59 buf[0] = tr("[ID] {0}", ( new Long(way.getId())).toString());59 buf[0] = tr("[ID] {0}", (Long.valueOf(way.getId())).toString()); 60 60 buf[1] = role; 61 61 if (insPos == -1) { -
applications/editors/josm/plugins/public_transport/src/public_transport/PublicTransportAStar.java
r32357 r32902 2 2 3 3 import java.util.Iterator; 4 import java.util.Objects; 4 5 import java.util.TreeMap; 5 6 import java.util.TreeSet; … … 30 31 return false; 31 32 return node.equals(((NodeVertex) o).node); 33 } 34 35 @Override 36 public int hashCode() { 37 return Objects.hashCode(node); 32 38 } 33 39 -
applications/editors/josm/plugins/public_transport/src/public_transport/RoutePatternAction.java
r32357 r32902 57 57 public static int STOPLIST_ROLE_COLUMN = 2; 58 58 59 private class RoutesLSL implements ListSelectionListener {59 private static class RoutesLSL implements ListSelectionListener { 60 60 RoutePatternAction root = null; 61 61 … … 70 70 } 71 71 72 private class RouteReference implements Comparable<RouteReference> {72 private static class RouteReference implements Comparable<RouteReference> { 73 73 Relation route; 74 74 … … 141 141 } 142 142 143 private class TagTableModel extends DefaultTableModel implements TableModelListener {143 private static class TagTableModel extends DefaultTableModel implements TableModelListener { 144 144 Relation relation = null; 145 145 … … 216 216 } 217 217 218 private class CustomCellEditorTable extends JTable {218 private static class CustomCellEditorTable extends JTable { 219 219 TreeMap<Integer, TableCellEditor> col1 = null; 220 220 … … 230 230 TableCellEditor editor = null; 231 231 if (column == 0) 232 editor = col1.get( new Integer(row));232 editor = col1.get(Integer.valueOf(row)); 233 233 else 234 editor = col2.get( new Integer(row));234 editor = col2.get(Integer.valueOf(row)); 235 235 if (editor == null) 236 236 return new DefaultCellEditor(new JTextField()); … … 241 241 public void setCellEditor(int row, int column, TableCellEditor editor) { 242 242 if (column == 0) 243 col1.put( new Integer(row), editor);243 col1.put(Integer.valueOf(row), editor); 244 244 else 245 col2.put( new Integer(row), editor);245 col2.put(Integer.valueOf(row), editor); 246 246 } 247 247 } 248 248 249 private class StoplistTableModel extends DefaultTableModel {249 private static class StoplistTableModel extends DefaultTableModel { 250 250 251 251 public Vector<Node> nodes = new Vector<>(); … … 278 278 buf[0] = curName; 279 279 } else { 280 buf[0] = tr("[ID] {0}", ( new Long(node.getId())).toString());280 buf[0] = tr("[ID] {0}", (Long.valueOf(node.getId())).toString()); 281 281 } 282 282 String curRef = node.get("ref"); … … 311 311 } 312 312 313 private class SegmentMetric {313 private static class SegmentMetric { 314 314 public double aLat, aLon; 315 315 … … 347 347 } 348 348 349 private class StopReference implements Comparable<StopReference> {349 private static class StopReference implements Comparable<StopReference> { 350 350 public int index = 0; 351 351 -
applications/editors/josm/plugins/public_transport/src/public_transport/SettingsStoptypeCommand.java
r32357 r32902 13 13 14 14 public class SettingsStoptypeCommand extends Command { 15 private class HighwayRailway {15 private static class HighwayRailway { 16 16 public HighwayRailway(Node node) { 17 17 this.node = node; -
applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java
r32357 r32902 281 281 } else { 282 282 for (int i = 0; i < table.getRowCount(); ++i) 283 consideredLines.add( new Integer(i));283 consideredLines.add(Integer.valueOf(i)); 284 284 } 285 285 return consideredLines; … … 392 392 } 393 393 394 private class FocusWaypointNameAction extends AbstractAction {394 private static class FocusWaypointNameAction extends AbstractAction { 395 395 @Override 396 396 public void actionPerformed(ActionEvent e) { … … 412 412 } 413 413 414 private class FocusWaypointShelterAction extends AbstractAction {414 private static class FocusWaypointShelterAction extends AbstractAction { 415 415 private String defaultShelter = null; 416 416 … … 438 438 } 439 439 440 private class FocusTrackStoplistNameAction extends AbstractAction {440 private static class FocusTrackStoplistNameAction extends AbstractAction { 441 441 @Override 442 442 public void actionPerformed(ActionEvent e) { … … 458 458 } 459 459 460 private class FocusTrackStoplistShelterAction extends AbstractAction {460 private static class FocusTrackStoplistShelterAction extends AbstractAction { 461 461 private String defaultShelter = null; 462 462 -
applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistDeleteCommand.java
r32357 r32902 12 12 13 13 public class TrackStoplistDeleteCommand extends Command { 14 private class NodeTimeName {14 private static class NodeTimeName { 15 15 NodeTimeName(Node node, String time, String name, TransText shelter) { 16 16 this.node = node; … … 48 48 } else { 49 49 for (int i = 0; i < stoplistTM.getRowCount(); ++i) 50 workingLines.add( new Integer(i));50 workingLines.add(Integer.valueOf(i)); 51 51 } 52 52 } -
applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistDetachCommand.java
r32357 r32902 30 30 } else { 31 31 for (int i = 0; i < stoplistTM.getRowCount(); ++i) 32 consideredLines.add( new Integer(i));32 consideredLines.add(Integer.valueOf(i)); 33 33 } 34 34 -
applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistSortCommand.java
r32357 r32902 40 40 } else { 41 41 for (int i = 0; i < stoplistTM.getRowCount(); ++i) 42 workingLines.add( new Integer(i));42 workingLines.add(Integer.valueOf(i)); 43 43 } 44 44 } … … 91 91 } 92 92 93 private class NodeSortEntry implements Comparable<NodeSortEntry> {93 private static class NodeSortEntry implements Comparable<NodeSortEntry> { 94 94 public Node node = null; 95 95 -
applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsDetachCommand.java
r32357 r32902 30 30 } else { 31 31 for (int i = 0; i < waypointTM.getRowCount(); ++i) 32 consideredLines.add( new Integer(i));32 consideredLines.add(Integer.valueOf(i)); 33 33 } 34 34 -
applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsDisableCommand.java
r32357 r32902 31 31 } else { 32 32 for (int i = 0; i < waypointTM.getRowCount(); ++i) 33 consideredLines.add( new Integer(i));33 consideredLines.add(Integer.valueOf(i)); 34 34 } 35 35 -
applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsEnableCommand.java
r32357 r32902 31 31 } else { 32 32 for (int i = 0; i < waypointTM.getRowCount(); ++i) 33 consideredLines.add( new Integer(i));33 consideredLines.add(Integer.valueOf(i)); 34 34 } 35 35
Note:
See TracChangeset
for help on using the changeset viewer.