Showing posts with label lambdas. Show all posts
Showing posts with label lambdas. Show all posts

Thursday, 12 March 2015

Java: handling null in getter method chains

Null is just something you need to deal with in Java. This post looks at the mechanism for handling chained method calls without causing a NullPointerException.

This post uses Java 8.

Sunday, 10 August 2014

Java: easy equals/hashCode/toString (less boilerplate; no magic)

This post describes a way to implement the equals hashCode and toString methods with relative brevity using Java 8 and KλudJe.

Tuesday, 22 July 2014

Java: arbitrary functional interfaces and checked exceptions in Java 8

The last couple of posts have covered how to handle exceptions with Java 8 functional interfaces. This post discusses how to handle arbitrary functional interfaces as of KλudJe 0.2.

Saturday, 19 July 2014

Java: lambdas, streams and IOException

The last post discussed exception handling with KλudJe in broad terms. This post presents a more practical example with the Stream type and I/O.

Sunday, 15 June 2014

Java: lambdas and easy checked exception handling with KλudJe

This post describes an approach to handling checked exceptions using Java 8 lambdas without adding try/catch blocks everywhere.

Sunday, 15 September 2013

Java: "Did you mean 'stream'?" (Java 8 pre-release)

This post re-implements the "did you mean..?" spell checker from an earlier post using the new Stream type in Java 8.

Saturday, 14 September 2013

Java: lambdas, streams and functions (Java 8 pre-release)

The JDK 8 Developer Preview came out recently so I thought I would take a look at the API enhancements. This post demonstrates how refactoring to utilize the new types can change code.

This post refers to JDK build 1.8.0-ea-b106. IntelliJ IDEA has good Java 8 syntax support.

Wednesday, 22 August 2012

Java: checked exceptions and lambdas in Java 8 (pre-release)

Update: Java 8 has been released and I've implemented a library with a more elegant approach to exception handling than the one described in this post: details + downloads; source code; blog posts.


This post looks at the effect of lambdas on checked exception handling.

This code uses a pre-release Java 8 build. See the previous post for more.

Sunday, 19 August 2012

Java: lambda support in Java 8 (pre-release)

Pre-release builds of Java 8 with lambda support are available for download. This post looks at lambda-8-b50-linux-x64-26_jul_2012.tar.gz.