@Test public void testEquals() { StringList entry1 = new StringList("1a", "1b"); StringList entry2 = new StringList("2a", "2b"); Dictionary dictA = getCaseInsensitive(); dictA.put(entry1); dictA.put(entry2); Dictionary dictB = getCaseInsensitive(); dictB.put(entry1); dictB.put(entry2); Dictionary dictC = getCaseSensitive(); dictC.put(entry1); dictC.put(entry2); Assert.assertTrue(dictA.equals(dictB)); Assert.assertTrue(dictC.equals(dictA)); Assert.assertTrue(dictB.equals(dictC)); }
@Override public boolean equals(Object obj) { boolean result; if (obj == this) { result = true; } else if (obj instanceof Dictionary) { Dictionary dictionary = (Dictionary) obj; result = entrySet.equals(dictionary.entrySet); } else { result = false; } return result; }
Dictionary implements Iterable<StringList>, SerializableArtifact { @Override public boolean equals(Object obj) { boolean result; if (obj == this) { result = true; } else if (obj instanceof Dictionary) { Dictionary dictionary = (Dictionary) obj; result = entrySet.equals(dictionary.entrySet); } else { result = false; } return result; } }
Dictionary implements Iterable<StringList>, SerializableArtifact { @Override public boolean equals(Object obj) { boolean result; if (obj == this) { result = true; } else if (obj instanceof Dictionary) { Dictionary dictionary = (Dictionary) obj; result = entrySet.equals(dictionary.entrySet); } else { result = false; } return result; } Dictionary();  Dictionary(boolean caseSensitive);  Dictionary(InputStream in); }
Dictionary implements Iterable<StringList>, SerializableArtifact { @Override public boolean equals(Object obj) { boolean result; if (obj == this) { result = true; } else if (obj instanceof Dictionary) { Dictionary dictionary = (Dictionary) obj; result = entrySet.equals(dictionary.entrySet); } else { result = false; } return result; } Dictionary();  Dictionary(boolean caseSensitive);  Dictionary(InputStream in); void put(StringList tokens); int getMinTokenCount(); int getMaxTokenCount(); boolean contains(StringList tokens); void remove(StringList tokens); Iterator<StringList> iterator(); int size(); void serialize(OutputStream out); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static Dictionary parseOneEntryPerLine(Reader in); Set<String> asStringSet(); @Override Class<?> getArtifactSerializerClass(); }
Dictionary implements Iterable<StringList>, SerializableArtifact { @Override public boolean equals(Object obj) { boolean result; if (obj == this) { result = true; } else if (obj instanceof Dictionary) { Dictionary dictionary = (Dictionary) obj; result = entrySet.equals(dictionary.entrySet); } else { result = false; } return result; } Dictionary();  Dictionary(boolean caseSensitive);  Dictionary(InputStream in); void put(StringList tokens); int getMinTokenCount(); int getMaxTokenCount(); boolean contains(StringList tokens); void remove(StringList tokens); Iterator<StringList> iterator(); int size(); void serialize(OutputStream out); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static Dictionary parseOneEntryPerLine(Reader in); Set<String> asStringSet(); @Override Class<?> getArtifactSerializerClass();  }