1
2
3
4
5
6
7 package com.octo.captcha.engine.image;
8
9 import java.util.Arrays;
10
11 import com.octo.captcha.image.ImageCaptchaFactory;
12
13 /***
14 * <p>This is a very simple gimpy, which is constructed from an array of Factory and randomly return one when the
15 * getCaptchaFactory is called</p>
16 *
17 * @author <a href="mailto:mag@jcaptcha.net">Marc-Antoine Garrigue</a>
18 * @version 1.0
19 */
20 public abstract class DefaultImageCaptchaEngine extends ImageCaptchaEngine {
21
22 /***
23 * Default constructor : takes an array of ImageCaptchaFactories.
24 */
25 public DefaultImageCaptchaEngine(final ImageCaptchaFactory[] factories) {
26 checkNotNullOrEmpty(factories);
27 this.factories = Arrays.asList(factories);
28 }
29 }