Skip to content

Commit

Permalink
also add setters for Access / Egresstimes
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbischoff committed Oct 11, 2023
1 parent f742646 commit 27ffbf5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,22 @@ public static double getStopAccessTime(TransitStopFacility stopFacility){
return accessTime!=null?(double) accessTime:0.0;
}

public static void setStopAccessTime(TransitStopFacility stopFacility, double stopAccessTime){
stopFacility.getAttributes().putAttribute(ACCESSTIME_ATTRIBUTE,stopAccessTime);
}

public static double getStopEgressTime(TransitStopFacility stopFacility){
Object egressTime = stopFacility.getAttributes().getAttribute(EGRESSTIME_ATTRIBUTE);
return egressTime!=null?(double) egressTime:0.0;
}
public static void setStopEgressTime(TransitStopFacility stopFacility, double stopEgressTime){
stopFacility.getAttributes().putAttribute(EGRESSTIME_ATTRIBUTE,stopEgressTime);
}

public static void setSymmetricStopAccessEgressTime(TransitStopFacility stopFacility, double stopAccessEgressTime){
setStopAccessTime(stopFacility,stopAccessEgressTime);
setStopEgressTime(stopFacility,stopAccessEgressTime);
}

public static QuadTree<TransitStopFacility> createQuadTreeOfTransitStopFacilities(TransitSchedule transitSchedule) {
return createQuadTreeOfTransitStopFacilities(transitSchedule.getFacilities().values());
Expand Down

0 comments on commit 27ffbf5

Please sign in to comment.