public Analysis < SolutionType > addProblem ( String ID , Problem < SolutionType > problem ) { if ( problem == null ) { throw new NullPointerException ( "Problem can not be null." ) ; } if ( problems . containsKey ( ID ) ) { throw new DuplicateIDException ( "Duplicate problem ID: " + ID + "." ) ; } problems . put ( ID , problem ) ; return this ; }
Add a problem to be analyzed . Returns a reference to the analysis object on which this method was called so that methods can be chained .