diff options
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; |
