Top Description Inners Fields Constructors Methods
org.javamoney.moneta.function

public final Class MonetaryRoundedFactoryBuilder

extends Object
Class Inheritance
Imports
java.math.MathContext, .RoundingMode

Builder to MonetaryRoundedFactory once the RoundingMode, is possible choose the scale, the number of digits to the right of the decimal point, and the precision, the total number of digits in a number or both.
Author
Otavio Santana
Since
1.0.1
See Also
MonetaryRoundedFactoryBuilder#withScale(int), MonetaryRoundedFactoryBuilder#withPrecision(int)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionBuilder

Once the RoundingMode and precision informed, is possible create a MonetaryRoundedFactory or set the number of scale.

public static class
MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder

Once the RoundingMode, precision and scale informed, the next step will build a MonetaryRoundedFactory with all these information.

public static class
MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithScaleBuilder

Once the RoundingMode and scale informed, is possible create a MonetaryRoundedFactory or set the number of precision.

Field Summary

Modifier and TypeField and Description
private final RoundingMode

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionBuilder
withPrecision(int
the precision
precision
)

Set the total number of digits in a number

public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithScaleBuilder
withScale(int
the scale
scale
)

Set the number of digits to the right of the decimal point

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

roundingModeback to summary
private final RoundingMode roundingMode

Constructor Detail

MonetaryRoundedFactoryBuilderback to summary
pack-priv MonetaryRoundedFactoryBuilder(RoundingMode roundingMode)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
withPrecisionback to summary
public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionBuilder withPrecision(int precision)

Set the total number of digits in a number

Parameters
precision:int

the precision

Returns:MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionBuilder

@MonetaryRoundedFactoryWithPrecisionBuilder

withScaleback to summary
public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithScaleBuilder withScale(int scale)

Set the number of digits to the right of the decimal point

Parameters
scale:int

the scale

Returns:MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithScaleBuilder

MonetaryRoundedFactoryWithScaleBuilder

org.javamoney.moneta.function back to summary

public Class MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • org.javamoney.moneta.function.MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionBuilder

Once the RoundingMode and precision informed, is possible create a MonetaryRoundedFactory or set the number of scale.
Author
Otavio Santana
See Also
MonetaryRoundedFactoryWithPrecisionBuilder#withScale(int), MonetaryRoundedFactoryWithPrecisionBuilder#build()

Field Summary

Modifier and TypeField and Description
private final int
private final RoundingMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MonetaryRoundedFactory
public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder

Returns:

MonetaryRoundedFactoryWithPrecisionScaleBuilder
withScale
(int
the scale
scale
)

Set the number of digits to the right of the decimal point

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

precisionback to summary
private final int precision
roundingModeback to summary
private final RoundingMode roundingMode

Constructor Detail

MonetaryRoundedFactoryWithPrecisionBuilderback to summary
private MonetaryRoundedFactoryWithPrecisionBuilder(RoundingMode roundingMode, int precision)

Method Detail

buildback to summary
public MonetaryRoundedFactory build()

Make the MonetaryRoundedFactory using the PrecisionContextRoundedOperator as rounding operator.

Returns:MonetaryRoundedFactory

MonetaryRoundedFactory with PrecisionContextRoundedOperator

See Also
PrecisionContextRoundedOperator, MonetaryRoundedFactory
withScaleback to summary
public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder withScale(int scale)

Set the number of digits to the right of the decimal point

Parameters
scale:int

the scale

Returns:MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder

MonetaryRoundedFactoryWithPrecisionScaleBuilder

org.javamoney.moneta.function back to summary

public Class MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • org.javamoney.moneta.function.MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder

Once the RoundingMode, precision and scale informed, the next step will build a MonetaryRoundedFactory with all these information.
Author
Otavio Santana

Field Summary

Modifier and TypeField and Description
private int
private final RoundingMode
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public MonetaryRoundedFactory
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

precisionback to summary
private int precision
roundingModeback to summary
private final RoundingMode roundingMode
scaleback to summary
private int scale

Constructor Detail

MonetaryRoundedFactoryWithPrecisionScaleBuilderback to summary
public MonetaryRoundedFactoryWithPrecisionScaleBuilder(RoundingMode roundingMode)

Method Detail

buildback to summary
public MonetaryRoundedFactory build()

Make the MonetaryRoundedFactory using the PrecisionScaleRoundedOperator as rounding operator.

Returns:MonetaryRoundedFactory

MonetaryRoundedFactory with PrecisionScaleRoundedOperator

See Also
PrecisionContextRoundedOperator, PrecisionScaleRoundedOperator
org.javamoney.moneta.function back to summary

public Class MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithScaleBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • org.javamoney.moneta.function.MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithScaleBuilder

Once the RoundingMode and scale informed, is possible create a MonetaryRoundedFactory or set the number of precision.
Author
Otavio Santana
See Also
MonetaryRoundedFactoryWithScaleBuilder#withPrecision(int), MonetaryRoundedFactoryWithScaleBuilder#build()

Field Summary

Modifier and TypeField and Description
private final RoundingMode
private final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MonetaryRoundedFactory
build()

Make the MonetaryRoundedFactory using the ScaleRoundedOperator as rounding operator.

public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder
withPrecision(int
the precision
precision
)

Set the total number of digits in a number

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

roundingModeback to summary
private final RoundingMode roundingMode
scaleback to summary
private final int scale

Constructor Detail

MonetaryRoundedFactoryWithScaleBuilderback to summary
private MonetaryRoundedFactoryWithScaleBuilder(RoundingMode roundingMode, int scale)

Method Detail

buildback to summary
public MonetaryRoundedFactory build()

Make the MonetaryRoundedFactory using the ScaleRoundedOperator as rounding operator.

Returns:MonetaryRoundedFactory

MonetaryRoundedFactory with ScaleRoundedOperator

See Also
ScaleRoundedOperator, MonetaryRoundedFactory
withPrecisionback to summary
public MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder withPrecision(int precision)

Set the total number of digits in a number

Parameters
precision:int

the precision

Returns:MonetaryRoundedFactoryBuilder.MonetaryRoundedFactoryWithPrecisionScaleBuilder

MonetaryRoundedFactoryWithPrecisionBuilder