Skip to content

Commit eb50338

Browse files
committed
Merge branch 'master' of https://github.com/JavaMoney/jsr354-ri
Conflicts: src/main/java/org/javamoney/moneta/internal/DefaultRoundingProvider.java Signed-off-by: atsticks <[email protected]>
2 parents b2176e1 + 2ed4e5d commit eb50338

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/main/asciidoc/userguide.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Additionally _Moneta_ also supports static factory methods on the types directly
299299
[source,java]
300300
.Creating instances of +FastMoney+ using the +MonetaryAmounts+ singleton:
301301
--------------------------------------------
302-
FastMoney m = FastMoney.of("USD", 200.20);
302+
FastMoney m = FastMoney.of(200.20, "USD");
303303
--------------------------------------------
304304

305305
Creation of +Money+ instances is similar:
@@ -308,7 +308,7 @@ Creation of +Money+ instances is similar:
308308
.Creating instances of +Money+:
309309
--------------------------------------------
310310
Money m1 = Monetary.getAmountFactory(Money.class).setCurrency("USD").setNumber(200.20).create();
311-
Money m2 = Money.of("USD", 200.20);
311+
Money m2 = Money.of(200.20, "USD");
312312
--------------------------------------------
313313

314314
===== Configuring Instances of Money
@@ -321,7 +321,7 @@ explicitly by passing a +MathContext+ as part of a +MonetaryContext+:
321321
[source,java]
322322
.Creating instances of +Money+ configuring the +MathContext+ to be used.
323323
--------------------------------------------
324-
Money money = Money.of("CHF", 200, MonetaryContextBuilder.create().set(MathContext.DECIMAL128).build());
324+
Money money = Money.of(200, "CHF", MonetaryContextBuilder.create().set(MathContext.DECIMAL128).build());
325325
--------------------------------------------
326326

327327
Using the JSR's main API allows to achieve the same as follows:

src/main/java/org/javamoney/moneta/FastMoney.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
* different results:
4040
* </p>
4141
* <pre><code>
42-
* Money money1 = money1.add(Money.of("EUR", 1234567.3444));
43-
* money1 = money1.subtract(Money.of("EUR", 232323));
42+
* Money money1 = money1.add(Money.of(1234567.3444, "EUR"));
43+
* money1 = money1.subtract(Money.of(232323, "EUR"));
4444
* money1 = money1.multiply(3.4);
4545
* money1 = money1.divide(5.456);
4646
* </code></pre>
@@ -51,8 +51,8 @@
5151
* whereas
5252
* </p>
5353
* <pre><code>
54-
* FastMoney money1 = money1.add(FastMoney.of("EUR", 1234567.3444));
55-
* money1 = money1.subtract(FastMoney.of("EUR", 232323));
54+
* FastMoney money1 = money1.add(FastMoney.of(1234567.3444, "EUR"));
55+
* money1 = money1.subtract(FastMoney.of(232323, "EUR"));
5656
* money1 = money1.multiply(3.4);
5757
* money1 = money1.divide(5.456);
5858
* </code></pre>
@@ -64,8 +64,8 @@
6464
* code above with the following: *
6565
* </p>
6666
* <pre><code>
67-
* FastMoney money1 = money1.add(Money.of("EUR", 1234567.3444));
68-
* money1 = money1.subtract(FastMoney.of("EUR", 232323));
67+
* FastMoney money1 = money1.add(Money.of(1234567.3444, "EUR"));
68+
* money1 = money1.subtract(FastMoney.of(232323, "EUR"));
6969
* money1 = money1.multiply(3.4);
7070
* money1 = money1.divide(5.456);
7171
* </code></pre>
@@ -78,7 +78,7 @@
7878
*
7979
* @author Anatole Tresch
8080
* @author Werner Keil
81-
* @version 0.5.2
81+
* @version 1.0
8282
*/
8383
public final class FastMoney implements MonetaryAmount, Comparable<MonetaryAmount>, Serializable {
8484

src/test/java/org/javamoney/moneta/RoundedMoneyTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ public void testToString() {
971971
// */
972972
// @Test
973973
// public void testGetAmountWhole() {
974-
// assertEquals(1, RoundedMoney.of("XXX", 1.23455645d).getAmountWhole());
974+
// assertEquals(1, RoundedMoney.of(1.23455645d).getAmountWhole(), "XXX");
975975
// assertEquals(1, RoundedMoney.of( 1).getAmountWhole());
976976
// assertEquals(11, RoundedMoney.of( 11.0d).getAmountWhole());
977977
// assertEquals(1234, RoundedMoney.of( 1234.1d).getAmountWhole());
@@ -984,7 +984,7 @@ public void testToString() {
984984
// */
985985
// @Test
986986
// public void testGetAmountFractionNumerator() {
987-
// assertEquals(0, RoundedMoney.of("XXX", new BigDecimal("1.23455645"))
987+
// assertEquals(0, RoundedMoney.of(new BigDecimal("1.23455645"), "XXX")
988988
// .getAmountFractionNumerator());
989989
// assertEquals(0, RoundedMoney.of( 1).getAmountFractionNumerator());
990990
// assertEquals(0, RoundedMoney.of( new BigDecimal("11.0"))
@@ -1002,7 +1002,7 @@ public void testToString() {
10021002
// */
10031003
// @Test
10041004
// public void testGetAmountFractionDenominator() {
1005-
// assertEquals(1, RoundedMoney.of("XXX", new BigDecimal("1.23455645"))
1005+
// assertEquals(1, RoundedMoney.of(new BigDecimal("1.23455645"), "XXX")
10061006
// .getAmountFractionDenominator());
10071007
// assertEquals(100, RoundedMoney.of( 1)
10081008
// .getAmountFractionDenominator());

0 commit comments

Comments
 (0)