From f7a10e0e57d6f0ea83643c3d5763ff405af73337 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 28 Sep 2016 13:44:04 -0400 Subject: Formatting pass --- .../src/main/java/bjc/utils/funcdata/IMap.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java index 4fb7c2b..8522058 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java @@ -16,6 +16,11 @@ import java.util.function.Function; * */ public interface IMap { + /** + * Delete all the values in the map + */ + void clear(); + /** * Check if this map contains the specified key * @@ -68,6 +73,16 @@ public interface IMap { */ ValueType get(KeyType key); + default ValueType getOrDefault(KeyType key, ValueType defaultValue) { + try { + return get(key); + } catch (IllegalArgumentException iaex) { + // We don't care about this, because it indicates a key is + // missing + return defaultValue; + } + } + /** * Get the number of entries in this map * @@ -132,19 +147,4 @@ public interface IMap { * @return A list of values in this map */ IList valueList(); - - /** - * Delete all the values in the map - */ - void clear(); - - default ValueType getOrDefault(KeyType key, ValueType defaultValue) { - try { - return get(key); - } catch (IllegalArgumentException iaex) { - // We don't care about this, because it indicates a key is - // missing - return defaultValue; - } - } } \ No newline at end of file -- cgit v1.2.3