Class RandomObjectsExtensions


  • public final class RandomObjectsExtensions
    extends java.lang.Object
    The class RandomObjectsExtensions is a utility class to create random objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getInfomailFromWebsite​(java.lang.String url)
      Gets an infomail address from the given url.
      static java.lang.String getRandomEmail()
      The Method getRandomEmail() gets a random email-address.
      static java.lang.String getRandomFaxnumber​(java.lang.String phonenumber)
      Gets a random faxnumber from a phone.
      static java.lang.String getRandomMobilnumber()
      Gets a random mobil number from a mobilphone.
      static java.lang.String getRandomPassword​(int length)
      The Method getRandomPassword(int) produces a random password.
      static java.lang.String getRandomPassword​(java.util.Optional<java.lang.Integer> length)
      The Method getRandomPassword(int) produces a random password.
      static java.lang.String getRandomPhonenumber()
      Gets a random phonenumber.
      static java.lang.String getRandomWebsite()
      Gets a random name for a website.
      static java.lang.String newRandomId()
      Factory method for create a new random id and returns it
      static java.lang.String newRandomName​(char[] donatedChars)
      Factory method for create a new random name from the donated char array
      • Methods inherited from class java.lang.Object

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

      • getInfomailFromWebsite

        public static java.lang.String getInfomailFromWebsite​(java.lang.String url)
        Gets an infomail address from the given url.
        Parameters:
        url - The url.
        Returns:
        Returns an infomail address from the given url.
      • getRandomEmail

        public static java.lang.String getRandomEmail()
        The Method getRandomEmail() gets a random email-address.
        Returns:
        The random email-address.
      • getRandomFaxnumber

        public static java.lang.String getRandomFaxnumber​(java.lang.String phonenumber)
        Gets a random faxnumber from a phone.
        Parameters:
        phonenumber - The phonenumber.
        Returns:
        Return's a random faxnumber from a phone.
      • getRandomMobilnumber

        public static java.lang.String getRandomMobilnumber()
        Gets a random mobil number from a mobilphone.
        Returns:
        Return's a random mobil number from a mobilphone.
      • getRandomPassword

        public static java.lang.String getRandomPassword​(int length)
        The Method getRandomPassword(int) produces a random password.
        Parameters:
        length - The length from the password.
        Returns:
        The password.
      • getRandomPassword

        public static java.lang.String getRandomPassword​(java.util.Optional<java.lang.Integer> length)
        The Method getRandomPassword(int) produces a random password.
        Parameters:
        length - The length from the password as Optional.
        Returns:
        The password.
      • getRandomPhonenumber

        public static java.lang.String getRandomPhonenumber()
        Gets a random phonenumber.
        Returns:
        Return's a random phonenumber.
      • getRandomWebsite

        public static java.lang.String getRandomWebsite()
        Gets a random name for a website.
        Returns:
        Returns a random name for a website.
      • newRandomId

        public static java.lang.String newRandomId()
        Factory method for create a new random id and returns it
        Returns:
        the created random id.
      • newRandomName

        public static java.lang.String newRandomName​(char[] donatedChars)
        Factory method for create a new random name from the donated char array
        Parameters:
        donatedChars - The Characters for the name
        Returns:
        A random Name.