private static void examineOperatingSystem ( final UserAgent . Builder builder , final Data data ) { if ( net . sf . uadetector . OperatingSystem . EMPTY . equals ( builder . getOperatingSystem ( ) ) ) { for ( final Entry < OperatingSystemPattern , OperatingSystem > entry : data . getPatternToOperatingSystemMap ( ) . entrySet ( ) ) { final Matcher matcher = entry . getKey ( ) . getPattern ( ) . matcher ( builder . getUserAgentString ( ) ) ; if ( matcher . find ( ) ) { entry . getValue ( ) . copyTo ( builder ) ; break ; } } } }
Examines the operating system of the user agent string if not available .