java.util.jar.Attributes.equals()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(107)

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

Attributes.equals介绍

[英]Determines if this Attributes and the parameter Attributes are equal. Two Attributes instances are equal if they contain the same keys and values.
[中]确定此属性和参数属性是否相等。如果两个属性实例包含相同的键和值,则它们相等。

代码示例

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

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: org.codehaus.plexus/plexus-archiver

@Override
public boolean equals( Object rhs )
{
  return rhs instanceof ExistingSection && backingAttributes.equals(
    ( (ExistingSection) rhs ).backingAttributes );
}

代码示例来源:origin: stackoverflow.com

class SomethingKey {
 private Something something;
 private final Attributes attributes;
 SomethingKey(Something s) {
  this.something = s;
  this.attributes = attributesFor(something);
 }
 public Result createResult() {
  Something something = this.s;
  this.s = null;
  return something.slowResult();
 }
 public boolean equals(Object o) {
  if(o==this) return true;
  if(o==null || o.getClass() != this.getClass) return false;
  SomethingKey that = (SomethingKey)o;
  return this.attributes.equals(that.attributes);
 }
}

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

@Override
public boolean equals(final Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  final JarPluginProviderLoader that = (JarPluginProviderLoader) o;
  if (classCache != null ? !classCache.equals(that.classCache) : that.classCache != null) {
    return false;
  }
  if (!pluginJar.equals(that.pluginJar)) {
    return false;
  }
  if (mainAttributes != null ? !mainAttributes.equals(that.mainAttributes) : that.mainAttributes != null) {
    return false;
  }
  if (pluginProviderDefs != null ? !pluginProviderDefs.equals(that.pluginProviderDefs)
      : that.pluginProviderDefs != null) {
    return false;
  }
  return true;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: MobiVM/robovm

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: ibinti/bugvm

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Determines if the receiver is equal to the parameter object. Two {@code
 * Manifest}s are equal if they have identical main attributes as well as
 * identical entry attributes.
 *
 * @param o
 *            the object to compare against.
 * @return {@code true} if the manifests are equal, {@code false} otherwise
 */
@Override
public boolean equals(Object o) {
  if (o == null) {
    return false;
  }
  if (o.getClass() != this.getClass()) {
    return false;
  }
  if (!mainAttributes.equals(((Manifest) o).mainAttributes)) {
    return false;
  }
  return getEntries().equals(((Manifest) o).getEntries());
}

相关文章