/** Test method for {@link com.twitterapime.model.DefaultEntity#setData(java.util.Hashtable)}. */
 public void testSetData() {
   DefaultEntity d = new DefaultEntity();
   d.setData(dataSample);
   assertTrue(dataSample.equals(d.data));
   d.setData((Hashtable) null);
   assertNotNull(d.data);
   assertFalse(dataSample.equals(d.data));
   //
   DefaultEntity d1 = new DefaultEntity();
   d1.setData(d);
   assertTrue(d1.equals(d));
 }
Beispiel #2
0
  /** @see java.lang.Object#equals */
  public boolean equals(Object rhs) {
    if (rhs == null || rhs.getClass() != getClass()) {
      return false;
    }

    if (rhs == this) {
      return true;
    }

    Manifest rhsManifest = (Manifest) rhs;
    if (manifestVersion == null) {
      if (rhsManifest.manifestVersion != null) {
        return false;
      }
    } else if (!manifestVersion.equals(rhsManifest.manifestVersion)) {
      return false;
    }

    if (!mainSection.equals(rhsManifest.mainSection)) {
      return false;
    }

    if (rhsManifest.sections == null) {
      return false;
    }
    return sections.equals(rhsManifest.sections);
  }
Beispiel #3
0
    /** @see java.lang.Object#equals */
    public boolean equals(Object rhs) {
      if (rhs == null || rhs.getClass() != getClass()) {
        return false;
      }

      if (rhs == this) {
        return true;
      }

      Section rhsSection = (Section) rhs;

      if (rhsSection.attributes == null) {
        return false;
      }
      return attributes.equals(rhsSection.attributes);
    }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   PojoBar other = (PojoBar) obj;
   if (concurrentHashMap == null) {
     if (other.concurrentHashMap != null) return false;
   } else if (!concurrentHashMap.equals(other.concurrentHashMap)) return false;
   if (concurrentMap == null) {
     if (other.concurrentMap != null) return false;
   } else if (!concurrentMap.equals(other.concurrentMap)) return false;
   if (concurrentNavigableMap == null) {
     if (other.concurrentNavigableMap != null) return false;
   } else if (!concurrentNavigableMap.equals(other.concurrentNavigableMap)) return false;
   if (concurrentSkipListMap == null) {
     if (other.concurrentSkipListMap != null) return false;
   } else if (!concurrentSkipListMap.equals(other.concurrentSkipListMap)) return false;
   if (hashMap == null) {
     if (other.hashMap != null) return false;
   } else if (!hashMap.equals(other.hashMap)) return false;
   if (hashtable == null) {
     if (other.hashtable != null) return false;
   } else if (!hashtable.equals(other.hashtable)) return false;
   if (identityHashMap == null) {
     if (other.identityHashMap != null) return false;
   } else if (!identityHashMap.equals(other.identityHashMap)) return false;
   if (linkedHashMap == null) {
     if (other.linkedHashMap != null) return false;
   } else if (!linkedHashMap.equals(other.linkedHashMap)) return false;
   if (map == null) {
     if (other.map != null) return false;
   } else if (!map.equals(other.map)) return false;
   if (navigableMap == null) {
     if (other.navigableMap != null) return false;
   } else if (!navigableMap.equals(other.navigableMap)) return false;
   if (sortedMap == null) {
     if (other.sortedMap != null) return false;
   } else if (!sortedMap.equals(other.sortedMap)) return false;
   if (treeMap == null) {
     if (other.treeMap != null) return false;
   } else if (!treeMap.equals(other.treeMap)) return false;
   if (weakHashMap == null) {
     if (other.weakHashMap != null) return false;
   } else if (!weakHashMap.equals(other.weakHashMap)) return false;
   return true;
 }