Class SeedUtils


  • public final class SeedUtils
    extends java.lang.Object
    Utilities for parsing random seeds.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static char[] HEX  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SeedUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String formatSeed​(long seed)
      Format a single seed.
      static java.lang.String formatSeedChain​(Randomness... randomnesses)
      Formats randomness seed or seeds into something the user can type in to get predictably repeatable execution.
      static long parseSeed​(java.lang.String seed)
      Parse a single seed.
      static long[] parseSeedChain​(java.lang.String chain)
      Parse a seed chain formatted with formatSeedChain(Randomness...).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HEX

        private static final char[] HEX
    • Constructor Detail

      • SeedUtils

        private SeedUtils()
    • Method Detail

      • parseSeed

        public static long parseSeed​(java.lang.String seed)
        Parse a single seed. The seed needs to be cleaned up from any surrounding characters.
      • formatSeed

        public static java.lang.String formatSeed​(long seed)
        Format a single seed.
      • formatSeedChain

        public static java.lang.String formatSeedChain​(Randomness... randomnesses)
        Formats randomness seed or seeds into something the user can type in to get predictably repeatable execution.