diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
| commit | 946cab444bc301d8a7c756a1bab039558288de89 (patch) | |
| tree | 419f27c39a509bcd83cae0e6630be8eb7ff95a30 /base/src/main/java/bjc/utils/funcdata/ExtendedMap.java | |
| parent | c82e3b3b2de0633317ec8fc85925e91422820597 (diff) | |
Cleanup work
Diffstat (limited to 'base/src/main/java/bjc/utils/funcdata/ExtendedMap.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/funcdata/ExtendedMap.java | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/base/src/main/java/bjc/utils/funcdata/ExtendedMap.java b/base/src/main/java/bjc/utils/funcdata/ExtendedMap.java index 909c5e9..0c6389e 100644 --- a/base/src/main/java/bjc/utils/funcdata/ExtendedMap.java +++ b/base/src/main/java/bjc/utils/funcdata/ExtendedMap.java @@ -6,11 +6,33 @@ import java.util.function.Function; import bjc.utils.funcutils.ListUtils; +/** + * An extended version of a map, that stores values into a map, but can look + * into a different one for others. + * + * @author Ben Culkin + * + * @param <KeyType> + * The type of the keys of the map. + * + * @param <ValueType> + * The type of the values of the map. + */ class ExtendedMap<KeyType, ValueType> implements IMap<KeyType, ValueType> { + /* The map we delegate lookups to. */ private final IMap<KeyType, ValueType> delegate; - + /* The map we store things in. */ private final IMap<KeyType, ValueType> store; + /** + * Create a new extended map. + * + * @param delegate + * The map to lookup things in. + * + * @param store + * The map to store things in. + */ public ExtendedMap(final IMap<KeyType, ValueType> delegate, final IMap<KeyType, ValueType> store) { this.delegate = delegate; this.store = store; |
