private static boolean examineAsRobot ( final UserAgent . Builder builder , final Data data ) { boolean isRobot = false ; VersionNumber version ; for ( final Robot robot : data . getRobots ( ) ) { if ( robot . getUserAgentString ( ) . equals ( builder . getUserAgentString ( ) ) ) { isRobot = true ; robot . copyTo ( builder ) ; // try to get the version from the last found group version = VersionNumber . parseLastVersionNumber ( robot . getName ( ) ) ; builder . setVersionNumber ( version ) ; break ; } } return isRobot ; }
Examines the user agent string whether it is a robot .