Class RandomIdTool

java.lang.Object
com.xxl.tool.id.RandomIdTool

public class RandomIdTool extends Object
random id tool
Author:
xuxueli 2025-06-29
  • Constructor Details

    • RandomIdTool

      public RandomIdTool()
  • Method Details

    • getDigitId

      public static String getDigitId()
      get random digits, default length 20
    • getDigitId

      public static String getDigitId(int length)
      get random digits
      Parameters:
      length -
      Returns:
    • getLowercaseId

      public static String getLowercaseId()
      get random lowercase letters, default length 20
      Returns:
    • getLowercaseId

      public static String getLowercaseId(int length)
      get random lowercase letters
      Parameters:
      length -
      Returns:
    • getUppercaseId

      public static String getUppercaseId()
      get random uppercase letters, default length 20
      Returns:
    • getUppercaseId

      public static String getUppercaseId(int length)
      get random uppercase letters
      Parameters:
      length -
      Returns:
    • getAlphaNumeric

      public static String getAlphaNumeric()
      get random alpha numeric, default length 20
      Returns:
    • getAlphaNumeric

      public static String getAlphaNumeric(int length)
      get random alpha numeric
      Parameters:
      length -
      Returns:
    • getAlphaNumericWithSpecial

      public static String getAlphaNumericWithSpecial()
      get random alpha numeric with special chars, default length is 20
      Returns:
    • getAlphaNumericWithSpecial

      public static String getAlphaNumericWithSpecial(int length)
      get random alpha numeric with special chars
      Parameters:
      length -
      Returns:
    • getRandomId

      public static String getRandomId(String characters, int length)
      get random id
      Parameters:
      length -
      Returns: