}
/**
- * Creates an initial snapshot. The backing map is selected according to
- * the expected size.
+ * Creates an initial snapshot. The backing map is selected according to the expected size.
*
* @param expectedSize Expected map size
* @return An empty mutable map.
/**
* Input is treated is supposed to be left unmodified, result must be mutable.
+ *
+ * @param input input map
+ * @return An isolated, read-write snapshot of input map
+ * @throws NullPointerException if input is null
*/
@SuppressWarnings("static-method")
public <K, V> Map<K, V> takeSnapshot(final Map<K, V> input) {
* {@link #takeSnapshot(Map)} purposes.
*
* @param input non-optimized (read-write) map
- * @return optimized read-only map
+ * @return optimized read-only map
+ * @throws NullPointerException if input is null
*/
public <K, V> Map<K, V> optimize(final Map<K, V> input) {
if (input instanceof ReadOnlyTrieMap) {