Skip to content

Commit

Permalink
apply spotless formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgamez committed Jan 29, 2025
1 parent 16e7baf commit a33b836
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ public boolean getExportNoticeSchema() {
return exportNoticeSchema;
}

/** @return true if CLI parameter combination is legal, otherwise return false */
/**
* @return true if CLI parameter combination is legal, otherwise return false
*/
public boolean validate() {
if (getExportNoticeSchema() && abortAfterNoticeSchemaExport()) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public Double getValidationTimeSeconds() {
public List<MemoryUsage> getMemoryUsageRecords() {
return memoryUsageRecords;
}

/**
* Determines if two validation reports are equal regardless of the order of the fields in the set
* of {@code NoticeReport}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ private MemoryUsageRegister() {
runtime = Runtime.getRuntime();
}

/** @return the singleton instance of the memory usage register. */
/**
* @return the singleton instance of the memory usage register.
*/
public static MemoryUsageRegister getInstance() {
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
public final class CsvFileLoader extends TableLoader {

private CsvFileLoader() {}

// Create the singleton and add a method to obtain it
private static final CsvFileLoader INSTANCE = new CsvFileLoader();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public abstract class TableLoader {

protected Multimap<SkippedValidatorReason, Class<?>> skippedValidators =
ArrayListMultimap.create();

/**
* Load the file
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class ClassGraphDiscovery {

public static final String DEFAULT_VALIDATOR_PACKAGE = "org.mobilitydata.gtfsvalidator.validator";
public static final String DEFAULT_TABLE_PACKAGE = "org.mobilitydata.gtfsvalidator.table";

/** Default packages to find notices in open-source validator. */
public static final ImmutableList<String> DEFAULT_NOTICE_PACKAGES =
ImmutableList.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public String getCommentForField(String field) {
return comments.getFieldComment(field);
}
}

/**
* Returns the description text for the notice.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public boolean approxEquals(Problem that, double maxError) {
&& that.prevMatch != null
&& this.prevMatch.approxEquals(that.prevMatch, maxError)));
}

/** Identifies particular types of stop-to-shape matching issues. */
public enum ProblemType {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ private static class VertexDist {

/** The shape point index. */
final int index;

/** The fraction of distance between the index shape point and the next point. */
final double fraction;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ public static class StopPoint {

/** The location of the stop. */
private final S2Point location;

/** The user distance along the shape for the stop, if specified. */
private final double userDistance;

/** CSV data table row for the stop_times.txt entry for this stop. */
private final GtfsStopTime stopTime;

/**
* True if this station is treated as large, so a higher distance threshold is used for
* matching.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,19 @@ public class StopToShapeMatch {

/** The index of the shape point in the shape sequence. */
private int index = 0;

/**
* The user-specified distance from the start of the shape to the matched shape location. This
* value will be zero if not specified in the data.
*/
private double userDistance = 0.0;

/** The geo distance from the start of the shape to the matched shape location. */
private double geoDistance = 0.0;

/** The geo distance from the stop to the matched shape location. */
private double geoDistanceToShape = 0.0;

/** The location of the best match on the shape for the stop. */
private S2Point location = new S2Point();

Expand Down Expand Up @@ -113,6 +117,7 @@ public boolean approxEquals(StopToShapeMatch that, double maxError) {
&& Math.abs(this.geoDistanceToShape - that.geoDistanceToShape) < maxError
&& S2Earth.getDistanceMeters(this.location, that.location) < maxError;
}

/**
* Sets geoDistanceToShape to +infinity.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ public void validate(GtfsPathway entity, NoticeContainer noticeContainer) {
static class BidirectionalExitGateNotice extends ValidationNotice {
/** The row number of the validated record. */
private final int csvRowNumber;

/** The pathway mode. */
private final int pathwayMode;

/** Whether the pathway is bidirectional. */
private final int isBidirectional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ public TimeframeOnlyStartOrEndTimeSpecifiedNotice(int csvRowNumber) {
static class TimeframeStartOrEndTimeGreaterThanTwentyFourHoursNotice extends ValidationNotice {
/** The row number for the faulty record. */
private final int csvRowNumber;

/** The time field name for the faulty record. */
private final String fieldName;

/** The invalid time value. */
private final GtfsTime time;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

package org.mobilitydata.gtfsvalidator.annotation;

/**
* Enables caching of values for a given field to optimize memory usage.
*
Expand Down

0 comments on commit a33b836

Please sign in to comment.