lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [49/50] [abbrv] lucenenet git commit: Lucene.Net.Spatial: Renamed anonymous helper classes to fit class name conventions
Date Tue, 31 Jan 2017 17:56:22 GMT
Lucene.Net.Spatial: Renamed anonymous helper classes to fit class name conventions


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/be668b63
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/be668b63
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/be668b63

Branch: refs/heads/api-work
Commit: be668b6356cea21460539c991c7ebaba4e47fac1
Parents: dbf661c
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 1 00:22:12 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 1 00:22:12 2017 +0700

----------------------------------------------------------------------
 .../Prefix/ContainsPrefixTreeFilter.cs          | 54 +++++++++++---------
 .../Prefix/IntersectsPrefixTreeFilter.cs        |  8 +--
 .../Prefix/WithinPrefixTreeFilter.cs            |  8 +--
 3 files changed, 37 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be668b63/src/Lucene.Net.Spatial/Prefix/ContainsPrefixTreeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/ContainsPrefixTreeFilter.cs b/src/Lucene.Net.Spatial/Prefix/ContainsPrefixTreeFilter.cs
index 2a42f28..bac5e28 100644
--- a/src/Lucene.Net.Spatial/Prefix/ContainsPrefixTreeFilter.cs
+++ b/src/Lucene.Net.Spatial/Prefix/ContainsPrefixTreeFilter.cs
@@ -290,12 +290,38 @@ namespace Lucene.Net.Spatial.Prefix
                 }
             }
 
-            private sealed class _DocIdSetIterator_225 : DocIdSetIterator
+            public override DocIdSetIterator GetIterator()
+            {
+                if (Count == 0)
+                {
+                    return null;
+                }
+                //copy the unsorted values to a new array then sort them
+                int d = 0;
+                int[] docs = new int[intSet.Count];
+                foreach (int v in intSet.Keys)
+                {
+                    if (v == intSet.EmptyVal)
+                    {
+                        continue;
+                    }
+                    docs[d++] = v;
+                }
+                Debug.Assert(d == intSet.Count);
+                int size = d;
+                //sort them
+                Array.Sort(docs, 0, size);
+                return new DocIdSetIteratorAnonymousHelper(size, docs);
+            }
+
+            #region Nested Type: DocIdSetIteratorAnonymousHelper
+
+            private sealed class DocIdSetIteratorAnonymousHelper : DocIdSetIterator
             {
                 private readonly int size;
                 private readonly int[] docs;
 
-                public _DocIdSetIterator_225(int size, int[] docs)
+                public DocIdSetIteratorAnonymousHelper(int size, int[] docs)
                 {
                     this.size = size;
                     this.docs = docs;
@@ -340,29 +366,7 @@ namespace Lucene.Net.Spatial.Prefix
                 }
             }
 
-            public override DocIdSetIterator GetIterator()
-            {
-                if (Count == 0)
-                {
-                    return null;
-                }
-                //copy the unsorted values to a new array then sort them
-                int d = 0;
-                int[] docs = new int[intSet.Count];
-                foreach (int v in intSet.Keys)
-                {
-                    if (v == intSet.EmptyVal)
-                    {
-                        continue;
-                    }
-                    docs[d++] = v;
-                }
-                Debug.Assert(d == intSet.Count);
-                int size = d;
-                //sort them
-                Array.Sort(docs, 0, size);
-                return new _DocIdSetIterator_225(size, docs);
-            }
+            #endregion
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be668b63/src/Lucene.Net.Spatial/Prefix/IntersectsPrefixTreeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/IntersectsPrefixTreeFilter.cs b/src/Lucene.Net.Spatial/Prefix/IntersectsPrefixTreeFilter.cs
index a32e3ef..7d54c81 100644
--- a/src/Lucene.Net.Spatial/Prefix/IntersectsPrefixTreeFilter.cs
+++ b/src/Lucene.Net.Spatial/Prefix/IntersectsPrefixTreeFilter.cs
@@ -60,16 +60,16 @@ namespace Lucene.Net.Spatial.Prefix
         /// <exception cref="System.IO.IOException"></exception>
         public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
         {
-            return new _VisitorTemplate_55(this, context, acceptDocs, hasIndexedLeaves).GetDocIdSet();
+            return new VisitorTemplateAnonymousHelper(this, context, acceptDocs, hasIndexedLeaves).GetDocIdSet();
         }
 
-        #region Nested type: _VisitorTemplate_55
+        #region Nested type: VisitorTemplateAnonymousHelper
 
-        private sealed class _VisitorTemplate_55 : VisitorTemplate
+        private sealed class VisitorTemplateAnonymousHelper : VisitorTemplate
         {
             private FixedBitSet results;
 
-            public _VisitorTemplate_55(IntersectsPrefixTreeFilter outerInstance, AtomicReaderContext
context, IBits acceptDocs, bool hasIndexedLeaves)
+            public VisitorTemplateAnonymousHelper(IntersectsPrefixTreeFilter outerInstance,
AtomicReaderContext context, IBits acceptDocs, bool hasIndexedLeaves)
                 : base(outerInstance, context, acceptDocs, hasIndexedLeaves)
             {
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be668b63/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs b/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
index 2c760ed..8f81aa2 100644
--- a/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
+++ b/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
@@ -139,18 +139,18 @@ namespace Lucene.Net.Spatial.Prefix
         /// <exception cref="System.IO.IOException"></exception>
         public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
         {
-            return new _VisitorTemplate_121(this, context, acceptDocs, true).GetDocIdSet();
+            return new VisitorTemplateAnonymousHelper(this, context, acceptDocs, true).GetDocIdSet();
         }
 
-        #region Nested type: _VisitorTemplate_121
+        #region Nested type: VisitorTemplateAnonymousHelper
 
-        private sealed class _VisitorTemplate_121 : VisitorTemplate
+        private sealed class VisitorTemplateAnonymousHelper : VisitorTemplate
         {
             private FixedBitSet inside;
             private FixedBitSet outside;
             private SpatialRelation visitRelation;
 
-            public _VisitorTemplate_121(WithinPrefixTreeFilter outerInstance, AtomicReaderContext
context, 
+            public VisitorTemplateAnonymousHelper(WithinPrefixTreeFilter outerInstance, AtomicReaderContext
context, 
                 IBits acceptDocs, bool hasIndexedLeaves)
                 : base(outerInstance, context, acceptDocs, hasIndexedLeaves)
             {


Mime
View raw message