-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed visibility of some Units.addUnit() methods
- Loading branch information
Showing
2 changed files
with
57 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
* </p> | ||
* | ||
* @author <a href="mailto:[email protected]">Werner Keil</a> | ||
* @version 2.2, January 11, 2024 | ||
* @version 2.3, November 23, 2024 | ||
* @since 1.0 | ||
*/ | ||
public abstract class AbstractSystemOfUnits implements SystemOfUnits, Nameable { | ||
|
@@ -166,6 +166,11 @@ public Unit<?> getUnit(String string, UnitStyle style) { | |
return getUnit(string, style, false); | ||
} | ||
|
||
/** | ||
* Static helper class. | ||
* | ||
* @since 1.0 | ||
*/ | ||
protected static class Helper { | ||
static Set<Unit<?>> getUnitsOfDimension(final Set<Unit<?>> units, Dimension dimension) { | ||
if (dimension != null) { | ||
|
@@ -176,8 +181,9 @@ static Set<Unit<?>> getUnitsOfDimension(final Set<Unit<?>> units, Dimension dime | |
} | ||
|
||
/** | ||
* Adds a new named unit to the collection. | ||
* Adds a new named unit to a collection. | ||
* | ||
* @param units the collection to add to. | ||
* @param unit the unit being added. | ||
* @param name the name of the unit. | ||
* @return <code>unit</code>. | ||
|
@@ -188,11 +194,12 @@ public static <U extends Unit<?>> U addUnit(Set<Unit<?>> units, U unit, String n | |
} | ||
|
||
/** | ||
* Adds a new named unit to the collection. | ||
* Adds a new named unit to a collection. | ||
* | ||
* @param units the collection to add to. | ||
* @param unit the unit being added. | ||
* @param name the name of the unit. | ||
* @param name the symbol of the unit. | ||
* @param symbol the symbol of the unit. | ||
* @return <code>unit</code>. | ||
* @since 1.0 | ||
*/ | ||
|
@@ -201,11 +208,12 @@ public static <U extends Unit<?>> U addUnit(Set<Unit<?>> units, U unit, String n | |
} | ||
|
||
/** | ||
* Adds a new named unit to the collection. | ||
* | ||
* Adds a new named unit to a set. | ||
* | ||
* @param units the set to add to. | ||
* @param unit the unit being added. | ||
* @param name the name of the unit. | ||
* @param name the symbol of the unit. | ||
* @param symbol the symbol of the unit. | ||
* @param style style of the unit. | ||
* @return <code>unit</code>. | ||
* @since 1.0.1 | ||
|
@@ -265,7 +273,7 @@ public static <U extends Unit<?>> U addUnit(Set<Unit<?>> units, U unit, final St | |
} | ||
|
||
/** | ||
* Adds a new labeled unit to the set. | ||
* Adds a new labeled unit to a set. | ||
* | ||
* @param units the set to add to. | ||
* @param unit the unit being added. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters