Class SingleThreadSplittableRandomAdapter

    • Constructor Detail

      • SingleThreadSplittableRandomAdapter

        public SingleThreadSplittableRandomAdapter​(SeedGenerator seedGenerator)
                                            throws SeedException
        Use the provided seed generation strategy to create the seed for the SplittableRandom.
        Parameters:
        seedGenerator - The seed generation strategy that will provide the seed value for this RNG.
        Throws:
        SeedException - if there is a problem generating a seed.
      • SingleThreadSplittableRandomAdapter

        public SingleThreadSplittableRandomAdapter​(byte[] seed)
        Use the provided seed for the SplittableRandom.
        Parameters:
        seed - The seed. Must be 8 bytes.
      • SingleThreadSplittableRandomAdapter

        public SingleThreadSplittableRandomAdapter​(long seed)
        Use the provided seed for the SplittableRandom.
        Parameters:
        seed - The seed.
    • Method Detail

      • debitEntropy

        protected void debitEntropy​(long bits)
        Must be redeclared in this package so that SplittableRandomAdapter can access it.
        Overrides:
        debitEntropy in class BaseRandom
        Parameters:
        bits - The number of bits of entropy spent.
      • getSplittableRandom

        protected java8.util.SplittableRandom getSplittableRandom()
        Returns this SingleThreadSplittableRandomAdapter's only SplittableRandom.
        Specified by:
        getSplittableRandom in class BaseSplittableRandomAdapter
        Returns:
        the SplittableRandom