1
2
3
4
5
6
7 package com.octo.captcha.component.word.wordgenerator;
8
9 import java.util.Locale;
10
11 /***
12 * <p>This interface defines methods to retrieve random words </p>.
13 *
14 * @author <a href="mailto:mag@jcaptcha.net">Marc-Antoine Garrigue</a>
15 * @version 1.0
16 */
17 public interface WordGenerator {
18
19 /***
20 * Return a word of length between min and max length
21 *
22 * @return a String of length between min and max length
23 */
24 String getWord(Integer length);
25
26 /***
27 * Return a word of length between min and max length according to the given locale
28 *
29 * @param length the word length
30 *
31 * @return a String of length between min and max length according to the given locale
32 */
33 String getWord(Integer length, Locale locale);
34
35 }