Class UserCode

    • Constructor Detail

      • UserCode

        public UserCode​(String value,
                        String charset)
        Creates a new user code with the specified value.
        Parameters:
        value - The code value. Must not be null or empty string.
        charset - The character set used by the identifier. The identifier can only contain characters from this set. If null, all characters are allowed.
      • UserCode

        public UserCode​(String value)
        Creates a new user code with the specified value and the LETTER_CHAR_SET.
        Parameters:
        value - The code value. Must not be null or empty string.
      • UserCode

        public UserCode()
        Creates a new user code with a randomly generated value with 8 characters from LETTER_CHAR_SET, in the form WDJB-MJHT.
      • UserCode

        public UserCode​(String charset,
                        int length)
        Creates a new user code with a randomly generated value from the specified charset and length. A dash is added every 4 characters.