From 987fd8406d65505aedecd17e51216eb0ce393fbb Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Wed, 22 May 2019 17:32:40 -0400 Subject: Added new default methods to the Unit interface. --- src/org/unitConverter/unit/AbstractUnit.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/org/unitConverter/unit/AbstractUnit.java') diff --git a/src/org/unitConverter/unit/AbstractUnit.java b/src/org/unitConverter/unit/AbstractUnit.java index 05a6c17..6045127 100644 --- a/src/org/unitConverter/unit/AbstractUnit.java +++ b/src/org/unitConverter/unit/AbstractUnit.java @@ -23,6 +23,13 @@ import org.unitConverter.dimension.UnitDimension; /** * The default abstract implementation of the {@code Unit} interface. * + *

+ * With the addition of {@link Unit#fromConversionFunctions}, there is no longer any reason to use {@code AbstractUnit} + * for any purpose other than making subclasses. Units should never be declared as {@code AbstractUnit}, they should be + * declared as {@code Unit}. Now that {@code Unit.fromConversionFunctions} exists, it is preferred to creating anonymous + * inner types of {@code AbstractUnit}. + *

+ * * @author Adrien Hopkins * @since 2018-12-22 * @since v0.1.0 -- cgit v1.2.3