Skip to content

Commit

Permalink
Switch semantics of filterLongerThan and filterShorterThan
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney committed Oct 25, 2024
1 parent 524474c commit 0c948e7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ interface GeneralOps<V: IntervalLike<V>, THIS: GeneralOps<V, THIS>>: Timeline<V,
*/
fun filterByDuration(validInterval: Interval) = filter(true) { validInterval.contains(it.interval.duration()) }

/** [(DOC)][filterShorterThan] Removes objects whose duration is shorter than a given duration. */
fun filterShorterThan(dur: Duration) = filter(true) { it.interval.duration() >= 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
Expand Down

0 comments on commit 0c948e7

Please sign in to comment.