private boolean compare(String first, String second, boolean ignoreCase) {
        if (!ignoreCase)
            return first.equals(second);
        else
            return first.equalsIgnoreCase(second);
    }