@@ -289,17 +289,17 @@ As defined by the JSR's API you can access according +MonetaryAmountFactory+ for
289289new instances of amounts. E.g. instances of +FastMoney+ can be created as follows:
290290
291291[source,java]
292- .Creating instances of +FastMoney+ using the +MonetaryAmounts + singleton:
292+ .Creating instances of +FastMoney+ using the +Monetary + singleton:
293293--------------------------------------------
294294FastMoney m = Monetary.getAmountFactory(FastMoney.class).setCurrency("USD").setNumber(200.20).create();
295295--------------------------------------------
296296
297297Additionally _Moneta_ also supports static factory methods on the types directly. So the following code is equivalent:
298298
299299[source,java]
300- .Creating instances of +FastMoney+ using the +MonetaryAmounts+ singleton :
300+ .Creating instances of +FastMoney+ using the static factory method :
301301--------------------------------------------
302- FastMoney m = FastMoney.of(200.20, "USD");
302+ FastMoney m = FastMoney.of("USD", 200.20 );
303303--------------------------------------------
304304
305305Creation of +Money+ instances is similar:
@@ -308,7 +308,7 @@ Creation of +Money+ instances is similar:
308308.Creating instances of +Money+:
309309--------------------------------------------
310310Money m1 = Monetary.getAmountFactory(Money.class).setCurrency("USD").setNumber(200.20).create();
311- Money m2 = Money.of(200.20, "USD");
311+ Money m2 = Money.of("USD", 200.20 );
312312--------------------------------------------
313313
314314===== Configuring Instances of Money
0 commit comments