2626 * Builder for constructing new instances of {@link BuildableCurrencyUnit} using a fluent
2727 * API.
2828 */
29- public final class CurrencyUnitBuilder {
29+ public final class CurrencyUnitBuilder {
3030 /**
3131 * The currency code.
3232 */
@@ -47,7 +47,7 @@ public final class CurrencyUnitBuilder{
4747 /**
4848 * Private constructor, use #of() methods.
4949 */
50- private CurrencyUnitBuilder (){
50+ private CurrencyUnitBuilder () {
5151 }
5252
5353 /**
@@ -56,7 +56,7 @@ private CurrencyUnitBuilder(){
5656 * @param currencyCode the (unique) and identifying currency code, not null.
5757 * @param currencyContext The currency context to be used.
5858 */
59- public static CurrencyUnitBuilder of (String currencyCode , javax .money .CurrencyContext currencyContext ){
59+ public static CurrencyUnitBuilder of (String currencyCode , javax .money .CurrencyContext currencyContext ) {
6060 return new CurrencyUnitBuilder (currencyCode , currencyContext );
6161 }
6262
@@ -66,7 +66,7 @@ public static CurrencyUnitBuilder of(String currencyCode, javax.money.CurrencyCo
6666 * @param currencyCode the (unique) and identifying currency code, not null.
6767 * @param providerName the currency provider, not null.
6868 */
69- public static CurrencyUnitBuilder of (String currencyCode , String providerName ){
69+ public static CurrencyUnitBuilder of (String currencyCode , String providerName ) {
7070 return new CurrencyUnitBuilder (currencyCode , CurrencyContextBuilder .of (providerName ).build ());
7171 }
7272
@@ -75,21 +75,21 @@ public static CurrencyUnitBuilder of(String currencyCode, String providerName){
7575 *
7676 * @param currencyCode the (unique) and identifying currency code, not null.
7777 */
78- private CurrencyUnitBuilder (String currencyCode , javax .money .CurrencyContext currencyContext ){
78+ private CurrencyUnitBuilder (String currencyCode , javax .money .CurrencyContext currencyContext ) {
7979 Objects .requireNonNull (currencyCode , "currencyCode required" );
8080 this .currencyCode = currencyCode ;
8181 Objects .requireNonNull (currencyContext , "currencyContext required" );
8282 this .currencyContext = currencyContext ;
8383 }
8484
8585 /**
86- * Allows to set the currency code, for creating multiple instances, using one Builder.
86+ * Allows to setTyped the currency code, for creating multiple instances, using one Builder.
8787 *
8888 * @param currencyCode the (unique) and identifying currency code, not null.
8989 * @return the Builder, for chaining.
9090 * @see javax.money.CurrencyUnit#getCurrencyCode()
9191 */
92- public CurrencyUnitBuilder setCurrencyCode (String currencyCode ){
92+ public CurrencyUnitBuilder setCurrencyCode (String currencyCode ) {
9393 Objects .requireNonNull (currencyCode , "currencyCode required" );
9494 this .currencyCode = currencyCode ;
9595 this .currencyContext = CurrencyContextBuilder .of (getClass ().getSimpleName ()).build ();
@@ -103,8 +103,8 @@ public CurrencyUnitBuilder setCurrencyCode(String currencyCode){
103103 * @return the Builder, for chaining.
104104 * @see javax.money.CurrencyUnit#getNumericCode()
105105 */
106- public CurrencyUnitBuilder setNumericCode (int numericCode ){
107- if (numericCode < -1 ){
106+ public CurrencyUnitBuilder setNumericCode (int numericCode ) {
107+ if (numericCode < -1 ) {
108108 throw new IllegalArgumentException ("numericCode must be >= -1" );
109109 }
110110 this .numericCode = numericCode ;
@@ -118,8 +118,8 @@ public CurrencyUnitBuilder setNumericCode(int numericCode){
118118 * @return the Builder, for chaining.
119119 * @see javax.money.CurrencyUnit#getDefaultFractionDigits()
120120 */
121- public CurrencyUnitBuilder setDefaultFractionDigits (int defaultFractionDigits ){
122- if (defaultFractionDigits < 0 ){
121+ public CurrencyUnitBuilder setDefaultFractionDigits (int defaultFractionDigits ) {
122+ if (defaultFractionDigits < 0 ) {
123123 throw new IllegalArgumentException ("defaultFractionDigits must be >= 0" );
124124 }
125125 this .defaultFractionDigits = defaultFractionDigits ;
@@ -132,7 +132,7 @@ public CurrencyUnitBuilder setDefaultFractionDigits(int defaultFractionDigits){
132132 * @return the new CurrencyUnit instance.
133133 * @throws javax.money.MonetaryException if creation fails
134134 */
135- public CurrencyUnit build (){
135+ public CurrencyUnit build () {
136136 return build (false );
137137 }
138138
@@ -145,9 +145,9 @@ public CurrencyUnit build(){
145145 * @return the new CurrencyUnit instance.
146146 * @see javax.money.MonetaryCurrencies#getCurrency(String, String...)
147147 */
148- public CurrencyUnit build (boolean register ){
148+ public CurrencyUnit build (boolean register ) {
149149 BuildableCurrencyUnit cu = new BuildableCurrencyUnit (this );
150- if (register ){
150+ if (register ) {
151151 ConfigurableCurrencyUnitProvider .registerCurrencyUnit (cu );
152152 }
153153 return cu ;
@@ -164,9 +164,9 @@ public CurrencyUnit build(boolean register){
164164 * @see javax.money.MonetaryCurrencies#getCurrency(String, String...)
165165 * @see javax.money.MonetaryCurrencies#getCurrency(java.util.Locale, String...)
166166 */
167- public CurrencyUnit build (boolean register , Locale locale ){
167+ public CurrencyUnit build (boolean register , Locale locale ) {
168168 BuildableCurrencyUnit cu = new BuildableCurrencyUnit (this );
169- if (register ){
169+ if (register ) {
170170 ConfigurableCurrencyUnitProvider .registerCurrencyUnit (cu );
171171 ConfigurableCurrencyUnitProvider .registerCurrencyUnit (cu , locale );
172172 }
0 commit comments