Clean code.

This commit is contained in:
Holt59 2018-03-05 21:44:41 +01:00
parent ddcc6dc06f
commit 4b36838b26
3 changed files with 7 additions and 4 deletions

View File

@ -59,6 +59,7 @@ public class Node implements Comparable<Node> {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object) * @see java.lang.Object#equals(java.lang.Object)
*/ */
@Override @Override
@ -71,6 +72,7 @@ public class Node implements Comparable<Node> {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see java.lang.Comparable#compareTo(java.lang.Object) * @see java.lang.Comparable#compareTo(java.lang.Object)
*/ */
@Override @Override

View File

@ -4,7 +4,7 @@ package org.insa.graph;
* Class representing a point on Earth. * Class representing a point on Earth.
* *
*/ */
public class Point { public final class Point {
// Earth radius, in meters; // Earth radius, in meters;
private static final double EARTH_RADIUS = 6378137.0; private static final double EARTH_RADIUS = 6378137.0;
@ -65,6 +65,7 @@ public class Point {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
@Override @Override

View File

@ -8,8 +8,8 @@ import java.util.EnumMap;
import org.insa.graph.AccessRestrictions; import org.insa.graph.AccessRestrictions;
import org.insa.graph.AccessRestrictions.AccessMode; import org.insa.graph.AccessRestrictions.AccessMode;
import org.insa.graph.AccessRestrictions.AccessRestriction; import org.insa.graph.AccessRestrictions.AccessRestriction;
import org.insa.graph.ArcForward;
import org.insa.graph.ArcBackward; import org.insa.graph.ArcBackward;
import org.insa.graph.ArcForward;
import org.insa.graph.Graph; import org.insa.graph.Graph;
import org.insa.graph.GraphInformation; import org.insa.graph.GraphInformation;
import org.insa.graph.Node; import org.insa.graph.Node;
@ -41,7 +41,7 @@ public class BinaryGraphReaderInsa2018 extends BinaryReader implements GraphRead
// the order correspond to the 4 bits value (i.e. FORBIDDEN is 0 or PRIVATE is // the order correspond to the 4 bits value (i.e. FORBIDDEN is 0 or PRIVATE is
// 2) - UKNOWN is not included because value above 6 (FORESTRY) are all // 2) - UKNOWN is not included because value above 6 (FORESTRY) are all
// considered unknown. // considered unknown.
final AccessRestriction[] allRestrictions = new AccessRestriction[]{ final AccessRestriction[] allRestrictions = new AccessRestriction[] {
AccessRestriction.FORBIDDEN, AccessRestriction.ALLOWED, AccessRestriction.PRIVATE, AccessRestriction.FORBIDDEN, AccessRestriction.ALLOWED, AccessRestriction.PRIVATE,
AccessRestriction.DESTINATION, AccessRestriction.DELIVERY, AccessRestriction.DESTINATION, AccessRestriction.DELIVERY,
AccessRestriction.CUSTOMERS, AccessRestriction.FORESTRY }; AccessRestriction.CUSTOMERS, AccessRestriction.FORESTRY };
@ -49,7 +49,7 @@ public class BinaryGraphReaderInsa2018 extends BinaryReader implements GraphRead
// The order of values inside this array is VERY IMPORTANT: The order is such // The order of values inside this array is VERY IMPORTANT: The order is such
// that each 4-bits group of the long value is processed in the correct order, // that each 4-bits group of the long value is processed in the correct order,
// i.e. FOOT is processed first (4 lowest bits), and so on. // i.e. FOOT is processed first (4 lowest bits), and so on.
final AccessMode[] allModes = new AccessMode[]{ AccessMode.FOOT, null, AccessMode.BICYCLE, final AccessMode[] allModes = new AccessMode[] { AccessMode.FOOT, null, AccessMode.BICYCLE,
AccessMode.SMALL_MOTORCYCLE, AccessMode.AGRICULTURAL, AccessMode.MOTORCYCLE, AccessMode.SMALL_MOTORCYCLE, AccessMode.AGRICULTURAL, AccessMode.MOTORCYCLE,
AccessMode.MOTORCAR, AccessMode.HEAVY_GOODS, null, AccessMode.PUBLIC_TRANSPORT }; AccessMode.MOTORCAR, AccessMode.HEAVY_GOODS, null, AccessMode.PUBLIC_TRANSPORT };