Skip to content

Commit

Permalink
add javadoc comment to constructor of OTFVisLiveModule
Browse files Browse the repository at this point in the history
  • Loading branch information
kainagel committed May 9, 2024
1 parent df9adf9 commit 0f8e482
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
Expand Up @@ -172,7 +172,7 @@ public URL getAverageColdEmissionFactorsFileURL(URL context) {
// ===============
// ===============
/**
* @param detailedVsAverageLookupBehavior -- {@value #DETAILED_VS_AVERAGE_LOOKUP_BEHAVIOR_CMT}
* @param detailedVsAverageLookupBehavior -- {@value #DETAILED_VS_AVERAGE_LOOKUP_BEHAVIOR_CMT}
* @noinspection JavadocReference
*/
@StringSetter(DETAILED_VS_AVERAGE_LOOKUP_BEHAVIOR)
Expand Down
Expand Up @@ -37,6 +37,17 @@
import com.google.inject.Inject;

public class OTFVisLiveModule extends AbstractModule {

/**
* For win, one needs to add
* <code>
* --add-exports java.base/java.lang=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.java2d=ALL-UNNAMED
* </code>
* as arguments to the JVM to get around module protection.
*/
public OTFVisLiveModule() {
// so I can attach javadoc to this. kai, may'24
}

@Override
public void install() {
Expand Down
Expand Up @@ -15,6 +15,12 @@ public class PtFareConfigGroup extends ReflectiveConfigGroup {

public enum PtFareCalculationModels {distanceBased} // More to come (e.g. zone based, hybrid...)

private static final String PT_FARE_CALCULATION_CMT = "PT fare calculation scheme. Current implementation: distanceBased (more to come...)";
public static final String UPPER_BOUND_FACTOR_CMT = "When upper bound is applied, upperBound = upperBoundFactor * max Fare of the day. " +
"This value is decided by the ratio between average daily cost of a ticket subscription and the single " +
"trip ticket of the same trip. Usually this value should be somewhere between 1.0 and 2.0";
public static final String APPLY_UPPER_BOUND_CMT = "Enable the upper bound for daily PT fare to count for ticket subscription. Input value: true or false";

private PtFareCalculationModels ptFareCalculation = PtFareCalculationModels.distanceBased; // Use distance based calculation by default
private boolean applyUpperBound = true;
@PositiveOrZero
Expand All @@ -27,11 +33,9 @@ public PtFareConfigGroup() {
@Override
public Map<String, String> getComments() {
Map<String, String> map = super.getComments();
map.put(PT_FARE_CALCULATION, "PT fare calculation scheme. Current implementation: distanceBased (more to come...)");
map.put(APPLY_UPPER_BOUND, "Enable the upper bound for daily PT fare to count for ticket subscription. Input value: true or false");
map.put(UPPER_BOUND_FACTOR, "When upper bound is applied, upperBound = upperBoundFactor * max Fare of the day. " +
"This value is decided by the ratio between average daily cost of a ticket subscription and the single " +
"trip ticket of the same trip. Usually this value should be somewhere between 1.0 and 2.0");
map.put(PT_FARE_CALCULATION, PT_FARE_CALCULATION_CMT );
map.put(APPLY_UPPER_BOUND, APPLY_UPPER_BOUND_CMT );
map.put(UPPER_BOUND_FACTOR, UPPER_BOUND_FACTOR_CMT );
return map;
}

Expand Down Expand Up @@ -61,6 +65,9 @@ public double getUpperBoundFactor() {
return upperBoundFactor;
}

/**
* @param upperBoundFactor -- {@value #UPPER_BOUND_FACTOR_CMT}
*/
@StringSetter(UPPER_BOUND_FACTOR)
public void setUpperBoundFactor(double upperBoundFactor) {
this.upperBoundFactor = upperBoundFactor;
Expand Down

0 comments on commit 0f8e482

Please sign in to comment.