Releases: tginsberg/gatherers4j
Releases · tginsberg/gatherers4j
Release v0.9.0
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()
, andgroupOrderedBy()
to appropriately group elements in the input stream to lists in the output stream. Addresses #88, thanks @nipafx.ensureOrdred()
andensureOrderedBy()
to ensure the given stream meets an ordering criteria, or fail exceptionally otherwisefilterOrdered()
andfilterOrderedBy()
to remove non-ordered elements from the input streamwindow()
to provide more options to windowing functions, namely - ability to specify size, how many to skip each time, and whether to include partial windowsrepeat(n)
andrepeatInfinitely()
to repeatedly emit the input stream to the output streamrotate(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)
totakeEveryNth(n)
and addeddropEveryNth(n)
for completenessfilterWithIndex()
tofilterIndexed()
to match other indexing Gathererscross()
tocrossWith()
for consistencyinterleave()
tointerleaveWith()
for consistencygrouping()
togroup()
andgroupingBy()
togroupBy()
for consistencylast()
totakeLast()
to matchdropLast()
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
What's Changed
- Add support for
orElse()
andorElseEmpty()
on size-based gatherers to provide a non-exceptional output stream - Implement
everyNth()
to get everyn
th 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)
, andcross(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
What's Changed
- Use greedy integrators where possible (Fixes #57)
- Add JSpecify annotations for static analysis
- Implement
orderByFrequencyAscending()
andorderByFrequencyDescending()
- Implement
movingProduct()
andmovingProductBy()
- Implement
movingSum()
andmovingSumBy()
- Remove
maxBy(fn)
andminBy(fn)
, can be done with JDK methods trivially - Rename
exactSize()
tosizeExactly()
- Implement
sizeLessThan()
,sizeLessThanOrEqualTo()
,sizeGreaterThan()
, andsizeGreaterThanOrEqualTo()
- 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
What's Changed
- Implement
dropLast(n)
- Implement
grouping()
andgroupingBy(fn)
- Add support for
zipWith(iterable)
andzipWith(iterator)
- Add support for
interleave(iterable)
andinterleave(iterator)
- Add support for
appendLonger()
,appendArgumentIfLonger()
, andappendSourceIfLonger()
oninterleave()
- Add support for
argumentWhenSourceLonger(fn)
,sourceWhenArgumentLonger(fn)
,nullArgumentWhenSourceLonger()
, andnullSourceWhenArgumentLonger
onzipWith()
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
What's Changed
- Implement
reverse()
- Cause a stream to be emitted in reverse (stores entire stream in memory) - Implement
maxBy(fn)
andminBy(fn)
- Finds the single maximum or minimum value in a stream as defined by thefunction
given (stores entire stream in memory) - Implement
exactSize(n)
- Ensures a stream is preciselyn
elements long or throws anIllegalStateException
(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
What's Changed
- Implement
suffle()
andshuffle(RandomGenerator)
- Implement
filterWithIndex()
- Implement
runningProduct()
andrunningProductBy()
- Implement
runningSum()
andrunningSumBy()
- 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
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
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
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