Back to project page android-edittext-validator.
The source code is released under:
MIT License
If you think the Android project android-edittext-validator listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.andreabaccega.formedittextvalidator; //w ww . j a v a 2 s . co m import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Abstract class for a multivalidator. * @see AndValidator * @see OrValidator * @author Andrea Baccega <me@andreabaccega.com> * */ public abstract class MultiValidator extends Validator { protected final List<Validator> validators; public MultiValidator(String message, Validator ...validators) { super(message); if (validators == null) throw new NullPointerException("validators is null"); this.validators = new ArrayList<Validator>(Arrays.asList(validators)); } public MultiValidator(String message) { super(message); this.validators = new ArrayList<Validator>(); } public void enqueue(Validator newValidator) { validators.add(newValidator); } }