Package jregex

Examples of jregex.Matcher.find()


     * @param uaInfo
     */
    protected void processBrowserRegex(String useragent, UserAgentInfo uaInfo) {
        for (Map.Entry<Pattern, Long> entry : compiledBrowserRegMap.entrySet()) {
            Matcher matcher = entry.getKey().matcher(useragent);
            if (matcher.find()) {
                Long idBrowser = entry.getValue();
                BrowserEntry be = browserMap.get(idBrowser);
                if (be != null) {
                    uaInfo.setType(browserTypeMap.get(be.getType()));;
                    if (matcher.groupCount() > 1) {
View Full Code Here


     * @param uaInfo
     */
    protected void processOsRegex(String useragent, UserAgentInfo uaInfo) {
        for (Map.Entry<Pattern, Long> entry : compiledOsRegMap.entrySet()) {
            Matcher matcher = entry.getKey().matcher(useragent);
            if (matcher.find()) {
                uaInfo.setOsEntry(osMap.get(entry.getValue()));
                return;
            }
        }
    }
View Full Code Here

     */
    protected void processDeviceRegex(String useragent, UserAgentInfo uaInfo) {
        if (compiledDeviceRegMap != null && deviceMap != null) {
        for (Map.Entry<Pattern, Long> entry : compiledDeviceRegMap.entrySet()) {
              Matcher matcher = entry.getKey().matcher(useragent);
              if (matcher.find()) {
                  uaInfo.setDeviceEntry(deviceMap.get(entry.getValue()));
                  return;
              }
          }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.