From 3801157e5fa926a4989f7f7b9d5d865a26e5658e Mon Sep 17 00:00:00 2001 From: JoelCourtney Date: Fri, 25 Oct 2024 15:54:55 -0700 Subject: [PATCH] Switch semantics of filterLongerThan and filterShorterThan --- .../ammos/aerie/procedural/timeline/ops/GeneralOps.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/ops/GeneralOps.kt b/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/ops/GeneralOps.kt index efc885b2a7..466469bb4c 100644 --- a/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/ops/GeneralOps.kt +++ b/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/ops/GeneralOps.kt @@ -247,10 +247,10 @@ interface GeneralOps, THIS: GeneralOps>: Timeline= dur } - /** [(DOC)][filterLongerThan] Removes objects whose duration is longer than a given duration. */ - fun filterLongerThan(dur: Duration) = filter(true) { it.interval.duration() <= dur } + /** [(DOC)][filterShorterThan] Removes objects whose duration is longer than a given duration. */ + fun filterShorterThan(dur: Duration) = filter(true) { it.interval.duration() <= dur } + /** [(DOC)][filterLongerThan] Removes objects whose duration is shorter than a given duration. */ + fun filterLongerThan(dur: Duration) = filter(true) { it.interval.duration() >= dur } /** * [(DOC)][filterByWindows] Filters out payload objects whose intervals are not contained in the