java.security.Permission.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(94)

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

Permission.hashCode介绍

[英]Returns the hash code value for this Permission object.

The required hashCode behavior for Permission Objects is the following:

  • Whenever it is invoked on the same Permission object more than once during an execution of a Java application, the hashCode method must consistently return the same integer. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two Permission objects are equal according to the equals method, then calling the hashCode method on each of the two Permission objects must produce the same integer result.
    [中]返回此权限对象的哈希代码值。
    权限对象所需的hashCode行为如下:
    *每当在Java应用程序的执行过程中对同一权限对象多次调用hashCode方法时,该方法必须始终返回相同的整数。从应用程序的一次执行到同一应用程序的另一次执行,这个整数不需要保持一致。
    *如果根据equals方法,两个权限对象相等,那么对两个权限对象中的每一个调用hashCode方法必须产生相同的整数结果。

代码示例

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

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

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

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

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

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

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

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public int hashCode() {
  return badDefaultPermission.hashCode();
}

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

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
@Override
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: au.net.zeus.jgdms.phoenix-activation/phoenix-dl

/**
 * Returns a hash code value for this object.
 */
public int hashCode() {
return fp.hashCode();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

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

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
@Override
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: au.net.zeus.jgdms/jgdms-platform

/** Returns a hash code value for this object. */
  public int hashCode() {
  int hash = 0;
  for (int i = permissions.length; --i >= 0; ) {
    hash += permissions[i].hashCode();
  }
  return hash;
  }
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Returns hash code for this permission object.
 * 
 * @return Hash code for this permission object.
 * @see java.lang.Object#hashCode()
 */
public int hashCode() {
  return delegate.hashCode();
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public int hashCode() {
  return badDefaultPermission.hashCode();
}

代码示例来源:origin: xap/xap

/**
   * Returns a hash code value for this object.
   */
  public int hashCode() {
    int hash = 0;
    for (int i = permissions.length; --i >= 0; ) {
      hash += permissions[i].hashCode();
    }
    return hash;
  }
}

代码示例来源:origin: org.openwfe/openwfe-applic

/**
 * Computes a key for any Permission instance
 */
public static String computeKey (Permission p)
{
  StringBuffer sb = new StringBuffer();
  sb.append(p.getClass().getName());
  sb.append("::");
  sb.append(p.hashCode());
  return sb.toString();
}

相关文章