From 9adff31e86603493c2a245e1e803d951675d5e00 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 13 Apr 2016 23:11:36 -0400 Subject: Implemented new tree abstraction --- .../java/bjc/utils/funcdata/IFunctionalMap.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/IFunctionalMap.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IFunctionalMap.java b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IFunctionalMap.java index c879229..c5fe559 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IFunctionalMap.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IFunctionalMap.java @@ -9,13 +9,13 @@ import java.util.function.Function; * * @author ben * - * @param + * @param * The type of this map's keys - * @param + * @param * The type of this map's values * */ -public interface IFunctionalMap { +public interface IFunctionalMap { /** * Add an entry to the map @@ -32,7 +32,7 @@ public interface IFunctionalMap { * if the map implementation doesn't support modifying the * map */ - V put(K key, V val); + ValueType put(KeyType key, ValueType val); /** * Get the value assigned to the given key @@ -43,7 +43,7 @@ public interface IFunctionalMap { * * */ - V get(K key); + ValueType get(KeyType key); /** * Transform the values returned by this map. @@ -58,7 +58,7 @@ public interface IFunctionalMap { * The function to use to transform values * @return The map where each value will be transformed after lookup */ - IFunctionalMap mapValues(Function transformer); + IFunctionalMap mapValues(Function transformer); /** * Check if this map contains the specified key @@ -67,14 +67,14 @@ public interface IFunctionalMap { * The key to check * @return Whether or not the map contains the key */ - boolean containsKey(K key); + boolean containsKey(KeyType key); /** * Get a list of all the keys in this map * * @return A list of all the keys in this map */ - IFunctionalList keyList(); + IFunctionalList keyList(); /** * Execute an action for each entry in the map @@ -82,7 +82,7 @@ public interface IFunctionalMap { * @param action * the action to execute for each entry in the map */ - void forEach(BiConsumer action); + void forEach(BiConsumer action); /** * Remove the value bound to the key @@ -94,7 +94,7 @@ public interface IFunctionalMap { * null, doesn't mean the map wasn't changed. It may mean that * someone put a null value for that key into the map */ - V remove(K key); + ValueType remove(KeyType key); /** * Get the number of entries in this map @@ -109,7 +109,7 @@ public interface IFunctionalMap { * @param action * The action to perform on each key in the map */ - void forEachKey(Consumer action); + void forEachKey(Consumer action); /** * Perform an action for each value in the map @@ -117,12 +117,12 @@ public interface IFunctionalMap { * @param action * The action to perform on each value in the map */ - void forEachValue(Consumer action); + void forEachValue(Consumer action); /** * Get a list of the values in this map * * @return A list of values in this map */ - IFunctionalList valueList(); + IFunctionalList valueList(); } \ No newline at end of file -- cgit v1.2.3