public WindupConfiguration addDefaultUserRulesDirectory(Path path)
    {
        List<Path> paths = getOptionValue(DEFAULT_USER_RULES_DIRECTORIES_OPTION);
        if (paths == null)
        {
            paths = new ArrayList<>();
            setOptionValue(DEFAULT_USER_RULES_DIRECTORIES_OPTION, paths);
        }

        Iterable<File>  userRulesDirs= getOptionValue(UserRulesDirectoryOption.NAME);
        if (userRulesDirs != null) 
        {
            for (File userSpecifiedRuleFile : userRulesDirs)
            {
                
                if (userSpecifiedRuleFile != null && userSpecifiedRuleFile.toPath().equals(path))
                {
                    return this;
                }
        
                for (Path existingPath : paths)
                {
                    if (existingPath.equals(path))
                    {
                        return this;
                    }
                }
            }
        }
        paths.add(path);
        return this;
    }
public WindupConfiguration addDefaultUserRulesDirectory ( Path path ) { List < Path > paths = getOptionValue ( DEFAULT_USER_RULES_DIRECTORIES_OPTION ) ; if ( paths == null ) { paths = new ArrayList < > ( ) ; setOptionValue ( DEFAULT_USER_RULES_DIRECTORIES_OPTION , paths ) ; } Iterable < File > userRulesDirs = getOptionValue ( UserRulesDirectoryOption . NAME ) ; if ( userRulesDirs != null ) { for ( File userSpecifiedRuleFile : userRulesDirs ) { if ( userSpecifiedRuleFile != null && userSpecifiedRuleFile . toPath ( ) . equals ( path ) ) { return this ; } for ( Path existingPath : paths ) { if ( existingPath . equals ( path ) ) { return this ; } } } } paths . add ( path ) ; return this ; }
Contains a list of {@link Path}s with the directory that contains user provided rules.

This method does guard against duplicate directories.