[model] Clean Java classes.

This commit is contained in:
Mikaël Capelle
2020-03-27 13:10:36 +01:00
committed by Mikael CAPELLE
parent c9ff67b10e
commit 2f936d44ec
11 changed files with 71 additions and 78 deletions

View File

@@ -33,23 +33,23 @@ public final class Node implements Comparable<Node> {
* corresponding backward arc is created and add to destination.
* </p>
*
* @param origin Origin of the arc.
* @param destination Destination of the arc.
* @param length Length of the arc.
* @param origin Origin of the arc.
* @param destination Destination of the arc.
* @param length Length of the arc.
* @param roadInformation Information corresponding to the arc.
* @param points Points for the arc.
* @param points Points for the arc.
*
* @return The newly created forward arc (origin to destination).
*/
public static Arc linkNodes(Node origin, Node destination, float length,
RoadInformation roadInformation, ArrayList<Point> points) {
Arc arc = null;
final Arc arc;
if (roadInformation.isOneWay()) {
arc = new ArcForward(origin, destination, length, roadInformation, points);
origin.addSuccessor(arc);
}
else {
Arc d2o;
final Arc d2o;
if (origin.getId() < destination.getId()) {
arc = new ArcForward(origin, destination, length, roadInformation, points);
d2o = new ArcBackward(arc);
@@ -78,7 +78,7 @@ public final class Node implements Comparable<Node> {
* Create a new Node with the given ID corresponding to the given Point with an
* empty list of successors.
*
* @param id ID of the node.
* @param id ID of the node.
* @param point Position of the node.
*/
public Node(int id, Point point) {