eu.bitwalker.useragentutils.Browser.equals()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中eu.bitwalker.useragentutils.Browser.equals()方法的一些代码示例,展示了Browser.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.equals()方法的具体详情如下:
包路径:eu.bitwalker.useragentutils.Browser
类名称:Browser
方法名:equals

Browser.equals介绍

暂无

代码示例

代码示例来源:origin: HaraldWalker/user-agent-utils

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  final UserAgent other = (UserAgent) obj;
  if (browser == null) {
    if (other.browser != null)
      return false;
  } else if (!browser.equals(other.browser))
    return false;
  if (id != other.id)
    return false;
  if (operatingSystem == null) {
    if (other.operatingSystem != null)
      return false;
  } else if (!operatingSystem.equals(other.operatingSystem))
    return false;
  return true;
}

代码示例来源:origin: com.gitee.morilys.jsmile/jsmile-kit

/**
 * 是否IE版本是否小于等于IE8
 * 
 * @param request
 * @return
 */
public static boolean isLteIE8(HttpServletRequest request) {
  Browser browser = getBrowser(request);
  return Browser.IE5.equals(browser) || Browser.IE6.equals(browser) || Browser.IE7.equals(browser)
      || Browser.IE8.equals(browser);
}

代码示例来源:origin: eu.bitwalker/UserAgentUtils

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  final UserAgent other = (UserAgent) obj;
  if (browser == null) {
    if (other.browser != null)
      return false;
  } else if (!browser.equals(other.browser))
    return false;
  if (id != other.id)
    return false;
  if (operatingSystem == null) {
    if (other.operatingSystem != null)
      return false;
  } else if (!operatingSystem.equals(other.operatingSystem))
    return false;
  return true;
}

代码示例来源:origin: net.shibboleth.idp/idp-authn-api

/**
 * Determines whether this user agent is an instance of the given browser.
 *
 * @param browser browser to check.
 *
 * @return True if this user agent is an instance of the given browser, false otherwise.
 */
public boolean isInstance(@Nonnull final Browser browser) {
  Constraint.isNotNull(browser, "Browser cannot be null");
  if (userAgent == null) {
    return false;
  }
  return userAgent.getBrowser().getGroup().equals(browser) || userAgent.getBrowser().equals(browser);
}

相关文章