Class NonNullGeneratorWrapper<S,​P>

    • Constructor Detail

      • NonNullGeneratorWrapper

        public NonNullGeneratorWrapper​(NonNullGenerator<S> source)
        Instantiates a new Non null generator wrapper.
        Parameters:
        source - the source
    • Method Detail

      • setSource

        public void setSource​(NonNullGenerator<S> source)
        Sets the source generator
        Parameters:
        source - the source
      • generateFromNotNullSource

        protected final S generateFromNotNullSource()
        Generate from not null source s.
        Returns:
        the s
      • generate

        public final ProductWrapper<P> generate​(ProductWrapper<P> 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.
        Specified by:
        generate in interface Generator<S>
        Parameters:
        wrapper - the wrapper
        Returns:
        the product wrapper