Class Lorem


public class Lorem extends AbstractProvider<BaseProviders>
Since:
0.8.0
  • Constructor Details

  • Method Details

    • character

      public char character()
    • character

      public char character(boolean includeUppercase)
    • characters

      public String characters()
    • characters

      public String characters(boolean includeUppercase)
    • characters

      public String characters(int minimumLength, int maximumLength)
    • characters

      public String characters(int minimumLength, int maximumLength, boolean includeUppercase)
    • characters

      public String characters(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeDigit)
    • characters

      public String characters(int fixedNumberOfCharacters)
    • characters

      public String characters(int fixedNumberOfCharacters, boolean includeUppercase)
    • characters

      public String characters(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeSpecial, boolean includeDigit)
    • characters

      public String characters(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeDigit)
    • characters

      public String characters(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeSpecial, boolean includeDigit)
    • words

      public List<String> words(int num)
    • words

      public List<String> words()
    • word

      public String word()
    • sentence

      public String sentence()
      Create a sentence with a random number of words within the range 4..10.
      Returns:
      a random sentence
    • sentence

      public String sentence(int wordCount)
      Create a sentence with a random number of words within the range (wordCount+1)..(wordCount+6).
      Returns:
      a random sentence
    • sentence

      public String sentence(int wordCount, int randomWordsToAdd)
      Create a sentence with a random number of words within the range (wordCount+1)..(wordCount+randomWordsToAdd).

      Set randomWordsToAdd to 0 to generate sentences with a fixed number of words.

      Returns:
      a random sentence
    • sentences

      public List<String> sentences(int sentenceCount)
    • paragraph

      public String paragraph(int sentenceCount)
      Creates a paragraph with a range (sentenceCount)...(<sentenceCount+3)
    • paragraph

      public String paragraph()
    • paragraphs

      public List<String> paragraphs(int paragraphCount)
    • fixedString

      public String fixedString(int numberOfLetters)
      Create a string with a fixed size. Can be useful for testing validator based on length string for example
      Parameters:
      numberOfLetters - size of the expected String
      Returns:
      a string with a fixed size
    • maxLengthSentence

      public String maxLengthSentence(int fixedLength)
      Create a Lorem Ipsum sentence with fixed length.
      Parameters:
      fixedLength - size of the expected Lorem Ipsum sentence.
      Returns:
      a string with a fixed size. Return empty string if input size is 0 or negative.