Skip to content

Releases: tginsberg/gatherers4j

Release v0.9.0

23 Feb 16:42
1445e6b
Compare
Choose a tag to compare

Documentation!

The biggest delivery in this release is the start of the Gatherers4j Documentation Website!

New Implementations

  • filterInstanceOf() to filter a stream by type more easily. Addresses #86, thanks @nipafx.
  • groupOrdered(), and groupOrderedBy() to appropriately group elements in the input stream to lists in the output stream. Addresses #88, thanks @nipafx.
  • ensureOrdred() and ensureOrderedBy() to ensure the given stream meets an ordering criteria, or fail exceptionally otherwise
  • filterOrdered() and filterOrderedBy() to remove non-ordered elements from the input stream
  • window() to provide more options to windowing functions, namely - ability to specify size, how many to skip each time, and whether to include partial windows
  • repeat(n) and repeatInfinitely() to repeatedly emit the input stream to the output stream
  • rotate(n) rotate the stream either left or right (consumes entire stream)

Renaming for Consistency

Since Gatherers are still in preview in Java 23, now is the time to rename things mostly consequence-free!

  • everyNth(n) to takeEveryNth(n) and added dropEveryNth(n) for completeness
  • filterWithIndex() to filterIndexed() to match other indexing Gatherers
  • cross() to crossWith() for consistency
  • interleave() to interleaveWith() for consistency
  • grouping() to group() and groupingBy() to groupBy() for consistency
  • last() to takeLast() to match dropLast()

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.9.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.9.0")

Release v0.8.0

01 Feb 21:06
Compare
Choose a tag to compare

What's Changed

  • Add support for orElse() and orElseEmpty() on size-based gatherers to provide a non-exceptional output stream
  • Implement everyNth() to get every nth element from the stream
  • Implement uniquelyOccurring() to emit stream elements that occur a single time
  • Implement takeUntil() to take from a stream until a predicate is met, including the first element that matches the predicate
  • Implement foldIndexed() to perform a fold along with the index of each element
  • Implement scanIndexed() to perform a scan along with the index of each element
  • Implement intersperse() to put the given element between each element of the stream
  • Implement cross(iterable), cross(iterator), and cross(stream) to combine elements in the input stream with the given source of elements

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.8.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.8.0")

Release v0.7.0

06 Jan 22:43
f08e0eb
Compare
Choose a tag to compare

What's Changed

  • Use greedy integrators where possible (Fixes #57)
  • Add JSpecify annotations for static analysis
  • Implement orderByFrequencyAscending() and orderByFrequencyDescending()
  • Implement movingProduct() and movingProductBy()
  • Implement movingSum() and movingSumBy()
  • Remove maxBy(fn) and minBy(fn), can be done with JDK methods trivially
  • Rename exactSize() to sizeExactly()
  • Implement sizeLessThan(), sizeLessThanOrEqualTo(), sizeGreaterThan(), and sizeGreaterThanOrEqualTo()
  • API Style - Functions, when used as arguments, should come last for consistency and to play nice with Kotlin (Fixes #64)

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.7.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.7.0")

Release v0.6.0

02 Nov 12:24
Compare
Choose a tag to compare

What's Changed

  • Implement dropLast(n)
  • Implement grouping() and groupingBy(fn)
  • Add support for zipWith(iterable) and zipWith(iterator)
  • Add support for interleave(iterable) and interleave(iterator)
  • Add support for appendLonger(), appendArgumentIfLonger(), and appendSourceIfLonger() on interleave()
  • Add support for argumentWhenSourceLonger(fn), sourceWhenArgumentLonger(fn), nullArgumentWhenSourceLonger(), and nullSourceWhenArgumentLonger on zipWith()

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.6.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.6.0")

Release v0.5.0

13 Oct 20:46
0416276
Compare
Choose a tag to compare

What's Changed

  • Implement reverse() - Cause a stream to be emitted in reverse (stores entire stream in memory)
  • Implement maxBy(fn) and minBy(fn) - Finds the single maximum or minimum value in a stream as defined by the function given (stores entire stream in memory)
  • Implement exactSize(n) - Ensures a stream is precisely n elements long or throws an IllegalStateException (stores entire stream in memory)

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.5.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.5.0")

Release v0.4.0

08 Oct 23:10
Compare
Choose a tag to compare

What's Changed

  • Implement suffle() and shuffle(RandomGenerator)
  • Implement filterWithIndex()
  • Implement runningProduct() and runningProductBy()
  • Implement runningSum() and runningSumBy()
  • Remove concat() implementation (the JDK has this)
  • Remove withIndexStartingAt(), not sure if this is a real use case.

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.4.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.4.0")

Release v0.3.0

19 Sep 11:33
Compare
Choose a tag to compare

What's Changed

  • Move the minimum Java version from 22 to 23

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.3.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.3.0")

v0.2.0

22 Aug 22:58
5c2a080
Compare
Choose a tag to compare

What's Changed

  • Added starting point for indexing gatherer
  • Added throttling over a time period
  • Added debounce over a time period

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.2.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.2.0")

v0.1.0

13 Aug 18:58
129991e
Compare
Choose a tag to compare

What's Changed

  • Added Standard Deviation (population and sample)
  • Refactored all BigDecimal-based Gatherers
  • Added concat

Using in Maven

<dependency>
    <groupId>com.ginsberg</groupId>
    <artifactId>gatherers4j</artifactId>
    <version>0.1.0</version>
</dependency>

Using in Gradle

implementation("com.ginsberg:gatherers4j:0.1.0")

Full Changelog: v0.0.1...v0.1.0