1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc
.squirreljme
.plugin
.util
;
12 import java
.time
.LocalDate
;
14 import java
.util
.TreeMap
;
21 public class NoteUsers
23 /** Represents the users. */
24 public final Map
<String
, NoteUser
> users
=
25 new TreeMap
<>(String
.CASE_INSENSITIVE_ORDER
);
30 * @param __userName The user name.
31 * @param __date The date.
32 * @param __fileName The file name.
33 * @throws NullPointerException On null arguments.
36 public NoteUser
add(String __userName
, LocalDate __date
,
38 throws NullPointerException
40 if (__userName
== null || __date
== null || __fileName
== null)
41 throw new NullPointerException("NARG");
43 NoteUser rv
= this.users
.computeIfAbsent(__userName
,
44 __key
-> new NoteUser(__key
));
46 rv
.add(__date
, __fileName
);