mirror of https://github.com/apache/lucene.git
SOLR-458 -- Add equals and hashCode methods to NamedList
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@779486 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
df9b290629
commit
a6cd8495bb
|
@ -487,6 +487,8 @@ Other Changes
|
|||
35. SOLR-786: Refactor DisMaxQParser to allow overriding certain features of DisMaxQParser
|
||||
(Wojciech Biela via shalin)
|
||||
|
||||
36. SOLR-458: Add equals and hashCode methods to NamedList (Stefan Rinner, shalin)
|
||||
|
||||
Build
|
||||
----------------------
|
||||
1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)
|
||||
|
|
|
@ -376,4 +376,16 @@ public class NamedList<T> implements Cloneable, Serializable, Iterable<Map.Entry
|
|||
if(idx != -1) return remove(idx);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return nvPairs.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof NamedList)) return false;
|
||||
NamedList nl = (NamedList) obj;
|
||||
return this.nvPairs.equals(nl.nvPairs);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue