[clean] Apply formatting and add formatter configuration.
This commit is contained in:
committed by
Mikael CAPELLE
parent
2f936d44ec
commit
730cda6426
@@ -4,41 +4,22 @@ package org.insa.graphs.model;
|
||||
* <p>
|
||||
* Class containing information for road that may be shared by multiple arcs.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Sharing information between arcs reduces memory footprints of the program (a
|
||||
* long road is often split into multiple arcs at each intersection).
|
||||
* Sharing information between arcs reduces memory footprints of the program (a long
|
||||
* road is often split into multiple arcs at each intersection).
|
||||
* </p>
|
||||
*
|
||||
*/
|
||||
public class RoadInformation {
|
||||
|
||||
/**
|
||||
* Enumeration for road types.
|
||||
*
|
||||
*
|
||||
* @see <a href=
|
||||
* "https://wiki.openstreetmap.org/wiki/Key:highway#Values">OpenStreetMap
|
||||
* reference for road types.</a>
|
||||
*/
|
||||
public enum RoadType {
|
||||
MOTORWAY,
|
||||
TRUNK,
|
||||
PRIMARY,
|
||||
SECONDARY,
|
||||
MOTORWAY_LINK,
|
||||
TRUNK_LINK,
|
||||
PRIMARY_LINK,
|
||||
SECONDARY_LINK,
|
||||
TERTIARY,
|
||||
TRACK,
|
||||
RESIDENTIAL,
|
||||
UNCLASSIFIED,
|
||||
LIVING_STREET,
|
||||
SERVICE,
|
||||
ROUNDABOUT,
|
||||
PEDESTRIAN,
|
||||
CYCLEWAY,
|
||||
COASTLINE
|
||||
MOTORWAY, TRUNK, PRIMARY, SECONDARY, MOTORWAY_LINK, TRUNK_LINK, PRIMARY_LINK, SECONDARY_LINK, TERTIARY, TRACK, RESIDENTIAL, UNCLASSIFIED, LIVING_STREET, SERVICE, ROUNDABOUT, PEDESTRIAN, CYCLEWAY, COASTLINE
|
||||
}
|
||||
|
||||
// Type of the road (see above).
|
||||
@@ -58,16 +39,15 @@ public class RoadInformation {
|
||||
|
||||
/**
|
||||
* Create a new RoadInformation instance containing the given parameters.
|
||||
*
|
||||
*
|
||||
* @param roadType Type of the road (see {@link RoadType}).
|
||||
* @param access Access restrictions for the road (see
|
||||
* {@link AccessRestrictions}).
|
||||
* @param access Access restrictions for the road (see {@link AccessRestrictions}).
|
||||
* @param isOneWay true if this road is a one way road, false otherwise.
|
||||
* @param maxSpeed Maximum speed for the road (in kilometers-per-hour).
|
||||
* @param name Name of the road.
|
||||
*/
|
||||
public RoadInformation(RoadType roadType, AccessRestrictions access, boolean isOneWay,
|
||||
int maxSpeed, String name) {
|
||||
public RoadInformation(RoadType roadType, AccessRestrictions access,
|
||||
boolean isOneWay, int maxSpeed, String name) {
|
||||
this.type = roadType;
|
||||
this.access = access;
|
||||
this.oneway = isOneWay;
|
||||
@@ -119,8 +99,8 @@ public class RoadInformation {
|
||||
if (getType() == RoadType.MOTORWAY) {
|
||||
typeAsString = "highway";
|
||||
}
|
||||
return typeAsString + " : " + getName() + " " + (isOneWay() ? " (oneway) " : "") + maxSpeed
|
||||
+ " km/h (max.)";
|
||||
return typeAsString + " : " + getName() + " " + (isOneWay() ? " (oneway) " : "")
|
||||
+ maxSpeed + " km/h (max.)";
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user