org.osgi.framework.Filter.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(109)

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

Filter.hashCode介绍

[英]Returns the hashCode for this Filter.

This implementation returns the result of calling this.toString().hashCode().
[中]返回此筛选器的哈希代码。
此实现返回调用此函数的结果。toString()。hashCode()。

代码示例

代码示例来源:origin: apache/aries

@Override
public int hashCode()
{
 final int prime = 31;
 int result = 1;
 result = prime * result + ((filter == null) ? 0 : filter.hashCode());
 result = prime * result + ((interfaceName == null) ? 0 : interfaceName.hashCode());
 return result;
}

代码示例来源:origin: apache/felix

@Override
  public int hashCode()
  {
    int hash = 7;
    hash = 59 * hash + (this.m_bundle != null ? this.m_bundle.hashCode() : 0);
    hash = 59 * hash + (this.m_context != null ? this.m_context.hashCode() : 0);
    hash = 59 * hash + (this.m_listenerClass != null ? this.m_listenerClass.hashCode() : 0);
    hash = 59 * hash + (this.m_listener != null ? this.m_listener.hashCode() : 0);
    hash = 59 * hash + (this.m_filter != null ? this.m_filter.hashCode() : 0);
    return hash;
  }
}

代码示例来源:origin: apache/felix

@Override
  public int hashCode()
  {
    int hash = 7;
    hash = 59 * hash + (this.m_bundle != null ? this.m_bundle.hashCode() : 0);
    hash = 59 * hash + (this.m_context != null ? this.m_context.hashCode() : 0);
    hash = 59 * hash + (this.m_listenerClass != null ? this.m_listenerClass.hashCode() : 0);
    hash = 59 * hash + (this.m_listener != null ? this.m_listener.hashCode() : 0);
    hash = 59 * hash + (this.m_filter != null ? this.m_filter.hashCode() : 0);
    return hash;
  }
}

代码示例来源:origin: org.apache.felix/org.apache.felix.connect

@Override
  public int hashCode()
  {
    int hash = 7;
    hash = 59 * hash + (this.m_bundle != null ? this.m_bundle.hashCode() : 0);
    hash = 59 * hash + (this.m_context != null ? this.m_context.hashCode() : 0);
    hash = 59 * hash + (this.m_listenerClass != null ? this.m_listenerClass.hashCode() : 0);
    hash = 59 * hash + (this.m_listener != null ? this.m_listener.hashCode() : 0);
    hash = 59 * hash + (this.m_filter != null ? this.m_filter.hashCode() : 0);
    return hash;
  }
}

代码示例来源:origin: org.eclipse.gemini.blueprint/gemini-blueprint-core

/**
 * Constructs a new <code>DefaultOsgiServiceDependency</code> instance.
 * 
 * @param beanName dependency bean name (can be null)
 * @param filter dependency OSGi filter (can be null)
 * @param mandatoryService flag indicating whether the dependency is
 * mandatory or not
 */
public DefaultOsgiServiceDependency(String beanName, Filter filter, boolean mandatoryService) {
  this.beanName = beanName;
  this.filter = filter;
  this.mandatoryService = mandatoryService;
  // calculate internal fields
  toString = "DependencyService[Name=" + (beanName != null ? beanName : "null") + "][Filter=" + filter
      + "][Mandatory=" + mandatoryService + "]";
  int result = 17;
  result = 37 * result + DefaultOsgiServiceDependency.class.hashCode();
  result = 37 * result + (filter == null ? 0 : filter.hashCode());
  result = 37 * result + (beanName == null ? 0 : beanName.hashCode());
  result = 37 * result + (mandatoryService ? 0 : 1);
  hashCode = result;
}

相关文章

微信公众号

最新文章

更多