Interface RestorableUniformRandomProvider

    • Method Detail

      • saveState

        RandomProviderState saveState()
        Saves the state of a generator.
        Returns:
        the current state of this instance. It is a value that can subsequently be passed to the restore method.
        Throws:
        java.lang.UnsupportedOperationException - if the underlying source of randomness does not support this functionality.
      • restoreState

        void restoreState​(RandomProviderState state)
        Restores the state of a generator.
        Parameters:
        state - State which this instance will be set to. This parameter would usually have been obtained by a call to saveState performed either on the same object as this one, or an object of the exact same class.
        Throws:
        java.lang.UnsupportedOperationException - if the underlying source of randomness does not support this functionality.
        java.lang.IllegalArgumentException - if it was detected that the state argument is incompatible with this instance.