legiahoang
12/3/2016 - 11:30 AM

uninstantiatable

uninstantiatable

/**
 * 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() {

    }

}