View Javadoc

1   /*
2    * JCaptcha, the open source java framework for captcha definition and integration
3    * Copyright (c)  2007 jcaptcha.net. All Rights Reserved.
4    * See the LICENSE.txt file distributed with this package.
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  }