summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java
diff options
context:
space:
mode:
authorEVE <EVE@EVE-PC>2017-03-14 12:07:14 -0400
committerEVE <EVE@EVE-PC>2017-03-14 12:07:14 -0400
commit504ca816530efdff06bc202e0432ebd354aec304 (patch)
tree4836932fb81d1d625470502c78c94d202c9a7420 /BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java
parent5c1163df17c46f7d3e15b6c7949c38843ec56146 (diff)
Cleanup
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java40
1 files changed, 20 insertions, 20 deletions
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 ff8f973..d83b5c2 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IMap.java
@@ -6,9 +6,9 @@ import java.util.function.Function;
/**
* Functional wrapper over map providing some useful things
- *
+ *
* @author ben
- *
+ *
* @param <KeyType>
* The type of this map's keys
* @param <ValueType>
@@ -23,7 +23,7 @@ public interface IMap<KeyType, ValueType> {
/**
* Check if this map contains the specified key
- *
+ *
* @param key
* The key to check
* @return Whether or not the map contains the key
@@ -33,14 +33,14 @@ public interface IMap<KeyType, ValueType> {
/**
* Extends this map, creating a new map that will delegate queries to
* the map, but store any added values itself
- *
+ *
* @return An extended map
*/
IMap<KeyType, ValueType> extend();
/**
* Execute an action for each entry in the map
- *
+ *
* @param action
* the action to execute for each entry in the map
*/
@@ -48,7 +48,7 @@ public interface IMap<KeyType, ValueType> {
/**
* Perform an action for each key in the map
- *
+ *
* @param action
* The action to perform on each key in the map
*/
@@ -56,7 +56,7 @@ public interface IMap<KeyType, ValueType> {
/**
* Perform an action for each value in the map
- *
+ *
* @param action
* The action to perform on each value in the map
*/
@@ -64,19 +64,19 @@ public interface IMap<KeyType, ValueType> {
/**
* Get the value assigned to the given key
- *
+ *
* @param key
* The key to look for a value under
* @return The value of the key
- *
- *
+ *
+ *
*/
ValueType get(KeyType key);
/**
* Get a value from the map, and return a default value if the key
* doesn't exist
- *
+ *
* @param key
* The key to attempt to retrieve
* @param defaultValue
@@ -87,7 +87,7 @@ public interface IMap<KeyType, ValueType> {
default ValueType getOrDefault(KeyType key, ValueType defaultValue) {
try {
return get(key);
- } catch (IllegalArgumentException iaex) {
+ } catch(IllegalArgumentException iaex) {
// We don't care about this, because it indicates a key
// is
// missing
@@ -97,25 +97,25 @@ public interface IMap<KeyType, ValueType> {
/**
* Get the number of entries in this map
- *
+ *
* @return The number of entries in this map
*/
int getSize();
/**
* Get a list of all the keys in this map
- *
+ *
* @return A list of all the keys in this map
*/
IList<KeyType> keyList();
/**
* Transform the values returned by this map.
- *
+ *
* NOTE: This transform is applied once for each lookup of a value, so
* the transform passed should be a proper function, or things will
* likely not work as expected.
- *
+ *
* @param <V2>
* The new type of returned values
* @param transformer
@@ -126,7 +126,7 @@ public interface IMap<KeyType, ValueType> {
/**
* Add an entry to the map
- *
+ *
* @param key
* The key to put the value under
* @param val
@@ -134,7 +134,7 @@ public interface IMap<KeyType, ValueType> {
* @return The previous value of the key in the map, or null if the key
* wasn't in the map. However, note that it may also return null
* if the key was set to null.
- *
+ *
* @throws UnsupportedOperationException
* if the map implementation doesn't support modifying
* the map
@@ -143,7 +143,7 @@ public interface IMap<KeyType, ValueType> {
/**
* Remove the value bound to the key
- *
+ *
* @param key
* The key to remove from the map
* @return The previous value for the key in the map, or null if the key
@@ -155,7 +155,7 @@ public interface IMap<KeyType, ValueType> {
/**
* Get a list of the values in this map
- *
+ *
* @return A list of values in this map
*/
IList<ValueType> valueList();