Changeset 30737 in osm for applications/editors/josm/plugins/alignways
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java
r30345 r30737 41 41 42 42 private PivotLocations currPivot; 43 Map<PivotLocations, EastNorth> pivotList = new EnumMap< PivotLocations, EastNorth>(43 Map<PivotLocations, EastNorth> pivotList = new EnumMap<>( 44 44 PivotLocations.class); 45 45 private final Color pivotColor = Color.YELLOW; 46 46 private final Color crossColor = pivotColor; 47 private final Map<Node,ArrayList<WaySegment>> adjWaySegs = new HashMap< Node,ArrayList<WaySegment>>();47 private final Map<Node,ArrayList<WaySegment>> adjWaySegs = new HashMap<>(); 48 48 49 49 public AlignWaysAlgnSegment(MapView mapview, Point p) … … 70 70 // Update the list of adjacent waysegments to the endpoints 71 71 for (Node nA : getSegmentEndPoints()) { 72 adjWaySegs.put(nA, new ArrayList< WaySegment>(determineAdjacentWaysegments(nA)));72 adjWaySegs.put(nA, new ArrayList<>(determineAdjacentWaysegments(nA))); 73 73 } 74 74 } … … 182 182 */ 183 183 private Collection<WaySegment> determineAdjacentWaysegments(Node node) { 184 Collection<WaySegment> wsSet = new HashSet< WaySegment>();184 Collection<WaySegment> wsSet = new HashSet<>(); 185 185 final double radius = 10.0; 186 186 final int stepsOnCircle = 24; -
applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java
r30631 r30737 71 71 72 72 // In order have a chance to align, (enAdjOther1, enAdjOther2 and endpoint) must be collinear 73 ArrayList<EastNorth> enAdjPts = new ArrayList< EastNorth>(3);73 ArrayList<EastNorth> enAdjPts = new ArrayList<>(3); 74 74 enAdjPts.add(enAdjOther1); 75 75 enAdjPts.add(endpoint.getEastNorth()); … … 154 154 155 155 private boolean isEnSetCollinear(ArrayList<EastNorth> enAdjPts) { 156 ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList< AlignWaysGeomPoint>();156 ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<>(); 157 157 158 158 for (EastNorth en : enAdjPts) { -
applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java
r30345 r30737 51 51 * Useful for validation. 52 52 */ 53 final Map<Node,EastNorth> calculatedNodes = new HashMap< Node,EastNorth>();53 final Map<Node,EastNorth> calculatedNodes = new HashMap<>(); 54 54 55 55 … … 73 73 * List of all old states of the objects. 74 74 */ 75 final Map<Node, Node> oldNodes = new HashMap< Node, Node>();75 final Map<Node, Node> oldNodes = new HashMap<>(); 76 76 77 77 /** … … 148 148 149 149 // "Backup" state 150 lastAffectedNodes = new HashSet< Node>();150 lastAffectedNodes = new HashSet<>(); 151 151 for (Node n : this.displaceableNodes) { 152 152 Node nodeBackup = new Node(n); -
applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java
r30345 r30737 57 57 Node node2 = segment.way.getNode(segment.lowerIndex + 1); 58 58 59 segmentEndPoints = new HashSet< Node>();59 segmentEndPoints = new HashSet<>(); 60 60 segmentEndPoints.add(node1); 61 61 segmentEndPoints.add(node2); -
applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java
r30345 r30737 99 99 100 100 Double[] dValues = {d1, d2, d3}; 101 ArrayList<Double> alValues = new ArrayList< Double>(Arrays.asList(dValues));101 ArrayList<Double> alValues = new ArrayList<>(Arrays.asList(dValues)); 102 102 Collections.sort(alValues); 103 103
Note:
See TracChangeset
for help on using the changeset viewer.