We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
isUsedAsTimingPoint
TripStopRecord
1 parent 8202ea4 commit 2ec0a38Copy full SHA for 2ec0a38
1 file changed
src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/TripStopRecord.kt
@@ -34,10 +34,13 @@ data class TripStopRecord(
34
val note: String
35
) : HastusData() {
36
37
+ val isUsedAsTimingPoint: Boolean
38
+ get() = stopType == "T" || stopType == "R"
39
+
40
// The value of timing place is taken if the stop point is used as a timing point in journey
41
// pattern.
42
val effectiveTimingPlace: String?
- get() = timingPlace?.takeIf { stopType == "T" || stopType == "R" }
43
+ get() = timingPlace?.takeIf { isUsedAsTimingPoint }
44
45
constructor(elements: List<String>) : this(
46
tripInternalNumber = elements[1],
0 commit comments