Skip to content

Commit

Permalink
Fix Javadoc to adhere to Java 11's stricter syntax rules
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Sep 5, 2019
1 parent 58c70e7 commit e39bfd0
Show file tree
Hide file tree
Showing 59 changed files with 120 additions and 118 deletions.
Expand Up @@ -35,7 +35,7 @@ public DoubleComparator(Map<QuadEdge,Double> map) {
* @param qeB
* quad edge to compare
* @return
* 1 if double value associated to qeA < double
* 1 if double value associated to qeA less than double
* value associated to qeB,
* 0 if values are equals,
* -1 otherwise
Expand Down
Expand Up @@ -64,7 +64,7 @@ else if (CRS.getAxisOrder(destCrs) == CRS.AxisOrder.EAST_NORTH)
if (!destCrs.equals(sourceCrs)) {
transform = true;

// find the transformation, being strict about datums &c.
// find the transformation, being strict about datums etc.
mathTransform = CRS.findMathTransform(sourceCrs, destCrs, false);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/opentripplanner/analyst/core/Tile.java
Expand Up @@ -30,10 +30,12 @@
* Result is stored in image pixel as a signed byte.
*
* So:
* {@code
* -119 to +119 are interpreted literally,
* +120 means >= +120,
* -120 means <= -120,
* -128 means "unreachable".
* }
*/
public abstract class Tile {

Expand Down
36 changes: 18 additions & 18 deletions src/main/java/org/opentripplanner/api/model/WalkStep.java
Expand Up @@ -17,28 +17,28 @@
/**
* Represents one instruction in walking directions. Three examples from New York City:
* <p>
* Turn onto Broadway from W 57th St (coming from 7th Ave): <br/>
* distance = 100 (say) <br/>
* walkDirection = RIGHT <br/>
* streetName = Broadway <br/>
* everything else null/false <br/>
* Turn onto Broadway from W 57th St (coming from 7th Ave): <br>
* distance = 100 (say) <br>
* walkDirection = RIGHT <br>
* streetName = Broadway <br>
* everything else null/false <br>
* </p>
* <p>
* Now, turn from Broadway onto Central Park S via Columbus Circle <br/>
* distance = 200 (say) <br/>
* walkDirection = CIRCLE_COUNTERCLOCKWISE <br/>
* streetName = Central Park S <br/>
* exit = 1 (first exit) <br/>
* immediately everything else false <br/>
* Now, turn from Broadway onto Central Park S via Columbus Circle <br>
* distance = 200 (say) <br>
* walkDirection = CIRCLE_COUNTERCLOCKWISE <br>
* streetName = Central Park S <br>
* exit = 1 (first exit) <br>
* immediately everything else false <br>
* </p>
* <p>
* Instead, go through the circle to continue on Broadway <br/>
* distance = 100 (say) <br/>
* walkDirection = CIRCLE_COUNTERCLOCKWISE <br/>
* streetName = Broadway <br/>
* exit = 3 <br/>
* stayOn = true <br/>
* everything else false <br/>
* Instead, go through the circle to continue on Broadway <br>
* distance = 100 (say) <br>
* walkDirection = CIRCLE_COUNTERCLOCKWISE <br>
* streetName = Broadway <br>
* exit = 3 <br>
* stayOn = true <br>
* everything else false <br>
* </p>
* */
public class WalkStep {
Expand Down
Expand Up @@ -42,7 +42,7 @@
* Tile rendering goes through TileRendererManager which select the appropriate renderer for the
* given layer.
*
* @see TileRendererManager
* @see org.opentripplanner.inspector.TileRendererManager
* @see TileRenderer
*
* @author laurent
Expand Down
Expand Up @@ -47,10 +47,10 @@
*
* Example of request:
*
* <code>
* {@code
* http://localhost:8080/otp-rest-servlet/ws/isochrone?routerId=bordeaux&algorithm=accSampling&fromPlace=47.059,-0.880&date=2013/10/01&time=12:00:00&maxWalkDistance=1000&mode=WALK,TRANSIT&cutoffSec=1800&cutoffSec=3600
* </code>
*
* }
*
* @author laurent
*/
@Path("/routers/{routerId}/isochrone")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/opentripplanner/api/resource/Routers.java
Expand Up @@ -62,7 +62,7 @@
* For example:
*
* GET http://localhost/otp-rest-servlet/ws/routers
* will retrieve a list of all registered routerId -> Graph mappings and their geographic bounds.
* will retrieve a list of all registered routerId Graph mappings and their geographic bounds.
*
* GET http://localhost/otp-rest-servlet/ws/routers/london
* will return status code 200 and a brief description of the 'london' graph including geographic
Expand Down Expand Up @@ -112,7 +112,7 @@ public RouterList getRouterIds() {

/**
* Returns the bounds for a specific routerId, or verifies whether it is registered.
* @returns status code 200 if the routerId is registered, otherwise a 404.
* @return status code 200 if the routerId is registered, otherwise a 404.
*/
@GET @Path("{routerId}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML + Q, MediaType.TEXT_XML + Q })
Expand Down
Expand Up @@ -97,9 +97,11 @@ public class SIsochrone extends RoutingResource {
* and distortions towards an ellipse will appear if it is transformed/projected to the user location.
* <p>
* An example request may look like this:
* {@code
* localhost:8080/otp-rest-servlet/ws/iso?layers=traveltime&styles=mask&batch=true&fromPlace=51.040193121307176
* %2C-114.04471635818481&toPlace
* =51.09098935%2C-113.95179705&time=2012-06-06T08%3A00%3A00&mode=WALK&maxWalkDistance=10000&walkSpeed=1.38&walkTime=10.7&output=EDGES
* =51.09098935%2C-113.95179705&time=2012-06-06T08%3A00%3A00&mode=WALK&maxWalkDistance=10000&walkSpeed=1.38&walkTime=10.7&output=EDGES
* }
* Though the first parameters (i) layer, (ii) styles and (iii) batch could be discarded.
*
* @param walkmins Maximum number of minutes to walk.
Expand Down
Expand Up @@ -32,9 +32,9 @@
*
* Example of request:
*
* <code>
* {@code
* http://localhost:8080/otp/routers/bordeaux/timegrid?fromPlace=47.059,-0.880&date=2013/10/01&time=12:00:00&maxWalkDistance=1000&maxTimeSec=3600&mode=WALK,TRANSIT
* </code>
* }
*
* @author laurent
*/
Expand Down
Expand Up @@ -5,7 +5,7 @@
import java.util.TimeZone;

/**
* Represents a repeating time period, used for opening hours &c.
* Represents a repeating time period, used for opening hours etc.
* For instance: Monday - Friday 8AM to 8PM, Satuday 10AM to 5PM, Sunday closed.
* For now it is week-based so doesn't handle every possible case, but since it is encapsulated
* that could conceivably be changed.
Expand Down
Expand Up @@ -31,7 +31,7 @@ public final class CompactElevationProfile implements Serializable {
/**
* Compact an elevation profile onto a var-len int packed form (Dlugosz coding).
*
* @param profile The elevation profile to compact
* @param elevation The elevation profile to compact
* @return The compacted format
*/
public static byte[] compactElevationProfile(CoordinateSequence elevation) {
Expand Down
Expand Up @@ -164,11 +164,6 @@ public static LineString uncompactLineString(double xa, double ya, double xb, do
/**
* Same as the other version, but in a var-len int packed form (Dlugosz coding).
*
* @param x0
* @param y0
* @param x1
* @param y1
* @param coords
* @return
*/
public static LineString uncompackLineString(double x0, double y0, double x1, double y1,
Expand Down
Expand Up @@ -338,7 +338,7 @@ public static class Float extends PackedCoordinateSequence {
float[] coords;

/**
* Constructs a packed coordinate sequence from an array of <code>float<code>s
* Constructs a packed coordinate sequence from an array of {@code float}s
*
* @param coords
* @param dimensions
Expand All @@ -356,7 +356,7 @@ public Float(float[] coords, int dimensions) {
}

/**
* Constructs a packed coordinate sequence from an array of <code>double<code>s
* Constructs a packed coordinate sequence from an array of ${@code double}s
*/
public Float(double[] coordinates, int dimensions) {
this.coords = new float[coordinates.length];
Expand Down
Expand Up @@ -48,14 +48,16 @@ public Builder id(String id) {

/**
* Extracts a feed_id from the passed source for a GTFS feed.
* <p/>
* <p>
* This will try to fetch the experimental feed_id field from the feed_info.txt file.
* <p/>
* </p>
* <p>
* If the feed does not contain a feed_info.txt or a feed_id field a default GtfsFeedId will be created.
* </p>
*
* @param source the input source
* @return A GtfsFeedId
* @throws IOException
* @throws RuntimeException
* @see <a href="http://developer.trimet.org/gtfs_ext.shtml">http://developer.trimet.org/gtfs_ext.shtml</a>
*/
public Builder fromGtfsFeed(CsvInputSource source) {
Expand Down
Expand Up @@ -23,8 +23,8 @@
* Uses the shapes from GTFS to determine which streets buses drive on. This is used to improve the quality of
* the stop-to-street linkage. It encourages the linker to link to streets where transit actually travels.
*
* GTFS provides a mapping from trips->shapes. This module provides a mapping from stops->trips and shapes->edges.
* Then transitively we get a mapping from stop->edges.
* GTFS provides a mapping from tripsshapes. This module provides a mapping from stopstrips and shapesedges.
* Then transitively we get a mapping from stopedges.
* The edges that "belong" to a stop are favored when linking that stop to the street network.
*/
public class BusRouteStreetMatcher implements GraphBuilderModule {
Expand Down
Expand Up @@ -120,7 +120,7 @@ public void next() {
/**
* Checks whether the iterator cursor is pointing to the endpoint of a linestring.
*
* @return <code>true</true> if the iterator is at an endpoint
* @return <code>true</code> if the iterator is at an endpoint
*/
public boolean isEndOfLine() {
if (componentIndex >= numLines)
Expand Down
Expand Up @@ -33,14 +33,17 @@ public static class RingConstructionException extends RuntimeException {
private Polygon jtsPolygon;

/**
* <p>
* Why is there a boolean parameter called javaSucks? Because otherwise the two constructors
* have the same erasure, meaning that even though Java has enough information at compile-time
* to figure out which constructor I am talking about, it intentionally throws this away in the
* interest of having worse run-time performance. Thanks, Java!
* <p/>
* </p>
* <p>
* Oh, and most people would solve this problem by making a static factory method but that won't
* work because then all of this class's outer classes would have to be static.
*
* </p>
*
* @param osmNodes
* @param javaSucks
*/
Expand Down
Expand Up @@ -43,7 +43,7 @@ public static String generate(String pattern, OSMWithTags way) {
* Tag names between {} are replaced by the OSM tag value, if it is present (or the empty
* string if not).
* @param way The way containing the tag values
* @return A map language code -> text, with at least one entry for the default language, and
* @return A map language code text, with at least one entry for the default language, and
* any other language found in OSM tag.
*/
public static Map<String, String> generateI18N(String pattern, OSMWithTags way) {
Expand Down
Expand Up @@ -59,9 +59,10 @@
* safety preferences. Ted Chiang's "Story Of Your Life" describes how a very similar problem in
* optics gives rise to Snell's Law. It is the second-best story about a law of physics that I know
* of (Chiang's "Exhalation" is the first).
* <p/>
* <p>
* Anyway, since we're not going to run an O(N^3) algorithm at runtime just to give people who don't
* understand Snell's Law weird paths that they can complain about, this should be just fine.
* </p>
*
*/
public class WalkableAreaBuilder {
Expand Down
Expand Up @@ -27,7 +27,7 @@ public SimpleFeatureConverter<String> getIdConverter() {
/**
* Sets the converter which gets IDs from features.
*
* @{see setIdAttribute}
* @see ShapefileStreetSchema#setIdAttribute
*/
public void setIdConverter(SimpleFeatureConverter<String> idConverter) {
this.idConverter = idConverter;
Expand Down Expand Up @@ -78,7 +78,6 @@ public void setPermissionConverter(
* street to have the same odds of dying as if you biked one mile on this street. For example,
* if bike lanes reduce risk by a factor of 3, the safety factor would be 0.33...
*
* @return
*/
public void setBicycleSafetyConverter(SimpleFeatureConverter<P2<Double>> safetyConverter) {
this.bicycleSafetyConverter = safetyConverter;
Expand Down
Expand Up @@ -10,7 +10,7 @@ public class TransitType extends AbstractStopTester {


/**
* @retrun return true if a transit type of type transitType is pass through that stop
* return true if a transit type of type transitType is pass through that stop
*/
@Override
public boolean fulfillDemands(TransitStop ts, Graph graph) {
Expand Down
Expand Up @@ -12,7 +12,7 @@ public class UnconnectedStop extends AbstractStopTester {


/**
* @retrun return true if the stop is not connected to any street
* return true if the stop is not connected to any street
*/
@Override
public boolean fulfillDemands(TransitStop ts, Graph graph) {
Expand Down
Expand Up @@ -3,12 +3,13 @@
import org.geotools.data.FeatureSource;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
import org.opentripplanner.graph_builder.services.GraphBuilderModule;

public interface FeatureSourceFactory {
public FeatureSource<SimpleFeatureType, SimpleFeature> getFeatureSource();

public void cleanup();

/** @see GraphBuilder.checkInputs() */
/** @see GraphBuilderModule#checkInputs() */
public void checkInputs();
}
16 changes: 8 additions & 8 deletions src/main/java/org/opentripplanner/gtfs/BikeAccess.java
Expand Up @@ -12,9 +12,9 @@
* It proposes "route_bikes_allowed" in routes.txt and "trip_bikes_allowed" in trips.txt with the
* following semantics:
*
* 2: bikes allowed<br/>
* 1: no bikes allowed<br/>
* 0: no information (same as field omitted)<br/>
* 2: bikes allowed<br>
* 1: no bikes allowed<br>
* 0: no information (same as field omitted)<br>
*
* The values in trips.txt override the values in routes.txt.
*
Expand All @@ -24,9 +24,9 @@
* Here, the field "bikes_allowed" is used in both routes.txt and trip.txt with the following
* semantics:
*
* 2: no bikes allowed<br/>
* 1: bikes allowed<br/>
* 0: no information (same as field omitted)<br/>
* 2: no bikes allowed<br>
* 1: bikes allowed<br>
* 0: no information (same as field omitted)<br>
*
* Here, the 0,1,2 semantics have been changed to match the convention used in the
* "wheelchair_accessible" field in trips.txt.
Expand Down Expand Up @@ -87,7 +87,7 @@ public static void setForTrip(Trip trip, BikeAccess access) {
}

/**
* @Improvment This method could be removed, if the logic was not part of the GTFS import,
* Improvement: This method could be removed, if the logic was not part of the GTFS import,
* but rader applyed after the GTFS model is mapped into OTP.
*/
@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -121,7 +121,7 @@ public static BikeAccess fromTrip(org.onebusaway.gtfs.model.Trip gtfsTrip) {
}

/**
* @Improvment This method could be removed, if the logic was not part of the GTFS import,
* Improvement This method could be removed, if the logic was not part of the GTFS import,
* but rader applyed after the GTFS model is mapped into OTP.
*/
@SuppressWarnings("deprecation")
Expand Down
Expand Up @@ -27,7 +27,6 @@ public class AnalysisUtils {
* of nodes) will not overlap any other components (it will have holes); the others may overlap
* each other.
*
* @param dateTime
*/
public static List<Geometry> getComponentPolygons(Graph graph, RoutingRequest options,
long time) {
Expand Down
Expand Up @@ -12,8 +12,8 @@
* Parser for the OpenStreetMap PBF format. Parses files in three passes:
* First the relations, then the ways, then the nodes are also loaded.
*
* @see http://wiki.openstreetmap.org/wiki/PBF_Format
* @see org.opentripplanner.openstreetmap.services.graph_builder.services.osm.OpenStreetMapContentHandler#biPhase
* See http://wiki.openstreetmap.org/wiki/PBF_Format
* @see OpenStreetMapContentHandler
* @since 0.4
*/
public class BinaryFileBasedOpenStreetMapProviderImpl implements OpenStreetMapProvider {
Expand Down

0 comments on commit e39bfd0

Please sign in to comment.