Lucene.Net.Core.Search.Spans.SpanOrQuery: Replaced ValueList<T> with EquatableList<T>
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/88012457 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/88012457 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/88012457 Branch: refs/heads/api-work Commit: 88012457e0a38500fa0fd84d7d33e133401a9f8a Parents: 4a4f402 Author: Shad Storhaug <[email protected]> Authored: Wed Mar 29 21:07:15 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Mar 30 09:12:30 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/88012457/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs index e2c25c5..bafc9ad 100644 --- a/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs +++ b/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs @@ -1,6 +1,7 @@ using Lucene.Net.Support; using System.Collections.Generic; using System; +using System.Linq; using System.Text; namespace Lucene.Net.Search.Spans @@ -33,9 +34,7 @@ namespace Lucene.Net.Search.Spans /// Matches the union of its clauses. </summary> public class SpanOrQuery : SpanQuery { - // LUCENENET NOTE: The hash code needs to be made from the hash codes of all elements. - // So, we force all subclasses to use ValueList<SpanQuery> instead of IList<SpanQuery> to ensure that logic is in place. - private readonly ValueList<SpanQuery> clauses; + private readonly EquatableList<SpanQuery> clauses; private string field; /// <summary> @@ -43,7 +42,7 @@ namespace Lucene.Net.Search.Spans public SpanOrQuery(params SpanQuery[] clauses) { // copy clauses array into an ArrayList - this.clauses = new ValueList<SpanQuery>(clauses.Length); + this.clauses = new EquatableList<SpanQuery>(clauses.Length); for (int i = 0; i < clauses.Length; i++) { AddClause(clauses[i]);
