Changed Endianness class to an enumeration.

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

Branch: refs/heads/master
Commit: 60385047c42e629d3e272df9f0ccfddd12f4e780
Parents: 8af756d
Author: Shad Storhaug <[email protected]>
Authored: Mon May 1 00:04:56 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Mon May 1 04:48:39 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net/Support/IO/Endianness.cs | 35 ++++------------------------
 1 file changed, 5 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/60385047/src/Lucene.Net/Support/IO/Endianness.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IO/Endianness.cs 
b/src/Lucene.Net/Support/IO/Endianness.cs
index 3a17a9b..465c777 100644
--- a/src/Lucene.Net/Support/IO/Endianness.cs
+++ b/src/Lucene.Net/Support/IO/Endianness.cs
@@ -1,7 +1,4 @@
-// This class was sourced from the Apache Harmony project
-// https://svn.apache.org/repos/asf/harmony/enhanced/java/trunk/
-
-namespace Lucene.Net.Support.IO
+namespace Lucene.Net.Support.IO
 {
     /*
         * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -19,32 +16,10 @@ namespace Lucene.Net.Support.IO
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
-
-    public sealed class Endianness
+    
+    public enum Endianness
     {
-        public static readonly Endianness BIG_ENDIAN = new 
Endianness("BIG_ENDIAN");
-
-        public static readonly Endianness LITTLE_ENDIAN = new 
Endianness("LITTLE_ENDIAN");
-
-        // The string used to display the mapping mode.
-        private readonly string displayName;
-
-        /// <summary>
-        /// Private constructor prevents others creating new Endians.
-        /// </summary>
-        /// <param name="displayName"></param>
-        private Endianness(string displayName)
-        {
-            this.displayName = displayName;
-        }
-
-        /// <summary>
-        /// Answers a string version of the endianness
-        /// </summary>
-        /// <returns>the mode string.</returns>
-        public override string ToString()
-        {
-            return displayName;
-        }
+        LITTLE_ENDIAN,
+        BIG_ENDIAN
     }
 }

Reply via email to