class StringUtils {

  public static boolean equalsIgnoreCase(
      Optional<String> optionalString1, Optional<String> optionalString2) {
    if (!optionalString1.isPresent() || !optionalString2.isPresent()) {
      return false;
    }
    return optionalString1
        .flatMap(string1 -> optionalString2.filter(string1::equalsIgnoreCase))
        .isPresent();
  }

  private  StringUtils();

}