Class PausingNoOpCallable

  • All Implemented Interfaces:
    Callable<Integer>

    public class PausingNoOpCallable
    extends Object
    implements Callable<Integer>
    A simple Callable that will pause until released. When released, it finishes running and returns the input value raised to the third power (cubed).
    • Constructor Detail

      • PausingNoOpCallable

        public PausingNoOpCallable​(int inputValue)
        Create a new PausingNoOpCallable that will cube and return the specified int value. Note that since values larger than about 1290 will overflow an int when raised to the third power, this method will throw an exception if the inputValue is larger than that.
        Parameters:
        inputValue - An int value that will be cubed and returned when the Callable finishes.
        Throws:
        IllegalArgumentException - if inputValue is larger than 1290.