Class AsBigDecimalGeneratorWrapper<E extends java.lang.Number>

  • Type Parameters:
    E - the type parameter
    All Implemented Interfaces:
    Generator<java.math.BigDecimal>, com.rapiddweller.common.Resettable, com.rapiddweller.common.ThreadAware, java.io.Closeable, java.lang.AutoCloseable

    public class AsBigDecimalGeneratorWrapper<E extends java.lang.Number>
    extends GeneratorWrapper<E,​java.math.BigDecimal>
    Converts the Number products of another Generator to BigDecimal.

    Created at 23.06.2009 22:58:26
    Since:
    0.6.0
    Author:
    Volker Bergmann
    • Constructor Detail

      • AsBigDecimalGeneratorWrapper

        public AsBigDecimalGeneratorWrapper​(Generator<E> source)
        Instantiates a new As big decimal generator wrapper.
        Parameters:
        source - the source
      • AsBigDecimalGeneratorWrapper

        public AsBigDecimalGeneratorWrapper​(Generator<E> source,
                                            java.math.BigDecimal min,
                                            java.math.BigDecimal granularity)
        Instantiates a new As big decimal generator wrapper.
        Parameters:
        source - the source
        min - the min
        granularity - the granularity
    • Method Detail

      • getGeneratedType

        public java.lang.Class<java.math.BigDecimal> getGeneratedType()
        Description copied from interface: Generator
        Declares the type of the objects returned by the generate() method.
        Returns:
        the generated type
      • generate

        public ProductWrapper<java.math.BigDecimal> generate​(ProductWrapper<java.math.BigDecimal> wrapper)
        Description copied from interface: Generator
        Returns an instance of the generic type E, using the ProductWrapper instance provided as argument. The wrapper may wrap a null value as a regular generator product. If the generator is not available (any more), it returns null instead of the ProductWrapper instance.
        Parameters:
        wrapper - the wrapper
        Returns:
        the product wrapper