Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by HoangLG on 12/3/2016.
- */
- public class FormUtils {
- public static boolean isMissing(String value){
- return value == null || value.trim().isEmpty();
- }
- public static boolean isAnyMissing(String... values) {
- boolean isMissing = false;
- for (String value : values) {
- if (isMissing(value)) {
- isMissing = true;
- break;
- }
- }
- return (isMissing);
- }
- public static String wordForCopies(int n) {
- if (n == 1) {
- return "copy";
- }else{
- return "copies";
- }
- }
- // Uninstantiatable class. Static methods only.
- private FormUtils() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement