Skip to content

Releases: digipost/digg

InputStreamIterator

13 Jun 15:15
7390e5f
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.34...0.35

0.34 NonEmptyList copy-constructors accepts Collection

20 Feb 16:29
65db4df
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.33...0.34

0.33: Merge pull request #30 from digipost/countdown-targetstate

02 Jan 13:11
1f7a5a7
Compare
Choose a tag to compare

#30

A TargetState is used to determine is a certain state has been reached yet, commonly by querying TargetState.yet():

final TargetState cancelled;
...
    if (!cancelled.yet()) {
        // do work 
    }

A CountDown is an internally managed TargetState which by itself reaches its target state of "count down reached zero" after an exact amount of queries to CountDown.yet().

The typical use-case for this is testing.

DiggExceptions.asUnchecked(..) enhancements

06 Oct 13:57
c9897b5
Compare
Choose a tag to compare

DiggExceptions.asUnchecked(..) enhancements #26

Some very minor enhancements to the utility for "translating" any exception into an unchecked one (which may always be thrown).

BisectSearch utility

06 Oct 13:56
460b8f2
Compare
Choose a tag to compare

BisectSearch utility: #25

Adds a util for performing bisection search (or binary searches) on ordered sets of arbitrary objects. The objects can be generated as needed based on an ordered index (where it "would" appear in an ordered set of the objects), and as such does not need to be existing instances in memory in order to be searched.

Non-empty lists and streams

27 Jan 00:35
a649eb3
Compare
Choose a tag to compare

The JDK provides Collections and Stream for expressing a multitude of zero to arbitrary many elements, while many actual domains deals with one to many elements. While using the general case of e.g. a List to model this works all fine, it would be even better to have a generic data structure, with first-class support from the type system, to eliminate the illegal state of zero elements as early as possible, and in many cases also to offer some operations which are guarantied to be safe having one or more elements.

The 0.26 release adds two concepts: the NonEmptyList<T> and NonEmptyStream<T>. The stream implementation is independent of the list, but the NonEmptyList knows how to transform into a NonEmptyStream through its regular .stream() method, overridden to return the more specific NonEmptyStream type.

A Collector concept is also introduced for a more sensible transition from a non-empty stream back to a non-empty container, e.g. a non-empty list, by including an interface for the specific "result" type parameter of the Collector being an Optional. This allows to explicitly "flag" a collector of result-type Optional to produce its result based on if the source stream is empty or not, and the NonEmptyStream can detect on a type level when such collector is used, and bypass the redundant Optional and instead yield the result directly.

Please refer to the updated readme for more details and code examples.

Compatibility

This release breaks backwards binary compatibility because it changes the return types of a few static methods in DiggCollectors. Source compatibility is however not affected by these changes. In practice, this means that if you depend on this new v0.26 release while also depending on another library which depends on an earlier version of Digg, things may break at runtime. However, the admittedly limited prevalence of Digg makes this highly unlikely, and has been considered to warrant yet another minor pre-1.0 release.

Java 11 support

05 Dec 13:16
8651b44
Compare
Choose a tag to compare
  • Removed SimpleXmlAdapter.java and can now build on java 11

ControllableClock enhancements

20 Feb 12:15
Compare
Choose a tag to compare

New

This release brings some enhancements to ControllableClock:

Compatibility notes

This release breaks backwards compatibility for ControllableClock.

If you are upgrading and