org.apache.directory.shared.ldap.name.DN.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(86)

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

DN.hashCode介绍

[英]Gets the hash code of this name.
[中]获取此名称的哈希代码。

代码示例

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
* Gets the hashCode of this ServerEntry.
*
* @see java.lang.Object#hashCode()
 * @return the instance's hash code 
 */
public int hashCode()
{
  int result = 37;
  
  result = result*17 + dn.hashCode();
  
  for ( EntryAttribute attribute:attributes.values() )
  {
    result = result*17 + attribute.hashCode();
  }
  return result;
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
 * @see java.lang.Object#hashCode()
 * @return the instance's hash code 
 */
public int hashCode()
{
  int h = 37;
  
  h = h*17 + ( ( baseObject == null ) ? 0 : baseObject.hashCode() );
  h = h*17 + ( ( searchScope == null ) ? 0 : searchScope.hashCode() );
  
  return h;
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
 * Get the hash code of this ClientEntry.
 *
 * @see java.lang.Object#hashCode()
 * @return the instance's hash code 
 */
public int hashCode()
{
  int result = 37;
  
  result = result*17 + dn.hashCode();
  
  SortedMap<String, EntryAttribute> sortedMap = new TreeMap<String, EntryAttribute>();
  
  for ( String id:attributes.keySet() )
  {
    sortedMap.put( id, attributes.get( id ) );
  }
  
  for ( String id:sortedMap.keySet() )
  {
    result = result*17 + sortedMap.get( id ).hashCode();
  }
  
  return result;
}

代码示例来源:origin: org.apache.directory.shared/shared-ldap

/**
 * @see Object#hashCode()
 * @return the instance's hash code 
 */
public int hashCode()
{
  int hash = 37;
  hash = hash*17 + ( credentials == null ? 0 : hCredentials );
  hash = hash*17 + ( isSimple ? 0 : 1 );
  hash = hash*17 + ( isVersion3 ? 0 : 1 );
  hash = hash*17 + ( mechanism == null ? 0 : mechanism.hashCode() );
  hash = hash*17 + ( name == null ? 0 : name.hashCode() );
  hash = hash*17 + ( response == null ? 0 : response.hashCode() );
  hash = hash*17 + super.hashCode();
  
  return hash;
}

代码示例来源:origin: org.apache.directory.shared/shared-ldif

result = result*17 + entry.getDn().hashCode();

相关文章