File tree Expand file tree Collapse file tree
test/java/javax/measure/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ public interface Unit<Q extends Quantity<Q>> {
131131 *
132132 * @return the base units and their exponent making up this unit.
133133 */
134+ Map <? extends Unit <?>, Integer > getBaseUnits ();
135+
136+ /**
137+ * @deprecated use #getBaseUnits instead
138+ */
134139 Map <? extends Unit <?>, Integer > getProductUnits ();
135140
136141 /**
@@ -338,7 +343,7 @@ public interface Unit<Q extends Quantity<Q>> {
338343 /**
339344 * <p>
340345 * Returns a string representation of this unit. The string representation may be the unit {@linkplain #getSymbol() symbol}, or may be some
341- * representation of {@linkplain #getProductUnits () product units}, multiplication factor and offset if any.
346+ * representation of {@linkplain #getBaseUnits () product units}, multiplication factor and offset if any.
342347 * </p>
343348 * The string may be localized at implementation choice by the means of a particular device and platform. <br>
344349 *
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public Unit getSystemUnit() {
6666 return this ;
6767 }
6868
69- public Map getProductUnits () {
69+ public Map getBaseUnits () {
7070 // TODO Auto-generated method stub
7171 return null ;
7272 }
@@ -141,4 +141,9 @@ public String getName() {
141141 return name ();
142142 }
143143
144+ public Map getProductUnits () {
145+ // TODO Auto-generated method stub
146+ return null ;
147+ }
148+
144149}
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ public String getName() {
136136 return name ;
137137 }
138138
139- public Map <Unit <?>, Integer > getProductUnits () {
139+ public Map <Unit <?>, Integer > getBaseUnits () {
140140 return null ;
141141 }
142142
@@ -192,4 +192,8 @@ public double getMultFactor() {
192192 public String toString () {
193193 return getName ();
194194 }
195+
196+ public Map getProductUnits () {
197+ throw new UnsupportedOperationException ("Use getBaseUnits() instead" );
198+ }
195199}
You can’t perform that action at this time.
0 commit comments