If you prefer video, I have a video version of this Java Map tutorial available here: comparison = SingleTokenStats.COMP_BY_LAST_USE_THEN_COUNTER.compare(current, candidate); // candidate was updated more recently (or has a bigger counter in case of perfectly equivalent dates), List