@Override
 public int hashCode() {
   int result = wordIndex != null ? wordIndex.hashCode() : 0;
   result = 31 * result + (wordFrequencies != null ? wordFrequencies.hashCode() : 0);
   result = 31 * result + (docFrequencies != null ? docFrequencies.hashCode() : 0);
   result = 31 * result + (vocabs != null ? vocabs.hashCode() : 0);
   result = 31 * result + (tokens != null ? tokens.hashCode() : 0);
   result = 31 * result + (totalWordOccurrences != null ? totalWordOccurrences.hashCode() : 0);
   result = 31 * result + numDocs;
   return result;
 }
 @Override
 public int hashCode() {
   int result = pluginJar.hashCode();
   result = 31 * result + (pluginProviderDefs != null ? pluginProviderDefs.hashCode() : 0);
   result = 31 * result + (mainAttributes != null ? mainAttributes.hashCode() : 0);
   result = 31 * result + (classCache != null ? classCache.hashCode() : 0);
   return result;
 }
Example #3
0
 @Override
 public int hashCode() {
   int result = url.hashCode();
   result = 31 * result + (suffix != null ? suffix.hashCode() : 0);
   result = 31 * result + params.hashCode();
   result = 31 * result + (saveInCache ? 1 : 0);
   result = 31 * result + (archiveResult ? 1 : 0);
   result = 31 * result + (withParams ? 1 : 0);
   result = 31 * result + (encoding != null ? encoding.hashCode() : 0);
   result = 31 * result + (content != null ? content.hashCode() : 0);
   result = 31 * result + headers.hashCode();
   result = 31 * result + method.hashCode();
   return result;
 }
Example #4
0
  static void twoMapTest2(Map s, Object[] key, Object[] absent) {
    int size = key.length;

    Map s2 = newMap();
    putAllTest("Add    Absent          ", size, s, s2);
    putAllTest("Modify Present         ", size, s, s2);

    Object lastkey = kitTest(s2, size);
    Object hold = s2.get(lastkey);
    int sum = 0;

    timer.start("Traverse entry         ", size * 12); // 12 until finish

    int sh1 = s.hashCode() - s2.hashCode();
    reallyAssert(sh1 == 0);

    boolean eq1 = s2.equals(s);
    boolean eq2 = s.equals(s2);
    reallyAssert(eq1 && eq2);

    Set es2 = s2.entrySet();
    for (Iterator it = s.entrySet().iterator(); it.hasNext(); ) {
      Object entry = it.next();
      if (es2.contains(entry)) ++sum;
    }
    reallyAssert(sum == size);

    s2.put(lastkey, MISSING);

    int sh2 = s.hashCode() - s2.hashCode();
    reallyAssert(sh2 != 0);

    eq1 = s2.equals(s);
    eq2 = s.equals(s2);
    reallyAssert(!eq1 && !eq2);

    sum = 0;
    for (Iterator it = s.entrySet().iterator(); it.hasNext(); ) {
      Map.Entry e = (Map.Entry) it.next();
      e.setValue(absent[sum++]);
    }
    reallyAssert(sum == size);
    for (Iterator it = s2.entrySet().iterator(); it.hasNext(); ) {
      Map.Entry e = (Map.Entry) it.next();
      e.setValue(s.get(e.getKey()));
    }

    timer.finish();

    int rmiss = 0;
    timer.start("Remove Present         ", size * 2);
    Iterator s2i = s2.entrySet().iterator();
    Set es = s.entrySet();
    while (s2i.hasNext()) {
      if (!es.remove(s2i.next())) ++rmiss;
    }
    timer.finish();
    reallyAssert(rmiss == 0);

    clrTest(size, s2);
    reallyAssert(s2.isEmpty() && s.isEmpty());
  }
Example #5
0
 @Override
 public int hashCode() {
   int result = objects.hashCode();
   result = 31 * result + indexes.hashCode();
   return result;
 }
 public String getId() {
   return Integer.toString(sessionAttributesMap.hashCode());
 }
Example #7
0
 /*@Pure*/ public int hashCode() {
   return map.hashCode();
 }