sdsu.algorithms.data
Class StringGenerator
java.lang.Object
|
+--sdsu.algorithms.data.StringGenerator
- public class StringGenerator
- extends java.lang.Object
- implements ObjectGenerator
Generates a sequence of random strings. The characters in the string are random
visible ascii characters. The length of the strings is also choosen at random
between a min and max value.
- Version:
- 1.0 19 June 1997
- Author:
- Roger Whitney (whitney@cs.sdsu.edu)
- See Also:
sdsu.data.ObjectGenerator
,
sdsu.data.NumberGenerator
Constructor Summary |
StringGenerator(int maxLength)
Create an StringGenerator which a sequence of random strings. |
StringGenerator(int minLength,
int maxLength)
Create an StringGenerator which a sequence of random strings. |
Method Summary |
java.lang.Object |
nextElement()
Returns next random string. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
StringGenerator
public StringGenerator(int maxLength)
- Create an StringGenerator which a sequence of random strings.
The strings will be between 1 and maxLength characters in length.
StringGenerator
public StringGenerator(int minLength,
int maxLength)
- Create an StringGenerator which a sequence of random strings.
The strings will be between minLength and maxLength characters in length.
nextElement
public java.lang.Object nextElement()
- Returns next random string.
- Specified by:
- nextElement in interface ObjectGenerator