Skip to content

Commit

Permalink
make a 2nd order factory private to prohibit changing internal assump…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
iTitus committed Nov 9, 2020
1 parent 6ba706f commit b7a7b2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/github/ititus/si/unit/CompoundUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private CompoundUnit(Q type, Dimension dimension, Map<Unit<?>, Integer> units) {
this.units = units;
}

static Unit<?> of(Dimension dimension, Map<Unit<?>, Integer> units) {
private static Unit<?> of(Dimension dimension, Map<Unit<?>, Integer> units) {
units = new LinkedHashMap<>(units);

units.entrySet().removeIf(e -> e.getValue() == 0);
Expand Down

0 comments on commit b7a7b2f

Please sign in to comment.