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

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

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

Hashtable.equals介绍

[英]Compares this Hashtable with the specified object and indicates if they are equal. In order to be equal, object must be an instance of Map and contain the same key/value pairs.
[中]将此哈希表与指定的对象进行比较,并指示它们是否相等。若要相等,对象必须是Map的实例,并且包含相同的键/值对。

代码示例

代码示例来源:origin: scouter-project/scouter

public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  MapValue other = (MapValue) obj;
  if (table == null) {
    if (other.table != null)
      return false;
  } else if (!table.equals(other.table))
    return false;
  return true;
}
public void putAll(Map<String, Value> m){

代码示例来源:origin: scouter-project/scouter

public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  MapValue other = (MapValue) obj;
  if (table == null) {
    if (other.table != null)
      return false;
  } else if (!table.equals(other.table))
    return false;
  return true;
}
public void putAll(Map<String, Value> m){

代码示例来源:origin: scouter-project/scouter

public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  MapValue other = (MapValue) obj;
  if (table == null) {
    if (other.table != null)
      return false;
  } else if (!table.equals(other.table))
    return false;
  return true;
}
public void putAll(Map<String, Value> m){

代码示例来源:origin: scouter-project/scouter

public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  MapValue other = (MapValue) obj;
  if (table == null) {
    if (other.table != null)
      return false;
  } else if (!table.equals(other.table))
    return false;
  return true;
}
public void putAll(Map<String, Value> m){

代码示例来源:origin: scouter-project/scouter

public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  MapValue other = (MapValue) obj;
  if (table == null) {
    if (other.table != null)
      return false;
  } else if (!table.equals(other.table))
    return false;
  return true;
}
public void putAll(Map<String, Value> m){

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

public synchronized boolean equals(Object o) {
  return project.getProperties().equals(o);
}

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

if (!getWrapper().getAttributeMap().equals(
    other.getWrapper().getAttributeMap())) {
  return false;

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

return false;
else if (!hashtable.equals(other.hashtable))
  return false;
if (identityHashMap == null)

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

return false;
else if (!hashTable.equals(other.hashTable))
  return false;
if (identityHashMap == null)

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

/**
 * @see java.lang.Object#equals
 */
@Override
public boolean equals( Object rhs )
{
  if ( rhs == null || rhs.getClass() != getClass() )
  {
    return false;
  }
  if ( rhs == this )
  {
    return true;
  }
  Section rhsSection = (Section) rhs;
  return rhsSection.attributes != null && attributes.equals( rhsSection.attributes );
}

代码示例来源:origin: org.openprovenance.prov/prov-template

@Override
public boolean equals (Object o) {
  if (!(o instanceof Bindings)) return false;
  Bindings b=(Bindings)o;
  return b.variables.equals(this.variables)
      && b.attributes.equals(this.attributes);
}

代码示例来源:origin: org.objectweb.joram/a3-rt

public boolean equals(Object obj) {
 if (obj == null) return false;
 if (obj instanceof A3CMLConfig) {
  A3CMLConfig config = (A3CMLConfig) obj;
  if (domains.equals(config.domains) &&
    servers.equals(config.servers) &&
    properties.equals(config.properties) &&
    clusters.equals(config.clusters))
   return true;
 }
 return false;
}

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

/**
 * Returns <code>true</code> if the properties contained by this URL and the given URL are equal.
 * The comparison of each property is case-sensitive.
 *
 * @param url the URL to test for properties equality
 * @return <code>true</code> if the properties contained by this URL and the given URL are equal
 */
public boolean propertiesEquals(FileURL url) {
  return (this.properties==null && url.properties==null)
    ||  (this.properties!=null && this.properties.equals(url.properties))
    ||  (url.properties!=null && url.properties.equals(this.properties));
}

代码示例来源:origin: org.objectweb.joram/a3-rt

public boolean equals(Object obj) {
 if (obj == null) return false;
 if (obj instanceof A3CMLCluster) {
  A3CMLCluster cluster = (A3CMLCluster) obj;
  if (sid == cluster.sid &&
    name.equals(cluster.name) &&
    servers.equals(cluster.servers) &&
    properties.equals(cluster.properties))
   return true;
 }
 return false;
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  if (!super.equals(o)) return false;
  ResolvableHashtable that = (ResolvableHashtable) o;
  return resolver.equals(that.resolver);
}

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

Properties props1 = new Properties();
props1.load(new FileReader("p1.properties"));    
Properties props2 = new Properties();
props2.load(new FileReader("p2.properties"));

System.out.println(props1.equals(props2)); // true

代码示例来源:origin: org.imixs.workflow/imixs-workflow-api

public boolean equals(Object o) {
  if (!(o instanceof ItemCollection))
    return false;
  return hash.equals(((ItemCollection) o).getAllItems());
}

代码示例来源:origin: toplink.essentials/toplink-essentials

/**
 * @see java.util.Hashtable#equals(java.lang.Object)
 */
public synchronized boolean equals(Object o) {
  return this.getDelegate().equals(o);
}

代码示例来源:origin: net.sf.ingenias/editor

public boolean equals(Object object){
  if (object instanceof DiagramFilter){
    DiagramFilter target=(DiagramFilter)object;
    return target.name.equals(name) &&
    currentAllowedEntities.equals(target.getCurrentAllowedEntities()) &&
    currentAllowedRelationships.equals(target.getCurrentAllowedRelationships());
  }
  return super.equals(object);
}

代码示例来源:origin: octo-online/reactive-audit

@Test(expected = ReactiveAuditException.class)
public void equals()
{
  ReactiveAudit.off.commit();
  Hashtable hash=new Hashtable();
  TestTools.strict.commit();
  hash.equals(null);
}
@Test(expected = ReactiveAuditException.class)

相关文章