diff options
author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2019-05-22 17:32:40 -0400 |
---|---|---|
committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2019-05-22 17:32:40 -0400 |
commit | 987fd8406d65505aedecd17e51216eb0ce393fbb (patch) | |
tree | b10a551a57cbd099450ffe539cb8d6d8e230459d /src/org/unitConverter/unit/AbstractUnit.java | |
parent | 50a195ef78af5d15dd6e548d4d6928c281bbaac2 (diff) |
Added new default methods to the Unit interface.
Diffstat (limited to 'src/org/unitConverter/unit/AbstractUnit.java')
-rw-r--r-- | src/org/unitConverter/unit/AbstractUnit.java | 7 |
1 files changed, 7 insertions, 0 deletions
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. * + * <p> + * 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}. + * </p> + * * @author Adrien Hopkins * @since 2018-12-22 * @since v0.1.0 |