#guava

Interesting links podcast, episode 4

Welcome to the fourth ##java podcast. I’m Joseph Ottinger, dreamreal on the IRC channel, and it’s Monday, 2017 October 16. This podcast covers news and interesting things from the ##java IRC channel; if you see something interesting that’s related to Java, feel free to submit it to the channel bot, with ~submit and a URL to the interesting thing, or you can also write an article for the channel blog as well...

6 minute(s) read

Immutability in Java

Recently in ##java, we had a discussion on what constitutes “immutability” and how to implement it in java properly. Immutability is a core concept for functional programming, and as mainstream languages and ecosystems “catch up” with the safer, less error-prone ideas from functional programming, immutability is wanted in Java projects as well. What is immutability? Asking programmers for their definition of immutability, you will usually receive an answer such as this: An object is...

9 minute(s) read

Interesting Links – 4 Nov 2016

Oh, boy, a bunch of releases: Guava 20, the ultra-useful third-party library for Java that virtually everyone can and should be willing to use, has been released… MongoDB 3.4, the NoSQL document database used by jabavot and many others, has been released… LWJGL 3.1.0, the lightweight java graphics library, has been released… Finally, DZone publishes something I wanted to read: “Everything You Want to Know About ThreadLocal Random Implementation,” a...

1 minute(s) read

Guava's Equivalence: strategy for equals()/hashCode()

Introduction Given a class C, if you want to implement ordering, you have two choices: Have your class implement Comparable<c> (or Comparable<x>, where X is a superclass of C). Define a Comparator<c> to use with this class (or a Comparator<x>, where X is a superclass of C). In fact, many classes in the JDK will have you supply a Comparator if your class...

4 minute(s) read