public Analysis < SolutionType > addSearch ( String ID , SearchFactory < SolutionType > searchFactory ) { if ( searchFactory == null ) { throw new NullPointerException ( "Search factory can not be null." ) ; } if ( searches . containsKey ( ID ) ) { throw new DuplicateIDException ( "Duplicate search ID: " + ID + "." ) ; } searches . put ( ID , searchFactory ) ; return this ; }
Add a search to be applied to solve the analyzed problems . Requires a search factory instead of a plain search as a new instance of the search will be created for every run and for every analyzed problem . Returns a reference to the analysis object on which this method was called so that methods can be chained .