com.octo.captcha.component.word.wordgenerator
Class ComposeDictionaryWordGenerator

java.lang.Object
  extended by com.octo.captcha.component.word.wordgenerator.DictionaryWordGenerator
      extended by com.octo.captcha.component.word.wordgenerator.ComposeDictionaryWordGenerator
All Implemented Interfaces:
WordGenerator

public class ComposeDictionaryWordGenerator
extends DictionaryWordGenerator

This Word Generator use a Dictionnary to compose new Words from existing words.

It avoid dictionnary systematic submission, and may compose words of any length.


Constructor Summary
ComposeDictionaryWordGenerator(DictionaryReader reader)
           
 
Method Summary
 java.lang.String getWord(java.lang.Integer length, java.util.Locale locale)
          Return a word of length between min and max length according to the given locale
 
Methods inherited from class com.octo.captcha.component.word.wordgenerator.DictionaryWordGenerator
getWord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComposeDictionaryWordGenerator

public ComposeDictionaryWordGenerator(DictionaryReader reader)
Method Detail

getWord

public java.lang.String getWord(java.lang.Integer length,
                                java.util.Locale locale)
Return a word of length between min and max length according to the given locale

Specified by:
getWord in interface WordGenerator
Overrides:
getWord in class DictionaryWordGenerator
Parameters:
length - the word length
Returns:
a String of length between min and max length according to the given locale


Copyright 2003-2009 JCaptcha. All Rights Reserved.