Skip to content

Commit 04a5f12

Browse files
committed
Updated API for latest feedback.
1 parent 60837a7 commit 04a5f12

12 files changed

+1310
-234
lines changed
File renamed without changes.

README.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ http://jcp.org/en/jsr/detail?id=354
77
This is the API module of JSR 354 licenced under JSR Spec Licence (see LICENCE.html)
88

99
See also:
10-
http://javamoney.github.io/jsr354-api/
11-
10+
http://javamoney.java.net/api/
1211

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<artifactId>jsr354-api</artifactId>
1616
<packaging>jar</packaging>
1717

18-
<version>0.7</version>
18+
<version>0.8-SNAPSHOT</version>
1919

2020
<name>JSR 354 (Money and Currency API)</name>
2121
<url>http://java.net/projects/javamoney</url>
@@ -227,7 +227,7 @@
227227
<distributionManagement>
228228
<site>
229229
<id>javamoney.java.net-site</id>
230-
<url>dav:https://kenai.com/website/javamoney/api/</url>
230+
<url>dav:https://java.net/website/javamoney/api/</url>
231231
<name>Java net Public SVN Site Repository</name>
232232
</site>
233233
<repository>

src/main/java/javax/money/CurrencyUnit.java

+33-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* A unit of currency.
1515
* <p>
1616
* This interface represents a unit of currency such as the British Pound, Euro,
17-
* US Dollar, Bitcoin or other. It is mainly defined to provide interoperability
17+
* US Dollar, Bitcoin or other. It provides interoperability
1818
* between different implementations.
1919
* <p>
2020
* Currencies can be distinguished by separate {@link #getCurrencyCode()} codes,
@@ -27,7 +27,7 @@
2727
* <li>are required to be thread-safe
2828
* <li>are required to be immutable
2929
* <li>are required to be comparable
30-
* <li>are highly recommended to be serializable.
30+
* <li>are required to be serializable.
3131
* </ul>
3232
*
3333
* @author Werner Keil
@@ -52,9 +52,39 @@ public interface CurrencyUnit {
5252
* @return the currency code, never {@code null}. For ISO-4217 this this
5353
* will be the three letter ISO-4217 code. However, alternate
5454
* currencies can have different codes. Also there is no constraint
55-
* about the formatting of alternate codes, despite they fact that
55+
* about the formatting of alternate codes, despite the fact that
5656
* the currency codes must be unique.
5757
*/
5858
public String getCurrencyCode();
5959

60+
/**
61+
* Gets a numeric currency code. within the ISO-4217 name space, this equals
62+
* to the ISO numeric code. In other currency name spaces this number may be
63+
* different, or even undefined (-1).
64+
* <p>
65+
* The numeric code is an optional alternative to the standard currency
66+
* code. If defined, the numeric code is required to be unique.
67+
* <p>
68+
* This method matches the API of <type>java.util.Currency</type>.
69+
*
70+
* @return the numeric currency code
71+
*/
72+
public int getNumericCode();
73+
74+
/**
75+
* Gets the number of fractional digits typically used by this currency.
76+
* <p>
77+
* Different currencies have different numbers of fractional digits by
78+
* default. For example, 'GBP' has 2 fractional digits, but 'JPY' has zero.
79+
* virtual currencies or those with no applicable fractional are indicated
80+
* by -1.
81+
* <p>
82+
* This method matches the API of <type>java.util.Currency</type>.
83+
*
84+
* @return the fractional digits, from 0 to 9 (normally 0, 2 or 3), or 0 for
85+
* pseudo-currencies.
86+
*
87+
*/
88+
public int getDefaultFractionDigits();
89+
6090
}

src/main/java/javax/money/MonetaryAdjuster.java

-90
This file was deleted.

0 commit comments

Comments
 (0)