@Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((concurrentHashMap == null) ? 0 : concurrentHashMap.hashCode());
   result = prime * result + ((concurrentMap == null) ? 0 : concurrentMap.hashCode());
   result =
       prime * result
           + ((concurrentNavigableMap == null) ? 0 : concurrentNavigableMap.hashCode());
   result =
       prime * result + ((concurrentSkipListMap == null) ? 0 : concurrentSkipListMap.hashCode());
   result = prime * result + ((hashMap == null) ? 0 : hashMap.hashCode());
   result = prime * result + ((hashtable == null) ? 0 : hashtable.hashCode());
   result = prime * result + ((identityHashMap == null) ? 0 : identityHashMap.hashCode());
   result = prime * result + ((linkedHashMap == null) ? 0 : linkedHashMap.hashCode());
   result = prime * result + ((map == null) ? 0 : map.hashCode());
   result = prime * result + ((navigableMap == null) ? 0 : navigableMap.hashCode());
   result = prime * result + ((sortedMap == null) ? 0 : sortedMap.hashCode());
   result = prime * result + ((treeMap == null) ? 0 : treeMap.hashCode());
   result = prime * result + ((weakHashMap == null) ? 0 : weakHashMap.hashCode());
   return result;
 }
示例#2
0
    /** @see java.lang.Object#hashCode */
    public int hashCode() {
      int hashCode = 0;

      if (name != null) {
        hashCode += name.hashCode();
      }

      hashCode += attributes.hashCode();
      return hashCode;
    }
示例#3
0
  /** @see java.lang.Object#hashCode */
  public int hashCode() {
    int hashCode = 0;

    if (manifestVersion != null) {
      hashCode += manifestVersion.hashCode();
    }
    hashCode += mainSection.hashCode();
    hashCode += sections.hashCode();

    return hashCode;
  }
示例#4
0
 public static String toString(Hashtable<?, ?> hashtable) {
   String resultString = Hashtable.class.getName() + "@";
   HashtableUtil htUtil = new HashtableUtil(hashtable);
   if (htUtil != null && hashtable != null) {
     resultString += hashtable.hashCode();
     resultString += "{";
     while (htUtil.hasNextKey()) {
       Object key = htUtil.nextKey();
       resultString += "{" + key.toString() + "," + hashtable.get(key).toString() + "}";
     }
     resultString += "}";
   } else {
     resultString += "null";
   }
   htUtil = null;
   return resultString;
 }