File tree Expand file tree Collapse file tree
src/main/java/com/jnape/palatable/lambda/adt/hmap Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import com .jnape .palatable .lambda .lens .LensLike ;
88
99/**
10- * An interface representing a parametrized key for use in {@link HMap}s. The parameter specifies the type of the value
11- * stored at this binding inside the {@link HMap}.
10+ * An interface representing a parametrized key for use in {@link HMap}s. Additionally, every {@link TypeSafeKey} is an
11+ * {@link Iso} from the type the value is stored as to the type it's viewed and set as (on the way in / on the way out).
12+ * This allows multiple keys to map to the same value, but to view the value as different types.
1213 * <p>
1314 * This is intentionally an interface so user-defined implementations are possible; however, it's important to note
1415 * that all hopes of type-safety hinge on equality being implemented such that no two {@link TypeSafeKey}s with
1516 * differing value-type parameters may be considered equal. Reference equality is used here as the default, as that is
1617 * sufficient.
1718 *
18- * @param <A> The type of the value that this key maps to inside an {@link HMap}
19+ * @param <A> The raw type of the value that this key maps to inside an {@link HMap}
20+ * @param <B> The mapped type of the value that this key maps to inside an {@link HMap}
1921 */
2022public interface TypeSafeKey <A , B > extends Iso .Simple <A , B > {
2123
You can’t perform that action at this time.
0 commit comments