class DirectoryNameValidator {

    public boolean isValid(String dirName) {
        if (dirName == null || dirName.trim().isEmpty()) {
            return Boolean.FALSE;
        }
        if (!dirName.matches(VALID_DIR_REGEX)) {
            return Boolean.FALSE;
        }
        if (currentDirectory.alreadyHasChild(dirName)) {
            return Boolean.FALSE;
        }
        return Boolean.TRUE;
    }

    public  DirectoryNameValidator(Directory currentDirectory);

}