code: public boolean isValid(String password) {
          if (password == null) {
              return false;
          }
  
          boolean length = hasMinimumLength(password, getMinimumLength());
          boolean other = true;
          switch (complexity.getPasswordPolicy()) {
              case PasswordStrength.EXCELLENT:
                  boolean atLeast = atLeastThree(hasLowercaseCharacters(password), hasUppercaseCharacters(password), hasNumericCharacters(password), hasSpecialCharacters(password));
                  other = hasIdenticalCharacters(password) && atLeast;
                  break;
              case PasswordStrength.GOOD:
                  other = atLeastThree(hasLowercaseCharacters(password), hasUppercaseCharacters(password), hasNumericCharacters(password), hasSpecialCharacters(password));
                  break;
              case PasswordStrength.FAIR:
                  other = allThree(hasLowercaseCharacters(password), hasUppercaseCharacters(password), hasNumericCharacters(password));
                  break;
              case PasswordStrength.LOW:
              case PasswordStrength.NONE:
          }
          return length && other;
      }
docs: Checks that all the requirements are meet.
  
  @param password the current password to validate
  @return whether the given password complies with this password policy or not.