Class StringGenerator

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    RandomStringGenerator

    public abstract class StringGenerator
    extends java.lang.Object
    implements java.io.Serializable
    String generator.
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  StringGenerator.Alphabets
      A class containing different alphabets used to generate strings.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected StringGenerator​(java.lang.String alphabet)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String createString​(int length)
      Generates a string of a specified length.
      java.util.Collection<java.lang.String> createStrings​(int length, int count)
      Batch-generates an ImmutableList of strings of a specified length.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_PASSWORD_LENGTH

        public static final int DEFAULT_PASSWORD_LENGTH
        See Also:
        Constant Field Values
      • alphabet

        protected java.lang.String alphabet
    • Constructor Detail

      • StringGenerator

        protected StringGenerator​(java.lang.String alphabet)
    • Method Detail

      • createString

        public abstract java.lang.String createString​(int length)
        Generates a string of a specified length.
      • createStrings

        public java.util.Collection<java.lang.String> createStrings​(int length,
                                                                    int count)
        Batch-generates an ImmutableList of strings of a specified length.