Class Repeated<X>

  • Type Parameters:
    X - Type of output
    All Implemented Interfaces:
    Scalar<X>

    public final class Repeated<X>
    extends Object
    implements Scalar<X>
    Scalar that runs repeatedly for a number of times.
    Since:
    0.49.2
    • Constructor Detail

      • Repeated

        public Repeated​(Scalar<? extends X> scalar,
                        int times)
        Ctor.

        If max is equal or less than zero value() will return an exception.

        Parameters:
        scalar - Scalar to repeat.
        times - How many times.
    • Method Detail

      • value

        public X value()
                throws Exception
        Description copied from interface: Scalar
        Convert it to the value.
        Specified by:
        value in interface Scalar<X>
        Returns:
        The value
        Throws:
        Exception - If fails