<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Comparator on pieterjd.be</title><link>https://pieterjd.github.io/tags/comparator/</link><description>Recent content in Comparator on pieterjd.be</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Wed, 03 May 2023 18:27:23 +0200</lastBuildDate><atom:link href="https://pieterjd.github.io/tags/comparator/index.xml" rel="self" type="application/rss+xml"/><item><title>Comparator and Null</title><link>https://pieterjd.github.io/posts/comparator-and-null/</link><pubDate>Wed, 03 May 2023 18:27:23 +0200</pubDate><guid>https://pieterjd.github.io/posts/comparator-and-null/</guid><description>Sorting collections has been quite easy with the &lt;code>Comparator&lt;/code> class. But how do you deal with possible &lt;code>null&lt;/code> values in for instance a &lt;code>List&lt;/code>? You probably see already the &lt;code>NullPointerException&lt;/code>s fly around, but fear not!</description></item></channel></rss>