From 8923edffdb36b790014ff47301e53f7ede93ea0d Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Wed, 11 Oct 2017 22:49:16 -0300 Subject: Cleanup more --- .../main/java/bjc/utils/funcutils/Isomorphism.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'base/src/main/java/bjc/utils/funcutils/Isomorphism.java') diff --git a/base/src/main/java/bjc/utils/funcutils/Isomorphism.java b/base/src/main/java/bjc/utils/funcutils/Isomorphism.java index 2d3655e..d86ee9f 100644 --- a/base/src/main/java/bjc/utils/funcutils/Isomorphism.java +++ b/base/src/main/java/bjc/utils/funcutils/Isomorphism.java @@ -8,26 +8,25 @@ import java.util.function.Function; * @author bjculkin * * @param - * The source type of the isomorphism. + * The source type of the isomorphism. * * @param - * The destination type of isomorphism. - * + * The destination type of isomorphism. */ public class Isomorphism { + /* The function to the destination type. */ private Function toFunc; + /* The function to the source type. */ private Function fromFunc; /** * Create a new isomorphism. * * @param to - * The 'forward' function, from the source to the - * definition. + * The 'forward' function, from the source to the definition. * * @param from - * The 'backward' function, from the definition to the - * source. + * The 'backward' function, from the definition to the source. */ public Isomorphism(Function to, Function from) { toFunc = to; @@ -38,9 +37,10 @@ public class Isomorphism { * Apply the isomorphism forward. * * @param val - * The source value. + * The source value. * - * @return The destination value. + * @return + * The destination value. */ public D to(S val) { return toFunc.apply(val); @@ -50,9 +50,10 @@ public class Isomorphism { * Apply the isomorphism backward. * * @param val - * The destination value. + * The destination value. * - * @return The source value. + * @return + * The source value. */ public S from(D val) { return fromFunc.apply(val); -- cgit v1.2.3