|
5 | 5 | * DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE |
6 | 6 | * AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE "DECLINE" |
7 | 7 | * BUTTON AT THE BOTTOM OF THIS PAGE. Specification: JSR-354 Money and Currency |
8 | | - * API ("Specification") Copyright (c) 2012-2014, Credit Suisse All rights |
| 8 | + * API ("Specification") Copyright (c) 2012-2015, Credit Suisse All rights |
9 | 9 | * reserved. |
10 | 10 | */ |
11 | 11 | package javax.money; |
|
34 | 34 | * @author Stephen Colebourne |
35 | 35 | * @author Anatole Tresch |
36 | 36 | * |
37 | | - * @version 0.7 |
| 37 | + * @version 1.0 |
38 | 38 | * |
39 | 39 | * @see <a href="https://en.wikipedia.org/wiki/Currency">Wikipedia: Currency</a> |
40 | 40 | */ |
41 | 41 | public interface CurrencyUnit extends Comparable<CurrencyUnit>{ |
42 | 42 |
|
43 | | - /** |
44 | | - * Gets the unique currency code, the effective code depends on the |
45 | | - * currency. |
46 | | - * <p> |
47 | | - * Since each currency is identified by this code, the currency code is |
48 | | - * required to be defined for every {@link CurrencyUnit} and not |
49 | | - * {@code null} or empty. |
50 | | - * <p> |
51 | | - * For ISO codes the 3-letter ISO code should be returned. For non ISO |
52 | | - * currencies no constraints are defined. |
53 | | - * |
54 | | - * @return the currency code, never {@code null}. For ISO-4217 this this |
55 | | - * will be the three letter ISO-4217 code. However, alternate |
56 | | - * currencies can have different codes. Also there is no constraint |
57 | | - * about the formatting of alternate codes, despite the fact that |
58 | | - * the currency codes must be unique. |
59 | | - */ |
| 43 | + /** |
| 44 | + * Gets the unique currency code, the effective code depends on the |
| 45 | + * currency. |
| 46 | + * <p> |
| 47 | + * Since each currency is identified by this code, the currency code is |
| 48 | + * required to be defined for every {@link CurrencyUnit} and not |
| 49 | + * {@code null} or empty. |
| 50 | + * <p> |
| 51 | + * For ISO codes the 3-letter ISO code should be returned. For non ISO |
| 52 | + * currencies no constraints are defined. |
| 53 | + * |
| 54 | + * @return the currency code, never {@code null}. For ISO-4217 this this |
| 55 | + * will be the three letter ISO-4217 code. However, alternate |
| 56 | + * currencies can have different codes. Also there is no constraint |
| 57 | + * about the formatting of alternate codes, despite the fact that |
| 58 | + * the currency codes must be unique. |
| 59 | + */ |
60 | 60 | String getCurrencyCode(); |
61 | 61 |
|
62 | | - /** |
63 | | - * Gets a numeric currency code. within the ISO-4217 name space, this equals |
64 | | - * to the ISO numeric code. In other currency name spaces this number may be |
65 | | - * different, or even undefined (-1). |
66 | | - * <p> |
67 | | - * The numeric code is an optional alternative to the standard currency |
68 | | - * code. If defined, the numeric code is required to be unique. |
69 | | - * <p> |
70 | | - * This method matches the API of {@link java.util.Currency}. |
71 | | - * |
72 | | - * @return the numeric currency code |
73 | | - */ |
| 62 | + /** |
| 63 | + * Gets a numeric currency code. within the ISO-4217 name space, this equals |
| 64 | + * to the ISO numeric code. In other currency name spaces this number may be |
| 65 | + * different, or even undefined (-1). |
| 66 | + * <p> |
| 67 | + * The numeric code is an optional alternative to the standard currency |
| 68 | + * code. If defined, the numeric code is required to be unique. |
| 69 | + * <p> |
| 70 | + * This method matches the API of {@link java.util.Currency}. |
| 71 | + * |
| 72 | + * @return the numeric currency code |
| 73 | + */ |
74 | 74 | int getNumericCode(); |
75 | 75 |
|
76 | | - /** |
77 | | - * Gets the number of fractional digits typically used by this currency. |
78 | | - * <p> |
79 | | - * Different currencies have different numbers of fractional digits by |
80 | | - * default. For example, 'GBP' has 2 fractional digits, but 'JPY' has zero. |
81 | | - * virtual currencies or those with no applicable fractional are indicated |
82 | | - * by -1. |
83 | | - * <p> |
84 | | - * This method matches the API of {@link java.util.Currency}. |
85 | | - * |
86 | | - * @return the fractional digits, from 0 to 9 (normally 0, 2 or 3), or 0 for |
87 | | - * pseudo-currencies. |
88 | | - * |
89 | | - */ |
| 76 | + /** |
| 77 | + * Gets the number of fractional digits typically used by this currency. |
| 78 | + * <p> |
| 79 | + * Different currencies have different numbers of fractional digits by |
| 80 | + * default. For example, 'GBP' has 2 fractional digits, but 'JPY' has zero. |
| 81 | + * virtual currencies or those with no applicable fractional are indicated |
| 82 | + * by -1. |
| 83 | + * <p> |
| 84 | + * This method matches the API of {@link java.util.Currency}. |
| 85 | + * |
| 86 | + * @return the fractional digits, from 0 to 9 (normally 0, 2 or 3), or 0 for |
| 87 | + * pseudo-currencies. |
| 88 | + * |
| 89 | + */ |
90 | 90 | int getDefaultFractionDigits(); |
91 | 91 |
|
92 | | - |
93 | 92 | /** |
94 | | - * Returns the {@link javax.money.CurrencyContext} of a a currency. This context contains additional information |
95 | | - * on the type and capabilities of a CurrencyUnit, e.g. its provider and more. |
| 93 | + * Returns the {@link javax.money.CurrencyContext} of a currency. This context contains additional information |
| 94 | + * about the type and capabilities of a CurrencyUnit, e.g. its provider and more. |
96 | 95 | * @return the currency's context, never null. |
97 | 96 | */ |
98 | 97 | CurrencyContext getContext(); |
99 | | - |
100 | 98 | } |
0 commit comments