From 7648967f8af984a62a00a5f2756bc117243f5e14 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 5 Jul 2018 07:27:17 +0100 Subject: [PATCH] TypeAlias: access own member fields directly --- src/main/java/net/kemitix/mon/TypeAlias.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/kemitix/mon/TypeAlias.java b/src/main/java/net/kemitix/mon/TypeAlias.java index 7676736..5d49978 100644 --- a/src/main/java/net/kemitix/mon/TypeAlias.java +++ b/src/main/java/net/kemitix/mon/TypeAlias.java @@ -59,29 +59,28 @@ public abstract class TypeAlias { * @return a TypeAlias */ public final R map(final Function f) { - return f.apply(getValue()); + return f.apply(value); } @Override public final int hashCode() { - return getValue().hashCode(); + return value.hashCode(); } @Override public final boolean equals(final Object o) { if (o instanceof TypeAlias) { final TypeAlias other = (TypeAlias) o; - final Object otherValue = other.getValue(); - final Class otherValueClass = otherValue.getClass(); + final Class otherValueClass = other.value.getClass(); return otherValueClass.equals(getValue().getClass()) - && otherValue.equals(getValue()); + && other.value.equals(getValue()); } return map(o::equals); } @Override public final String toString() { - return getValue().toString(); + return value.toString(); } /**