Class HandleGenerator


  • public class HandleGenerator
    extends Object
    Utility to create handles.
    • Method Detail

      • create

        public static HandleGenerator create​(String prefix)
        Creates instance that generates handles with a fixed prefix.
        Parameters:
        prefix - the prefix to set for all generated handles.
        Returns:
        a handle generator instance.
      • createOne

        public static String createOne​(String prefix)
        Static function to create one handle with a given prefix.
        Parameters:
        prefix - the prefix to set for the call.
        Returns:
        handle name in the format: prefix + non-negative integer.
      • createGloballyUnique

        public static String createGloballyUnique()
        Creates a handle that is globally unique.
        Returns:
        a UUID in hex format.
      • next

        public String next()
        Creates the next handle with the prefix given during construction.
        Returns:
        handle name in the format: prefix + non-negative integer.