public class DefaultTextProducer extends Object implements TextProducer
| Constructor and Description |
|---|
DefaultTextProducer()
Creates a
DefaultTextProducer with default length and random characters. |
DefaultTextProducer(int length)
Creates a
DefaultTextProducer with random characters and specified length. |
DefaultTextProducer(int length,
char[] dictionary)
Creates a
DefaultTextProducer with specified length and characters. |
DefaultTextProducer(String text)
Creates a
DefaultTextProducer with specified text. |
| Modifier and Type | Method and Description |
|---|---|
String |
getText()
Generate a series of characters to be used as the answer for the CAPTCHA.
|
public DefaultTextProducer()
DefaultTextProducer with default length and random characters.public DefaultTextProducer(int length)
DefaultTextProducer with random characters and specified length.length - length of text.public DefaultTextProducer(int length,
char[] dictionary)
DefaultTextProducer with specified length and characters.length - length of text.dictionary - characters for text.public DefaultTextProducer(String text)
DefaultTextProducer with specified text.text - text.public String getText()
TextProducergetText in interface TextProducerCopyright © 2015. All rights reserved.