private Tech getTech ( String techName ) throws ApiException { String trimmedTechName = techName . trim ( ) ; for ( Tech tech : Tech . builtInTech ) { if ( tech . toString ( ) . equalsIgnoreCase ( trimmedTechName ) ) return tech ; } throw new ApiException ( Type . ILLEGAL_PARAMETER , "The tech '" + trimmedTechName + "' does not exist" ) ; }
Gets the tech that matches the techName or throws an exception if no tech matches