Length -> Float. Fix issue with duplicated backward arcs.

This commit is contained in:
Holt59
2018-03-12 20:43:32 +01:00
parent ec7d18b1b2
commit 95b68f3e31
3 changed files with 7 additions and 9 deletions

View File

@@ -1,6 +1,5 @@
package org.insa.graph;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -21,7 +20,7 @@ class ArcForward extends Arc {
private final RoadInformation info;
// Segments.
private final ArrayList<Point> points;
private final List<Point> points;
/**
* Create a new ArcForward with the given attributes.
@@ -33,7 +32,7 @@ class ArcForward extends Arc {
* @param points Points representing this arc.
*/
protected ArcForward(Node origin, Node dest, float length, RoadInformation roadInformation,
ArrayList<Point> points) {
List<Point> points) {
this.origin = origin;
this.destination = dest;
this.length = length;
@@ -52,7 +51,7 @@ class ArcForward extends Arc {
}
@Override
public double getLength() {
public float getLength() {
return length;
}