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

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

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

Permission.equals介绍

[英]Checks two Permission objects for equality.

Do not use the equals method for making access control decisions; use the implies method.
[中]检查两个权限对象是否相等。
不要使用equals方法进行访问控制决策;使用implies方法。

代码示例

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

/**
 * Checks two DeploymentAdminPermission objects for equality. Two permission
 * objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are semantically equal and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentCustomizerPermission objects for equality. Two
 * permission objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are equal (semantically and not character by
 * character) and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj the reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentCustomizerPermission))
    return false;
  DeploymentCustomizerPermission dcp = (DeploymentCustomizerPermission) obj;
  return delegate.equals(dcp.delegate);
}

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

@Override
public final boolean equals(Object obj) {
  return badDefaultPermission.equals(obj);
}

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

/**
 * Checks two DeploymentAdminPermission objects for equality. 
 * Two permission objects are equal if: <p>
 * 
 * <ul>
 *         <li>their target filters are semantically equal and</li>
 *         <li>their actions are the same</li> 
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentCustomizerPermission objects for equality. 
 * Two permission objects are equal if: <p>
 * 
 * <ul>
 *         <li>their target filters are equal (semantically and not character by 
 *       character) and</li>
 *         <li>their actions are the same</li> 
 * </ul>
 * 
 * @param obj the reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentCustomizerPermission))
    return false;
  DeploymentCustomizerPermission dcp = (DeploymentCustomizerPermission) obj;
  return delegate.equals(dcp.delegate);
}

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

/**
 * Two instances of this class are equal if <code>FilePermission</code>
 * instances created with their names are equal.
 */
public boolean equals(Object obj) {
return (obj instanceof ExecPermission &&
  fp.equals(((ExecPermission) obj).fp));
}

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

@Override
public final boolean equals(Object obj) {
  return badDefaultPermission.equals(obj);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public final boolean equals(Object obj) {
  return badDefaultPermission.equals(obj);
}

代码示例来源:origin: harbby/presto-connectors

@Override
public final boolean equals(Object obj) {
  return badDefaultPermission.equals(obj);
}

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

@Override
public final boolean equals(Object obj) {
  return badDefaultPermission.equals(obj);
}

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

/**
 * Checks two DeploymentCustomizerPermission objects for equality. Two
 * permission objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are equal (semantically and not character by
 * character) and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj the reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentCustomizerPermission))
    return false;
  DeploymentCustomizerPermission dcp = (DeploymentCustomizerPermission) obj;
  return delegate.equals(dcp.delegate);
}

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

/**
 * Checks two DeploymentAdminPermission objects for equality. 
 * Two permission objects are equal if: <p>
 * 
 * <ul>
 *         <li>their target filters are semantically equal and</li>
 *         <li>their actions are the same</li> 
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentAdminPermission objects for equality. 
 * Two permission objects are equal if: <p>
 * 
 * <ul>
 *         <li>their target filters are semantically equal and</li>
 *         <li>their actions are the same</li> 
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentAdminPermission objects for equality. Two permission
 * objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are semantically equal and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentCustomizerPermission objects for equality. 
 * Two permission objects are equal if: <p>
 * 
 * <ul>
 *         <li>their target filters are equal (semantically and not character by 
 *       character) and</li>
 *         <li>their actions are the same</li> 
 * </ul>
 * 
 * @param obj the reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentCustomizerPermission))
    return false;
  DeploymentCustomizerPermission dcp = (DeploymentCustomizerPermission) obj;
  return delegate.equals(dcp.delegate);
}

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

/**
 * Checks two DeploymentAdminPermission objects for equality. Two permission
 * objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are semantically equal and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentAdminPermission objects for equality. Two permission
 * objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are semantically equal and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj The reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentAdminPermission))
    return false;
  DeploymentAdminPermission dap = (DeploymentAdminPermission) obj;
  return delegate.equals(dap.delegate);
}

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

/**
 * Checks two DeploymentCustomizerPermission objects for equality. Two
 * permission objects are equal if:
 * <p>
 * 
 * <ul>
 * <li>their target filters are equal (semantically and not character by
 * character) and</li>
 * <li>their actions are the same</li>
 * </ul>
 * 
 * @param obj the reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentCustomizerPermission))
    return false;
  DeploymentCustomizerPermission dcp = (DeploymentCustomizerPermission) obj;
  return delegate.equals(dcp.delegate);
}

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

/**
 * Checks two DeploymentCustomizerPermission objects for equality. 
 * Two permission objects are equal if: <p>
 * 
 * <ul>
 *         <li>their target filters are equal (semantically and not character by 
 *       character) and</li>
 *         <li>their actions are the same</li> 
 * </ul>
 * 
 * @param obj the reference object with which to compare.
 * @return true if the two objects are equal.
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (obj == this)
    return true;
  if (!(obj instanceof DeploymentCustomizerPermission))
    return false;
  DeploymentCustomizerPermission dcp = (DeploymentCustomizerPermission) obj;
  return delegate.equals(dcp.delegate);
}

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

/**
 * Two instances of this class are equal if each implies the other;
 * that is, every option that matches the name of one instance matches
 * the name of the other instance.
 */
public boolean equals(Object obj) {
if (!(obj instanceof ExecOptionPermission)) {
  return false;
}
ExecOptionPermission p = (ExecOptionPermission) obj;
return (prefix.equals(p.prefix) &&
  plain == p.plain &&
  (fp == null ? p.fp == null : fp.equals(p.fp)));
}

相关文章