File tree Expand file tree Collapse file tree
src/main/java/javax/measure Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 * </p>
3636 *
3737 * @author <a href="mailto:units@catmedia.us">Werner Keil</a>
38- * @version 1.3, April 20 , 2018
38+ * @version 1.4, August 8 , 2018
3939 * @see <a href="https://en.wikipedia.org/wiki/Binary_prefix">Wikipedia: Binary Prefix</a>
4040 * @since 2.0
4141 */
@@ -176,21 +176,34 @@ public static <Q extends Quantity<Q>> Unit<Q> YOBI(Unit<Q> unit) {
176176 *
177177 * @return this prefix symbol, not {@code null}.
178178 */
179+ @ Override
179180 public String getSymbol () {
180181 return symbol ;
181182 }
182183
183184 /**
184185 * Base part of the associated factor in base^exponent representation.
185186 */
187+ @ Override
186188 public int getBase () {
187189 return base ;
188190 }
189191
190192 /**
191193 * Exponent part of the associated factor in base^exponent representation.
192194 */
195+ @ Override
193196 public int getExponent () {
194197 return exponent ;
195198 }
199+
200+ /**
201+ * Returns the name of this prefix.
202+ *
203+ * @return this prefix name, not {@code null}.
204+ */
205+ @ Override
206+ public String getName () {
207+ return name ();
208+ }
196209}
Original file line number Diff line number Diff line change 5050 * @see <a href="http://en.wikipedia.org/wiki/Metric_prefix">Wikipedia: Metric Prefix</a>
5151 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
5252 * @author <a href="mailto:units@catmedia.us">Werner Keil</a>
53- * @version 1.8 , 2018-04-20
53+ * @version 1.9 , 2018-08-08
5454 * @since 2.0
5555 */
5656public enum MetricPrefix implements Prefix {
@@ -374,22 +374,34 @@ public static <Q extends Quantity<Q>> Unit<Q> YOCTO(Unit<Q> unit) {
374374 *
375375 * @return this prefix symbol, not {@code null}.
376376 */
377+ @ Override
377378 public String getSymbol () {
378379 return symbol ;
379380 }
380381
381382 /**
382383 * Base part of the associated factor in base^exponent representation.
383384 */
385+ @ Override
384386 public int getBase () {
385387 return base ;
386388 }
387389
388390 /**
389391 * Exponent part of the associated factor in base^exponent representation.
390392 */
393+ @ Override
391394 public int getExponent () {
392395 return exponent ;
393396 }
394397
398+ /**
399+ * Returns the name of this prefix.
400+ *
401+ * @return this prefix name, not {@code null}.
402+ */
403+ @ Override
404+ public String getName () {
405+ return name ();
406+ }
395407}
Original file line number Diff line number Diff line change 3535 *
3636 * @see <a href="http://en.wikipedia.org/wiki/Unit_prefix">Wikipedia: Unit Prefix</a>
3737 * @author <a href="mailto:units@catmedia.us">Werner Keil</a>
38- * @version 0.9 , 2018-06-17
38+ * @version 1.0 , 2018-08-08
3939 * @since 2.0
4040 */
4141public interface Prefix {
@@ -61,4 +61,11 @@ public interface Prefix {
6161 */
6262 public int getExponent ();
6363
64+ /**
65+ * Returns the name of this prefix.
66+ *
67+ * @return this prefix name, not {@code null}.
68+ *
69+ */
70+ String getName ();
6471}
You can’t perform that action at this time.
0 commit comments