Lucene.Net.Core.Search.FuzzyTermsEnum refactor: Automata() > Automata (property)
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/a966d9af Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/a966d9af Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/a966d9af Branch: refs/heads/api-work Commit: a966d9af739b3872a70b6f49f8fcd7c234f175fb Parents: 291e3ae Author: Shad Storhaug <[email protected]> Authored: Thu Mar 30 19:30:23 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Mar 30 19:30:23 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a966d9af/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs b/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs index 7159894..530f454 100644 --- a/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs +++ b/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs @@ -186,7 +186,7 @@ namespace Lucene.Net.Search /// initialize levenshtein DFAs up to maxDistance, if possible </summary> private IList<CompiledAutomaton> InitAutomata(int maxDistance) { - IList<CompiledAutomaton> runAutomata = dfaAtt.Automata(); + IList<CompiledAutomaton> runAutomata = dfaAtt.Automata; //System.out.println("cached automata size: " + runAutomata.size()); if (runAutomata.Count <= maxDistance && maxDistance <= LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE) { @@ -475,7 +475,7 @@ namespace Lucene.Net.Search /// </summary> public interface ILevenshteinAutomataAttribute : IAttribute { - IList<CompiledAutomaton> Automata(); + IList<CompiledAutomaton> Automata { get; } } /// <summary> @@ -487,9 +487,9 @@ namespace Lucene.Net.Search // LUCENENET NOTE: Must use EquatableList for Equals and GetHashCode() private readonly IList<CompiledAutomaton> automata = new EquatableList<CompiledAutomaton>(); - public IList<CompiledAutomaton> Automata() // LUCENENT TODO: API make property + public IList<CompiledAutomaton> Automata { - return automata; + get { return automata; } } public override void Clear() @@ -517,7 +517,7 @@ namespace Lucene.Net.Search public override void CopyTo(IAttribute target) { - IList<CompiledAutomaton> targetAutomata = ((LevenshteinAutomataAttribute)target).Automata(); + IList<CompiledAutomaton> targetAutomata = ((LevenshteinAutomataAttribute)target).Automata; targetAutomata.Clear(); targetAutomata.AddRange(automata); }
