Skip to content

Commit 35c97fe

Browse files
authored
Merge pull request #1587 from NASA-AMMOS/fix/switch-filter-by-duraitons
Switch semantics of filterLongerThan and filterShorterThan
2 parents 5c2da25 + 3801157 commit 35c97fe

File tree

1 file changed

+4
-4
lines changed
  • procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/ops

1 file changed

+4
-4
lines changed

procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/ops/GeneralOps.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ interface GeneralOps<V: IntervalLike<V>, THIS: GeneralOps<V, THIS>>: Timeline<V,
247247
*/
248248
fun filterByDuration(validInterval: Interval) = filter(true) { validInterval.contains(it.interval.duration()) }
249249

250-
/** [(DOC)][filterShorterThan] Removes objects whose duration is shorter than a given duration. */
251-
fun filterShorterThan(dur: Duration) = filter(true) { it.interval.duration() >= dur }
252-
/** [(DOC)][filterLongerThan] Removes objects whose duration is longer than a given duration. */
253-
fun filterLongerThan(dur: Duration) = filter(true) { it.interval.duration() <= dur }
250+
/** [(DOC)][filterShorterThan] Removes objects whose duration is longer than a given duration. */
251+
fun filterShorterThan(dur: Duration) = filter(true) { it.interval.duration() <= dur }
252+
/** [(DOC)][filterLongerThan] Removes objects whose duration is shorter than a given duration. */
253+
fun filterLongerThan(dur: Duration) = filter(true) { it.interval.duration() >= dur }
254254

255255
/**
256256
* [(DOC)][filterByWindows] Filters out payload objects whose intervals are not contained in the

0 commit comments

Comments
 (0)