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

x33g5p2x  于2022-01-31 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(130)

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

Version.hashCode介绍

[英]Returns a hash code value for the object.
[中]返回对象的哈希代码值。

代码示例

代码示例来源:origin: org.osgi/org.osgi.core

/**
 * Returns a hash code value for the object.
 * 
 * @return An integer which is a hash code value for this object.
 */
@Override
public int hashCode() {
  int h = hash;
  if (h != 0) {
    return h;
  }
  if (empty) {
    return hash = 31;
  }
  h = 31 + (leftClosed ? 7 : 5);
  h = 31 * h + left.hashCode();
  if (right != null) {
    h = 31 * h + right.hashCode();
    h = 31 * h + (rightClosed ? 7 : 5);
  }
  return hash = h;
}

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

public int hashCode()
{
  final int prime = 31;
  int result = 1;
  result = prime * result + ( ( ceiling == null ) ? 0 : ceiling.hashCode() );
  result = prime * result + ( ( floor == null ) ? 0 : floor.hashCode() );
  result = prime * result + ( openCeiling ? 1231 : 1237 );
  result = prime * result + ( openFloor ? 1231 : 1237 );
  return result;
}

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

public int hashCode()
{
  final int prime = 31;
  int result = 1;
  result = prime * result + ( ( ceiling == null ) ? 0 : ceiling.hashCode() );
  result = prime * result + ( ( floor == null ) ? 0 : floor.hashCode() );
  result = prime * result + ( openCeiling ? 1231 : 1237 );
  result = prime * result + ( openFloor ? 1231 : 1237 );
  return result;
}

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

public int hashCode()
{
  int hash = 5;
  hash = 97 * hash + (m_floor != null ? m_floor.hashCode() : 0);
  hash = 97 * hash + (m_isFloorInclusive ? 1 : 0);
  hash = 97 * hash + (m_ceiling != null ? m_ceiling.hashCode() : 0);
  hash = 97 * hash + (m_isCeilingInclusive ? 1 : 0);
  return hash;
}

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

public int hashCode()
{
  int hash = 5;
  hash = 97 * hash + (m_floor != null ? m_floor.hashCode() : 0);
  hash = 97 * hash + (m_isFloorInclusive ? 1 : 0);
  hash = 97 * hash + (m_ceiling != null ? m_ceiling.hashCode() : 0);
  hash = 97 * hash + (m_isCeilingInclusive ? 1 : 0);
  return hash;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + maxVersion.hashCode();
  result = prime * result + minVersion.hashCode();
  result = prime * result + (includeMax ? 1231 : 1237);
  result = prime * result + (includeMin ? 1231 : 1237);
  return result;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common

/**
 * Returns a hash code value for the object. 
 *
 * @return an integer which is a hash code value for this object.
 */
public int hashCode() {
  return version.hashCode();
}

代码示例来源:origin: org.jboss.osgi.resolver/jbosgi-resolver-apiv2

public int hashCode() {
  int hash = 5;
  hash = 97 * hash + (m_floor != null ? m_floor.hashCode() : 0);
  hash = 97 * hash + (m_isFloorInclusive ? 1 : 0);
  hash = 97 * hash + (m_ceiling != null ? m_ceiling.hashCode() : 0);
  hash = 97 * hash + (m_isCeilingInclusive ? 1 : 0);
  return hash;
}

代码示例来源:origin: org.eclipse.equinox/common

/**
 * Returns a hash code value for the object. 
 *
 * @return an integer which is a hash code value for this object.
 */
public int hashCode() {
  return version.hashCode();
}

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

public int hashCode()
{
  final int prime = 31;
  int result = 1;
  result = prime * result + ( ( ceiling == null ) ? 0 : ceiling.hashCode() );
  result = prime * result + ( ( floor == null ) ? 0 : floor.hashCode() );
  result = prime * result + ( openCeiling ? 1231 : 1237 );
  result = prime * result + ( openFloor ? 1231 : 1237 );
  return result;
}

代码示例来源:origin: org.apache.aries/org.apache.aries.util-r42

@Override
public int hashCode() {
  int result = 17;
  result = 31 * result + minimumVersion.hashCode();
  result = 31 * result + (minimumExclusive ? 1 : 0);
  result = 31 * result + (maximumVersion != null ? maximumVersion.hashCode() : 0);
  result = 31 * result + (maximumExclusive ? 1 : 0);
  return result;
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common

/**
 * Returns a hash code value for the object. 
 *
 * @return an integer which is a hash code value for this object.
 */
@Override
public int hashCode() {
  return version.hashCode();
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
  public int hashCode()
  {
    int result = symbolicName.hashCode();
    result = 31 * result + version.hashCode();
    return result;
  }
}

代码示例来源:origin: org.apache.aries.application/org.apache.aries.application.resolver.obr

public int hashCode() 
{
 final int prime = 31;
 int result = 1;
 result = prime * result + symbolicName.hashCode();
 result = prime * result + version.hashCode();
 return result;
}

代码示例来源:origin: org.codehaus.tycho/tycho-osgi-components

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

代码示例来源:origin: org.apache.geronimo.modules/geronimo-aries-resolver

public int hashCode() 
{
 final int prime = 31;
 int result = 1;
 result = prime * result + symbolicName.hashCode();
 result = prime * result + version.hashCode();
 return result;
}

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

public int hashCode() 
{
 final int prime = 31;
 int result = 1;
 result = prime * result + symbolicName.hashCode();
 result = prime * result + version.hashCode();
 return result;
}

代码示例来源:origin: com.springsource.util/com.springsource.util.osgi

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  int result = 17;
  if (!isEmpty()) {
    result = 37 * result + this.floor.hashCode();
    result = 37 * result + (this.ceiling == null ? 0 : this.ceiling.hashCode());
  }
  return result;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

@Override
  public int hashCode() {
    if (fVersion == null) {
      return fBundleName.hashCode();
    }
    int result = 1;
    result = 31 * result + fBundleName.hashCode();
    result = 31 * result + fVersion.hashCode();
    return result;
  }
}

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

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

相关文章