class PasswordChecker {

    public static void check(String password) throws CheckerException {
        for (Rule r : Rule.values()) {
            if (!r.getItem().test(password)) {
                throw new CheckerException(r.getMessage());
            }
        }
    }

    private  PasswordChecker();

}