You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/10/02 10:16:39 UTC

[08/49] lucenenet git commit: .NETify FST: Changed Final, Last, Compiled, and Reversed() to IsFinal, IsLast, IsCompiled, and IsReversed to make it clear that they are boolean states.

.NETify FST: Changed Final, Last, Compiled, and Reversed() to IsFinal, IsLast, IsCompiled, and IsReversed to make it clear that they are boolean states.


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

Branch: refs/heads/master
Commit: 510413ce4b99d15a79a70d876e5f89ca657dc193
Parents: 5effb00
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Sep 7 16:18:17 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Sep 8 06:40:50 2016 +0700

----------------------------------------------------------------------
 .../Analysis/CharFilter/MappingCharFilter.cs    |  4 +--
 .../Analysis/CharFilter/NormalizeCharMap.cs     |  2 +-
 .../Analysis/Hunspell/Dictionary.cs             |  2 +-
 .../Miscellaneous/StemmerOverrideFilter.cs      |  2 +-
 .../Analysis/Synonym/SynonymFilter.cs           |  2 +-
 .../Memory/FSTOrdTermsReader.cs                 |  8 +++---
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs  | 10 +++----
 .../Codecs/BlockTreeTermsReader.cs              | 28 +++++++++---------
 src/Lucene.Net.Core/Util/Fst/Builder.cs         |  8 +++---
 src/Lucene.Net.Core/Util/Fst/BytesStore.cs      |  8 +++---
 src/Lucene.Net.Core/Util/Fst/FST.cs             | 30 ++++++++++----------
 src/Lucene.Net.Core/Util/Fst/FSTEnum.cs         | 18 ++++++------
 .../Util/Fst/ForwardBytesReader.cs              |  4 +--
 src/Lucene.Net.Core/Util/Fst/NodeHash.cs        |  8 +++---
 .../Util/Fst/ReverseBytesReader.cs              |  4 +--
 src/Lucene.Net.Core/Util/Fst/Util.cs            | 24 ++++++++--------
 .../Util/fst/FSTTester.cs                       |  2 +-
 .../core/Util/Fst/TestBytesStore.cs             |  4 +--
 src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs  |  6 ++--
 19 files changed, 87 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
index f14a5e9..3fc3309 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
@@ -136,7 +136,7 @@ namespace Lucene.Net.Analysis.CharFilters
                         if (!FST.TargetHasArcs(arc))
                         {
                             // Fast pass for single character match:
-                            Debug.Assert(arc.Final);
+                            Debug.Assert(arc.IsFinal);
                             lastMatchLen = 1;
                             lastMatch = arc.Output;
                         }
@@ -148,7 +148,7 @@ namespace Lucene.Net.Analysis.CharFilters
                             {
                                 lookahead++;
 
-                                if (arc.Final)
+                                if (arc.IsFinal)
                                 {
                                     // Match! (to node is final)
                                     lastMatchLen = lookahead;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
index 6d0ed19..9571a31 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
@@ -56,7 +56,7 @@ namespace Lucene.Net.Analysis.CharFilters
                         {
                             Debug.Assert(scratchArc.Label != FST<CharsRef>.END_LABEL); // LUCENENET TODO END_LABEL shouldn't be under generic?
                             cachedRootArcs[Convert.ToChar((char)scratchArc.Label)] = (new FST.Arc<CharsRef>()).CopyFrom(scratchArc);
-                            if (scratchArc.Last)
+                            if (scratchArc.IsLast)
                             {
                                 break;
                             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
index e9fc124..e27b433 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
@@ -1190,7 +1190,7 @@ namespace Lucene.Net.Analysis.Hunspell
                     {
                         output = fst.Outputs.Add(output, arc.Output);
                     }
-                    if (arc.Final)
+                    if (arc.IsFinal)
                     {
                         longestOutput = fst.Outputs.Add(output, arc.NextFinalOutput);
                         longestMatch = j;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
index 0db4da9..d087551 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
@@ -144,7 +144,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
                     pendingOutput = fst.Outputs.Add(pendingOutput, scratchArc.Output);
                     bufUpto += Character.CharCount(codePoint);
                 }
-                if (scratchArc.Final)
+                if (scratchArc.IsFinal)
                 {
                     matchOutput = fst.Outputs.Add(pendingOutput, scratchArc.NextFinalOutput);
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
index d2fb3c8..1617259 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
@@ -437,7 +437,7 @@ namespace Lucene.Net.Analysis.Synonym
 
                 // OK, entire token matched; now see if this is a final
                 // state:
-                if (scratchArc.Final)
+                if (scratchArc.IsFinal)
                 {
                     matchOutput = fst.Outputs.Add(pendingOutput, scratchArc.NextFinalOutput);
                     matchInputLength = tokenCount;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
index 5e082dc..7f3f35b 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
@@ -824,7 +824,7 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         return null;
                     }
-                    while (!frame.arc.Last)
+                    while (!frame.arc.IsLast)
                     {
                         frame.arc = fst.ReadNextRealArc(frame.arc, fstReader);
                         frame.state = fsa.Step(top.state, frame.arc.Label);
@@ -864,7 +864,7 @@ namespace Lucene.Net.Codecs.Memory
 
                 private bool IsAccept(Frame frame) // reach a term both fst&fsa accepts
                 {
-                    return fsa.IsAccept(frame.state) && frame.arc.Final;
+                    return fsa.IsAccept(frame.state) && frame.arc.IsFinal;
                 }
 
                 private bool IsValid(Frame frame) // reach a prefix both fst&fsa won't reject
@@ -879,7 +879,7 @@ namespace Lucene.Net.Codecs.Memory
 
                 private bool CanRewind(Frame frame) // can jump to sibling
                 {
-                    return !frame.arc.Last;
+                    return !frame.arc.IsLast;
                 }
 
                 private void PushFrame(Frame frame)
@@ -974,7 +974,7 @@ namespace Lucene.Net.Codecs.Memory
                     while (true)
                     {
                         queue.Add((new FST.Arc<T>()).CopyFrom(arc));
-                        if (arc.Last)
+                        if (arc.IsLast)
                         {
                             break;
                         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
index 011eed6..79e0365 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
@@ -582,7 +582,7 @@ namespace Lucene.Net.Codecs.Memory
                         next.Output = fstOutputs.Add(next.Output, last.Output);
                         last = next;
                     }
-                    if (last.Final)
+                    if (last.IsFinal)
                     {
                         meta = fstOutputs.Add(last.Output, last.NextFinalOutput);
                     }
@@ -738,7 +738,7 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         return null;
                     }
-                    while (!frame.fstArc.Last)
+                    while (!frame.fstArc.IsLast)
                     {
                         frame.fstArc = fst.ReadNextRealArc(frame.fstArc, fstReader);
                         frame.fsaState = fsa.Step(top.fsaState, frame.fstArc.Label);
@@ -778,7 +778,7 @@ namespace Lucene.Net.Codecs.Memory
 
                 internal bool IsAccept(Frame frame) // reach a term both fst&fsa accepts
                 {
-                    return fsa.IsAccept(frame.fsaState) && frame.fstArc.Final;
+                    return fsa.IsAccept(frame.fsaState) && frame.fstArc.IsFinal;
                 }
                 internal bool IsValid(Frame frame) // reach a prefix both fst&fsa won't reject
                 {
@@ -790,7 +790,7 @@ namespace Lucene.Net.Codecs.Memory
                 }
                 internal bool CanRewind(Frame frame) // can jump to sibling
                 {
-                    return !frame.fstArc.Last;
+                    return !frame.fstArc.IsLast;
                 }
 
                 internal void PushFrame(Frame frame)
@@ -882,7 +882,7 @@ namespace Lucene.Net.Codecs.Memory
                     while (true)
                     {
                         queue.Add((new FST.Arc<T>()).CopyFrom(arc));
-                        if (arc.Last)
+                        if (arc.IsLast)
                         {
                             break;
                         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
index 154d23c..8ae85d3 100644
--- a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
@@ -1073,7 +1073,7 @@ namespace Lucene.Net.Codecs
 
                     FST<BytesRef>.Arc<BytesRef> arc = outerInstance.Index.GetFirstArc(Arcs[0]);
                     // Empty string prefix must have an output in the index!
-                    Debug.Assert(arc.Final);
+                    Debug.Assert(arc.IsFinal);
 
                     // Special pushFrame since it's the first one:
                     Frame f = Stack[0];
@@ -1169,7 +1169,7 @@ namespace Lucene.Net.Codecs
 
                     f.Arc = arc;
                     f.OutputPrefix = output;
-                    Debug.Assert(arc.Final);
+                    Debug.Assert(arc.IsFinal);
                     f.Load(OuterInstance.OuterInstance.FstOutputs.Add(output, arc.NextFinalOutput));
                     return f;
                 }
@@ -1578,7 +1578,7 @@ namespace Lucene.Net.Codecs
                     {
                         arc = outerInstance.Index.GetFirstArc(Arcs[0]);
                         // Empty string prefix must have an output in the index!
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                     }
                     else
                     {
@@ -1626,7 +1626,7 @@ namespace Lucene.Net.Codecs
                     {
                         arc = OuterInstance.Index.GetFirstArc(Arcs[0]);
                         // Empty string prefix must have an output in the index!
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                     }
                     else
                     {
@@ -1701,7 +1701,7 @@ namespace Lucene.Net.Codecs
                     {
                         arc = OuterInstance.Index.GetFirstArc(Arcs[0]);
                         // Empty string prefix must have an output in the index!
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                     }
                     else
                     {
@@ -1861,7 +1861,7 @@ namespace Lucene.Net.Codecs
                         // }
 
                         arc = Arcs[0];
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                         output = arc.Output;
                         targetUpto = 0;
 
@@ -1895,7 +1895,7 @@ namespace Lucene.Net.Codecs
                             {
                                 output = OuterInstance.OuterInstance.FstOutputs.Add(output, arc.Output);
                             }
-                            if (arc.Final)
+                            if (arc.IsFinal)
                             {
                                 lastFrame = Stack[1 + lastFrame.Ord];
                             }
@@ -1982,7 +1982,7 @@ namespace Lucene.Net.Codecs
                         arc = OuterInstance.Index.GetFirstArc(Arcs[0]);
 
                         // Empty string prefix must have an output (block) in the index!
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                         Debug.Assert(arc.Output != null);
 
                         // if (DEBUG) {
@@ -2066,7 +2066,7 @@ namespace Lucene.Net.Codecs
                             // }
                             targetUpto++;
 
-                            if (arc.Final)
+                            if (arc.IsFinal)
                             {
                                 //if (DEBUG) System.out.println("    arc is final!");
                                 CurrentFrame = PushFrame(arc, OuterInstance.OuterInstance.FstOutputs.Add(output, arc.NextFinalOutput), targetUpto);
@@ -2150,7 +2150,7 @@ namespace Lucene.Net.Codecs
                         //}
 
                         arc = Arcs[0];
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                         output = arc.Output;
                         targetUpto = 0;
 
@@ -2186,7 +2186,7 @@ namespace Lucene.Net.Codecs
                             {
                                 output = OuterInstance.OuterInstance.FstOutputs.Add(output, arc.Output);
                             }
-                            if (arc.Final)
+                            if (arc.IsFinal)
                             {
                                 lastFrame = Stack[1 + lastFrame.Ord];
                             }
@@ -2267,7 +2267,7 @@ namespace Lucene.Net.Codecs
                         arc = OuterInstance.Index.GetFirstArc(Arcs[0]);
 
                         // Empty string prefix must have an output (block) in the index!
-                        Debug.Assert(arc.Final);
+                        Debug.Assert(arc.IsFinal);
                         Debug.Assert(arc.Output != null);
 
                         //if (DEBUG) {
@@ -2353,7 +2353,7 @@ namespace Lucene.Net.Codecs
                             //}
                             targetUpto++;
 
-                            if (arc.Final)
+                            if (arc.IsFinal)
                             {
                                 //if (DEBUG) System.out.println("    arc is final!");
                                 CurrentFrame = PushFrame(arc, OuterInstance.OuterInstance.FstOutputs.Add(output, arc.NextFinalOutput), targetUpto);
@@ -2474,7 +2474,7 @@ namespace Lucene.Net.Codecs
                         {
                             arc = OuterInstance.Index.GetFirstArc(Arcs[0]);
                             // Empty string prefix must have an output in the index!
-                            Debug.Assert(arc.Final);
+                            Debug.Assert(arc.IsFinal);
                         }
                         else
                         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/Builder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/Builder.cs b/src/Lucene.Net.Core/Util/Fst/Builder.cs
index bfcf269..a566625 100644
--- a/src/Lucene.Net.Core/Util/Fst/Builder.cs
+++ b/src/Lucene.Net.Core/Util/Fst/Builder.cs
@@ -554,7 +554,7 @@ namespace Lucene.Net.Util.Fst
             for (int arcIdx = 0; arcIdx < node.NumArcs; arcIdx++)
             {
                 Arc<T> arc = node.Arcs[arcIdx];
-                if (!arc.Target.Compiled)
+                if (!arc.Target.IsCompiled)
                 {
                     // not yet compiled
                     UnCompiledNode<T> n = (UnCompiledNode<T>)arc.Target;
@@ -585,7 +585,7 @@ namespace Lucene.Net.Util.Fst
 
         public interface Node
         {
-            bool Compiled { get; }
+            bool IsCompiled { get; }
         }
 
         public virtual long FstSizeInBytes()
@@ -597,7 +597,7 @@ namespace Lucene.Net.Util.Fst
         {
             public long Node;
 
-            public bool Compiled
+            public bool IsCompiled
             {
                 get
                 {
@@ -640,7 +640,7 @@ namespace Lucene.Net.Util.Fst
                 this.Depth = depth;
             }
 
-            public bool Compiled
+            public bool IsCompiled
             {
                 get
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/BytesStore.cs b/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
index 471cd68..b23da69 100644
--- a/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
+++ b/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
@@ -490,9 +490,9 @@ namespace Lucene.Net.Util.Fst
                 }
             }
 
-            public override bool Reversed()
+            public override bool IsReversed
             {
-                return false;
+                get { return false; }
             }
         }
 
@@ -572,9 +572,9 @@ namespace Lucene.Net.Util.Fst
                 }
             }
 
-            public override bool Reversed()
+            public override bool IsReversed
             {
-                return true;
+                get { return true; }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/FST.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/FST.cs b/src/Lucene.Net.Core/Util/Fst/FST.cs
index 0a21a54..d5f53c3 100644
--- a/src/Lucene.Net.Core/Util/Fst/FST.cs
+++ b/src/Lucene.Net.Core/Util/Fst/FST.cs
@@ -409,7 +409,7 @@ namespace Lucene.Net.Util.Fst
                     {
                         break;
                     }
-                    if (arc.Last)
+                    if (arc.IsLast)
                     {
                         break;
                     }
@@ -935,7 +935,7 @@ namespace Lucene.Net.Util.Fst
             if (!TargetHasArcs(follow))
             {
                 //System.out.println("  end node");
-                Debug.Assert(follow.Final);
+                Debug.Assert(follow.IsFinal);
                 arc.Label = END_LABEL;
                 arc.Target = FINAL_END_NODE;
                 arc.Output = follow.NextFinalOutput;
@@ -969,7 +969,7 @@ namespace Lucene.Net.Util.Fst
                     // non-array: linear scan
                     arc.BytesPerArc = 0;
                     //System.out.println("  scan");
-                    while (!arc.Last)
+                    while (!arc.IsLast)
                     {
                         // skip this arc:
                         ReadLabel(@in);
@@ -1002,7 +1002,7 @@ namespace Lucene.Net.Util.Fst
                     arc.NextArc = @in.Position;
                 }
                 ReadNextRealArc(arc, @in);
-                Debug.Assert(arc.Last);
+                Debug.Assert(arc.IsLast);
                 return arc;
             }
         }
@@ -1031,7 +1031,7 @@ namespace Lucene.Net.Util.Fst
         {
             //int pos = address;
             //System.out.println("    readFirstTarget follow.target=" + follow.Target + " isFinal=" + follow.isFinal());
-            if (follow.Final)
+            if (follow.IsFinal)
             {
                 // Insert "fake" final first arc:
                 arc.Label = END_LABEL;
@@ -1136,7 +1136,7 @@ namespace Lucene.Net.Util.Fst
         /// </summary>
         public int ReadNextArcLabel(Arc<T> arc, BytesReader @in)
         {
-            Debug.Assert(!arc.Last);
+            Debug.Assert(!arc.IsLast);
 
             if (arc.Label == END_LABEL)
             {
@@ -1317,7 +1317,7 @@ namespace Lucene.Net.Util.Fst
         {
             if (labelToMatch == END_LABEL)
             {
-                if (follow.Final)
+                if (follow.IsFinal)
                 {
                     if (follow.Target <= 0)
                     {
@@ -1429,7 +1429,7 @@ namespace Lucene.Net.Util.Fst
                 {
                     return null;
                 }
-                else if (arc.Last)
+                else if (arc.IsLast)
                 {
                     return null;
                 }
@@ -1554,7 +1554,7 @@ namespace Lucene.Net.Util.Fst
                 /// Returns true if this reader uses reversed bytes
                 ///  under-the-hood.
                 /// </summary>
-                public abstract bool Reversed();
+                public abstract bool IsReversed { get; }
 
                 /// <summary>
                 /// Skips bytes. </summary>
@@ -1874,7 +1874,7 @@ namespace Lucene.Net.Util.Fst
 
                             sbyte flags = 0;
 
-                            if (arc.Last)
+                            if (arc.IsLast)
                             {
                                 flags += (sbyte)BIT_LAST_ARC;
                             }
@@ -1891,7 +1891,7 @@ namespace Lucene.Net.Util.Fst
                                     nextCount++;
                                 }
                             }
-                            if (arc.Final)
+                            if (arc.IsFinal)
                             {
                                 flags += (sbyte)BIT_FINAL_ARC;
                                 if (!arc.NextFinalOutput.Equals(NO_OUTPUT))
@@ -2021,7 +2021,7 @@ namespace Lucene.Net.Util.Fst
                                 writer.SkipBytes((int)(arcStartPos + bytesPerArc - writer.Position));
                             }
 
-                            if (arc.Last)
+                            if (arc.IsLast)
                             {
                                 break;
                             }
@@ -2254,7 +2254,7 @@ namespace Lucene.Net.Util.Fst
             /// under-the-hood.
             /// </summary>
             /// <returns></returns>
-            public abstract bool Reversed();
+            public abstract bool IsReversed { get; }
 
             /// <summary>
             /// Skips bytes.
@@ -2333,12 +2333,12 @@ namespace Lucene.Net.Util.Fst
                 return FST<T>.Flag(Flags, flag);
             }
 
-            public bool Last
+            public bool IsLast
             {
                 get { return Flag(BIT_LAST_ARC); }
             }
 
-            public bool Final
+            public bool IsFinal
             {
                 get { return Flag(BIT_FINAL_ARC); }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/FSTEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/FSTEnum.cs b/src/Lucene.Net.Core/Util/Fst/FSTEnum.cs
index 93469ce..3e19974 100644
--- a/src/Lucene.Net.Core/Util/Fst/FSTEnum.cs
+++ b/src/Lucene.Net.Core/Util/Fst/FSTEnum.cs
@@ -114,7 +114,7 @@ namespace Lucene.Net.Util.Fst
             {
                 // pop
                 //System.out.println("  check pop curArc target=" + arcs[upto].target + " label=" + arcs[upto].label + " isLast?=" + arcs[upto].isLast());
-                while (Arcs[Upto].Last)
+                while (Arcs[Upto].IsLast)
                 {
                     Upto--;
                     if (Upto == 0)
@@ -218,7 +218,7 @@ namespace Lucene.Net.Util.Fst
                         // Dead end
                         arc.ArcIdx = arc.NumArcs - 2;
                         Fst.ReadNextRealArc(arc, @in);
-                        Debug.Assert(arc.Last);
+                        Debug.Assert(arc.IsLast);
                         // Dead end (target is after the last arc);
                         // rollback to last fork then push
                         Upto--;
@@ -230,7 +230,7 @@ namespace Lucene.Net.Util.Fst
                             }
                             FST<T>.Arc<T> prevArc = GetArc(Upto);
                             //System.out.println("  rollback upto=" + upto + " arc.label=" + prevArc.label + " isLast?=" + prevArc.isLast());
-                            if (!prevArc.Last)
+                            if (!prevArc.IsLast)
                             {
                                 Fst.ReadNextArc(prevArc, FstReader);
                                 PushFirst();
@@ -269,7 +269,7 @@ namespace Lucene.Net.Util.Fst
                         PushFirst();
                         return;
                     }
-                    else if (arc.Last)
+                    else if (arc.IsLast)
                     {
                         // Dead end (target is after the last arc);
                         // rollback to last fork then push
@@ -282,7 +282,7 @@ namespace Lucene.Net.Util.Fst
                             }
                             FST<T>.Arc<T> prevArc = GetArc(Upto);
                             //System.out.println("  rollback upto=" + upto + " arc.label=" + prevArc.label + " isLast?=" + prevArc.isLast());
-                            if (!prevArc.Last)
+                            if (!prevArc.IsLast)
                             {
                                 Fst.ReadNextArc(prevArc, FstReader);
                                 PushFirst();
@@ -401,7 +401,7 @@ namespace Lucene.Net.Util.Fst
                             {
                                 // Then, scan forwards to the arc just before
                                 // the targetLabel:
-                                while (!arc.Last && Fst.ReadNextArcLabel(arc, @in) < targetLabel)
+                                while (!arc.IsLast && Fst.ReadNextArcLabel(arc, @in) < targetLabel)
                                 {
                                     Fst.ReadNextArc(arc, FstReader);
                                 }
@@ -423,7 +423,7 @@ namespace Lucene.Net.Util.Fst
                         arc.ArcIdx = (low > high ? high : low) - 1;
                         //System.out.println(" hasFloor arcIdx=" + (arc.arcIdx+1));
                         Fst.ReadNextRealArc(arc, @in);
-                        Debug.Assert(arc.Last || Fst.ReadNextArcLabel(arc, @in) > targetLabel);
+                        Debug.Assert(arc.IsLast || Fst.ReadNextArcLabel(arc, @in) > targetLabel);
                         Debug.Assert(arc.Label < targetLabel, "arc.label=" + arc.Label + " vs targetLabel=" + targetLabel);
                         PushLast();
                         return;
@@ -459,7 +459,7 @@ namespace Lucene.Net.Util.Fst
                             {
                                 // Then, scan forwards to the arc just before
                                 // the targetLabel:
-                                while (!arc.Last && Fst.ReadNextArcLabel(arc, FstReader) < targetLabel)
+                                while (!arc.IsLast && Fst.ReadNextArcLabel(arc, FstReader) < targetLabel)
                                 {
                                     Fst.ReadNextArc(arc, FstReader);
                                 }
@@ -475,7 +475,7 @@ namespace Lucene.Net.Util.Fst
                             arc = GetArc(Upto);
                         }
                     }
-                    else if (!arc.Last)
+                    else if (!arc.IsLast)
                     {
                         //System.out.println("  check next label=" + fst.readNextArcLabel(arc) + " (" + (char) fst.readNextArcLabel(arc) + ")");
                         if (Fst.ReadNextArcLabel(arc, FstReader) > targetLabel)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/ForwardBytesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/ForwardBytesReader.cs b/src/Lucene.Net.Core/Util/Fst/ForwardBytesReader.cs
index b8e597b..039e386 100644
--- a/src/Lucene.Net.Core/Util/Fst/ForwardBytesReader.cs
+++ b/src/Lucene.Net.Core/Util/Fst/ForwardBytesReader.cs
@@ -62,9 +62,9 @@ namespace Lucene.Net.Util.Fst
             }
         }
 
-        public override bool Reversed()
+        public override bool IsReversed
         {
-            return false;
+            get { return false; }
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/NodeHash.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/NodeHash.cs b/src/Lucene.Net.Core/Util/Fst/NodeHash.cs
index ad8f2d3..ca92deb 100644
--- a/src/Lucene.Net.Core/Util/Fst/NodeHash.cs
+++ b/src/Lucene.Net.Core/Util/Fst/NodeHash.cs
@@ -51,12 +51,12 @@ namespace Lucene.Net.Util.Fst
             for (int arcUpto = 0; arcUpto < node.NumArcs; arcUpto++)
             {
                 Builder<T>.Arc<T> arc = node.Arcs[arcUpto];
-                if (arc.Label != ScratchArc.Label || !arc.Output.Equals(ScratchArc.Output) || ((Builder<T>.CompiledNode)arc.Target).Node != ScratchArc.Target || !arc.NextFinalOutput.Equals(ScratchArc.NextFinalOutput) || arc.IsFinal != ScratchArc.Final)
+                if (arc.Label != ScratchArc.Label || !arc.Output.Equals(ScratchArc.Output) || ((Builder<T>.CompiledNode)arc.Target).Node != ScratchArc.Target || !arc.NextFinalOutput.Equals(ScratchArc.NextFinalOutput) || arc.IsFinal != ScratchArc.IsFinal)
                 {
                     return false;
                 }
 
-                if (ScratchArc.Last)
+                if (ScratchArc.IsLast)
                 {
                     if (arcUpto == node.NumArcs - 1)
                     {
@@ -157,11 +157,11 @@ namespace Lucene.Net.Util.Fst
                     h = PRIME * h + ScratchArc.NextFinalOutput.GetHashCode();
                 }
 
-                if (ScratchArc.Final)
+                if (ScratchArc.IsFinal)
                 {
                     h += 17;
                 }
-                if (ScratchArc.Last)
+                if (ScratchArc.IsLast)
                 {
                     break;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/ReverseBytesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/ReverseBytesReader.cs b/src/Lucene.Net.Core/Util/Fst/ReverseBytesReader.cs
index 65e60f6..3f68547 100644
--- a/src/Lucene.Net.Core/Util/Fst/ReverseBytesReader.cs
+++ b/src/Lucene.Net.Core/Util/Fst/ReverseBytesReader.cs
@@ -59,9 +59,9 @@ namespace Lucene.Net.Util.Fst
             }
         }
 
-        public override bool Reversed()
+        public override bool IsReversed
         {
-            return true;
+            get { return true; }
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Core/Util/Fst/Util.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/Util.cs b/src/Lucene.Net.Core/Util/Fst/Util.cs
index 00d2507..749f209 100644
--- a/src/Lucene.Net.Core/Util/Fst/Util.cs
+++ b/src/Lucene.Net.Core/Util/Fst/Util.cs
@@ -62,7 +62,7 @@ namespace Lucene.Net.Util.Fst
                 output = fst.Outputs.Add(output, arc.Output);
             }
 
-            if (arc.Final)
+            if (arc.IsFinal)
             {
                 return fst.Outputs.Add(output, arc.NextFinalOutput);
             }
@@ -98,7 +98,7 @@ namespace Lucene.Net.Util.Fst
                 output = fst.Outputs.Add(output, arc.Output);
             }
 
-            if (arc.Final)
+            if (arc.IsFinal)
             {
                 return fst.Outputs.Add(output, arc.NextFinalOutput);
             }
@@ -150,7 +150,7 @@ namespace Lucene.Net.Util.Fst
             while (true)
             {
                 //System.out.println("loop: output=" + output + " upto=" + upto + " arc=" + arc);
-                if (arc.Final)
+                if (arc.IsFinal)
                 {
                     long finalOutput = output + arc.NextFinalOutput.Value;
                     //System.out.println("  isFinal finalOutput=" + finalOutput);
@@ -270,7 +270,7 @@ namespace Lucene.Net.Util.Fst
                                     break;
                                 }
                             }
-                            else if (arc.Last)
+                            else if (arc.IsLast)
                             {
                                 // Recurse on this arc:
                                 output = minArcOutput;
@@ -465,7 +465,7 @@ namespace Lucene.Net.Util.Fst
                     {
                         AddIfCompetitive(path);
                     }
-                    if (path.Arc.Last)
+                    if (path.Arc.IsLast)
                     {
                         break;
                     }
@@ -572,7 +572,7 @@ namespace Lucene.Net.Util.Fst
                             {
                                 AddIfCompetitive(path);
                             }
-                            if (path.Arc.Last)
+                            if (path.Arc.IsLast)
                             {
                                 break;
                             }
@@ -777,7 +777,7 @@ namespace Lucene.Net.Util.Fst
 
                 bool isFinal;
                 T finalOutput;
-                if (startArc.Final)
+                if (startArc.IsFinal)
                 {
                     isFinal = true;
                     finalOutput = startArc.NextFinalOutput.Equals(NO_OUTPUT) ? default(T) : startArc.NextFinalOutput;
@@ -875,7 +875,7 @@ namespace Lucene.Net.Util.Fst
                                 outs = "";
                             }
 
-                            if (!FST<T>.TargetHasArcs(arc) && arc.Final && !arc.NextFinalOutput.Equals(NO_OUTPUT))
+                            if (!FST<T>.TargetHasArcs(arc) && arc.IsFinal && !arc.NextFinalOutput.Equals(NO_OUTPUT))
                             {
                                 // Tricky special case: sometimes, due to
                                 // pruning, the builder can [sillily] produce
@@ -897,10 +897,10 @@ namespace Lucene.Net.Util.Fst
                             }
 
                             Debug.Assert(arc.Label != FST<T>.END_LABEL);
-                            @out.Write("  " + node + " -> " + arc.Target + " [label=\"" + PrintableLabel(arc.Label) + outs + "\"" + (arc.Final ? " style=\"bold\"" : "") + " color=\"" + arcColor + "\"]\n");
+                            @out.Write("  " + node + " -> " + arc.Target + " [label=\"" + PrintableLabel(arc.Label) + outs + "\"" + (arc.IsFinal ? " style=\"bold\"" : "") + " color=\"" + arcColor + "\"]\n");
 
                             // Break the loop if we're on the last arc of this state.
-                            if (arc.Last)
+                            if (arc.IsLast)
                             {
                                 //System.out.println("    break");
                                 break;
@@ -1071,7 +1071,7 @@ namespace Lucene.Net.Util.Fst
             // TODO maybe this is a useful in the FST class - we could simplify some other code like FSTEnum?
             if (label == FST<T>.END_LABEL)
             {
-                if (follow.Final)
+                if (follow.IsFinal)
                 {
                     if (follow.Target <= 0)
                     {
@@ -1156,7 +1156,7 @@ namespace Lucene.Net.Util.Fst
                     // System.out.println("    found!");
                     return arc;
                 }
-                else if (arc.Last)
+                else if (arc.IsLast)
                 {
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs b/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
index 4a38575..e5d6f84 100644
--- a/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
+++ b/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
@@ -274,7 +274,7 @@ namespace Lucene.Net.Util.Fst
                 // read all arcs:
                 fst.ReadFirstTargetArc(arc, arc, fstReader);
                 arcs.Add((new FST.Arc<T>()).CopyFrom(arc));
-                while (!arc.Last)
+                while (!arc.IsLast)
                 {
                     fst.ReadNextArc(arc, fstReader);
                     arcs.Add((new FST.Arc<T>()).CopyFrom(arc));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Tests/core/Util/Fst/TestBytesStore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Fst/TestBytesStore.cs b/src/Lucene.Net.Tests/core/Util/Fst/TestBytesStore.cs
index ec5b8e6..a07fdcf 100644
--- a/src/Lucene.Net.Tests/core/Util/Fst/TestBytesStore.cs
+++ b/src/Lucene.Net.Tests/core/Util/Fst/TestBytesStore.cs
@@ -286,7 +286,7 @@ namespace Lucene.Net.Util.Fst
                 }
                 // reversed
                 FST.BytesReader r2 = bytes.ReverseReader;
-                Assert.IsTrue(r2.Reversed());
+                Assert.IsTrue(r2.IsReversed);
                 r2.Position = totalLength - 1;
                 r2.ReadBytes(actual, 0, actual.Length);
                 int start = 0;
@@ -308,7 +308,7 @@ namespace Lucene.Net.Util.Fst
                     Console.WriteLine("    bulk: forward");
                 }
                 FST.BytesReader r3 = bytes.ForwardReader;
-                Assert.IsFalse(r3.Reversed());
+                Assert.IsFalse(r3.IsReversed);
                 r3.ReadBytes(actual, 0, actual.Length);
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/510413ce/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
index 2cabfd2..2e972ad 100644
--- a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
+++ b/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs
@@ -1319,7 +1319,7 @@ namespace Lucene.Net.Util.Fst
                         int children = VerifyStateAndBelow(fst, new FST.Arc<object>().CopyFrom(arc), depth + 1);
 
                         Assert.AreEqual(expanded, (depth <= FST.FIXED_ARRAY_SHALLOW_DISTANCE && children >= FST.FIXED_ARRAY_NUM_ARCS_SHALLOW) || children >= FST.FIXED_ARRAY_NUM_ARCS_DEEP);
-                        if (arc.Last)
+                        if (arc.IsLast)
                         {
                             break;
                         }
@@ -1437,11 +1437,11 @@ namespace Lucene.Net.Util.Fst
             FST.Arc<long?> arc = fst.ReadFirstTargetArc(startArc, new FST.Arc<long?>(), fst.BytesReader);
             Assert.AreEqual('a', arc.Label);
             Assert.AreEqual(17, arc.NextFinalOutput);
-            Assert.IsTrue(arc.Final);
+            Assert.IsTrue(arc.IsFinal);
 
             arc = fst.ReadNextArc(arc, fst.BytesReader);
             Assert.AreEqual('b', arc.Label);
-            Assert.IsFalse(arc.Final);
+            Assert.IsFalse(arc.IsFinal);
             Assert.AreEqual(42, arc.Output);
         }