Back to project page android-mvc-framework.
The source code is released under:
Apache License
If you think the Android project android-mvc-framework 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.android_mvc.framework.controller.validation; //from w ww . j ava 2 s. c o m import java.util.ArrayList; import com.android_mvc.framework.controller.routing.IntentPortable; /** * Activity???????????????????????????????????? * Intent????????????????? * @author id:language_and_engineering * */ public class ValidationResult implements IntentPortable { private static final long serialVersionUID = 1L; private boolean validation_success_flag = true; ArrayList<String> err_msgs; public ValidationResult() { this.err_msgs = new ArrayList<String>(); } /** * ??????????? */ public ValidationResult err( String err_msg ) { validation_success_flag = false; err_msgs.add(err_msg); return this; } /** * ???????????????????? */ public boolean isSuccess() { return validation_success_flag; } /** * ????????????????????????? */ public ValidationResult setSuccess() { validation_success_flag = true; return this; } /** * BL?????????????????????????? */ public boolean permitsExecitionOfBL() { return validation_success_flag; } /** * BL?????????????????????????????? */ public boolean didNotExecuteBL() { return ! validation_success_flag; } /** * ?????????????????????????? */ public String getAllErrMsgs() { String ret = ""; for( int i = 0; i < err_msgs.size(); i ++ ) { ret += err_msgs.get(i); if( i != err_msgs.size() - 1 ) { ret += "\n"; } } return ret; } }