Skip to content

Releases: 2bllw8/either

v3.4.0

06 Jul 20:33
Compare
Choose a tag to compare
  • Documentation improvement
  • Added LeftProjection#contains
  • Added Either#from
  • Removed CheckedException (deprecated since 3.2.0)
    - Try.from(() -> {
    -  try {
    -    return Files.delete(f);
    -  } catch (IOException e) {
    -      throw new CheckedException(e);
    -    }
    - })
    + Try.from(() -> Files.delete(f))

Full Changelog: 3.3.0...3.4.0

v3.3.0

24 Mar 10:14
Compare
Choose a tag to compare
  • Add Try#stream to convert a Success to a Stream containing the held value or a Failure to an empty Stream
  • Add CheckedFunction, to be used with Try#map to allow any exception thrown during the execution of the given function to be properly caught and the return value made a Failure rather than a Success

Full Changelog: 3.2.0...3.3.0

v3.2.0

26 Feb 17:30
Compare
Choose a tag to compare
  • Documentation improvement
  • Add CheckedSupplier to be used for the Try#from method. It is no longer needed to wrap checked exceptions as they'll be handled by the Try class implementation.
    • Migration example:
- Try.from(() -> {
-  try {
-    return Files.delete(f);
-  } catch (IOException e) {
-      throw new CheckedException(e);
-    }
- })
+ Try.from(() -> Files.delete(f))

Full Changelog: 3.1.0...3.2.0

v3.1.0

13 Jan 13:41
Compare
Choose a tag to compare

Full Changelog: 3.0.0...3.1.0

v3.0.0

02 Jan 11:40
Compare
Choose a tag to compare
  • Add the Try type based on the Scala 3 Try type
    • Replaces Either<A extends Throwable, B>#tryCatch(Supplier<B>, Class<A>) and Either<A, B>#tryCatch(Supplier<B>, Function<Throwable, A>>) which are now deprecated
    • The Try type represents a computation that may either result in an exception, or return a successfully computed value. It's similar to, but semantically different from the Either type.
  • Improve implementation details of the Either type, with no public API changes

Full Changelog: 2.2.0...3.0.0

v2.2.0

24 Oct 15:44
Compare
Choose a tag to compare
  • Deprecate Either<A extends Exception, B>#fromTry(Supplier<B>, Class<A>)
    • Replaced by Either<A extends Throwable, B>#tryCatch(Supplier<B>, Class<A>)
      • Adds support for catching checked exceptions by throwing a wrapper exception CheckedException (see the javadoc for more information)
  • Add Either<A, B>#tryCatch(Supplier<B>, Function<Throwable, A>>)

Full Changelog: 2.1.0...2.2.0

v2.1.0

15 Oct 14:31
Compare
Choose a tag to compare
  • Add Either<A, B>#forEach(Consumer<A>, Consumer<B>) function: execute a given side effect function depending on whether the Either instance is a Left or Right.
  • Enforced compilation of Java 8 byte-code

v2.0.0

13 Sep 09:25
Compare
Choose a tag to compare

Re-implement the library using the Scala 3 Either type as reference.

This version is not backwards–compatible with 1.y.z versions!

Check out the API documentation to see all the new functionality!

v1.0.1

10 Sep 09:27
Compare
Choose a tag to compare

Fix an issue in the implementation of Either#hashCode() that could lead to different instances have the same hashCode

v1.0.0

09 Sep 14:36
Compare
Choose a tag to compare

Initial release