Class CensoringWordGenerator

  • All Implemented Interfaces:
    com.octo.captcha.component.word.wordgenerator.WordGenerator

    public final class CensoringWordGenerator
    extends Object
    implements com.octo.captcha.component.word.wordgenerator.WordGenerator
    A word generator that wraps around another word generator, and censors the words that the wrapped generator produces.
    Since:
    6.0.6
    • Constructor Detail

      • CensoringWordGenerator

        public CensoringWordGenerator​(com.octo.captcha.component.word.wordgenerator.WordGenerator censoredWordGenerator)
        Constructs a censoring word generator that censors the given word generator.
        Parameters:
        censoredWordGenerator - the word generator that will be censored. Must not be null.
    • Method Detail

      • getWord

        public String getWord​(Integer length)
        Specified by:
        getWord in interface com.octo.captcha.component.word.wordgenerator.WordGenerator
      • getWord

        public String getWord​(Integer length,
                              Locale locale)
        Specified by:
        getWord in interface com.octo.captcha.component.word.wordgenerator.WordGenerator