You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by cc...@apache.org on 2012/02/28 23:43:28 UTC

[Lucene.Net] svn commit: r1294875 [31/45] - in /incubator/lucene.net/trunk: ./ build/ build/vs2010/contrib/ build/vs2010/test/ doc/ src/ src/contrib/Analyzers/ src/contrib/Analyzers/AR/ src/contrib/Analyzers/BR/ src/contrib/Analyzers/CJK/ src/contrib/Analyzers/Cn/ ...

Modified: incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs Tue Feb 28 22:43:08 2012
@@ -16,14 +16,12 @@
  */
 
 using System;
-
+using Lucene.Net.Support;
 using DocIdSet = Lucene.Net.Search.DocIdSet;
 using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
 
 namespace Lucene.Net.Util
 {
-	
-	
 	/// <summary>Simple DocIdSet and DocIdSetIterator backed by a BitSet </summary>
 	public class DocIdBitSet:DocIdSet
 	{
@@ -62,49 +60,23 @@ namespace Lucene.Net.Util
 				this.docId = - 1;
 			}
 			
-			/// <deprecated> use <see cref="DocID()" /> instead. 
-			/// </deprecated>
-            [Obsolete("use DocID() instead.")]
-			public override int Doc()
-			{
-				System.Diagnostics.Debug.Assert(docId != - 1);
-				return docId;
-			}
-			
 			public override int DocID()
 			{
 				return docId;
 			}
 			
-			/// <deprecated> use <see cref="NextDoc()" /> instead. 
-			/// </deprecated>
-            [Obsolete("use NextDoc() instead.")]
-			public override bool Next()
-			{
-				// (docId + 1) on next line requires -1 initial value for docNr:
-				return NextDoc() != NO_MORE_DOCS;
-			}
-			
 			public override int NextDoc()
 			{
 				// (docId + 1) on next line requires -1 initial value for docNr:
-				int d = SupportClass.BitSetSupport.NextSetBit(bitSet, docId + 1);
+				int d = BitSetSupport.NextSetBit(bitSet, docId + 1);
 				// -1 returned by BitSet.nextSetBit() when exhausted
 				docId = d == - 1?NO_MORE_DOCS:d;
 				return docId;
 			}
 			
-			/// <deprecated> use <see cref="Advance(int)" /> instead. 
-			/// </deprecated>
-            [Obsolete("use Advance(int) instead.")]
-			public override bool SkipTo(int skipDocNr)
-			{
-				return Advance(skipDocNr) != NO_MORE_DOCS;
-			}
-			
 			public override int Advance(int target)
 			{
-				int d = SupportClass.BitSetSupport.NextSetBit(bitSet, target);
+				int d = BitSetSupport.NextSetBit(bitSet, target);
 				// -1 returned by BitSet.nextSetBit() when exhausted
 				docId = d == - 1?NO_MORE_DOCS:d;
 				return docId;

Modified: incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs Tue Feb 28 22:43:08 2012
@@ -79,11 +79,11 @@ namespace Lucene.Net.Util
 		}
 		
 		/// <summary> Quick and dirty convenience method that instantiates an instance with 
-		/// "good defaults" and uses it to test the CacheEntry[]
+		/// "good defaults" and uses it to test the CacheEntrys
 		/// </summary>
 		/// <seealso cref="Check">
 		/// </seealso>
-		public static Insanity[] CheckSanity(CacheEntry[] cacheEntries)
+		public static Insanity[] CheckSanity(params CacheEntry[] cacheEntries)
 		{
 			FieldCacheSanityChecker sanityChecker = new FieldCacheSanityChecker();
 			// doesn't check for interned
@@ -98,7 +98,7 @@ namespace Lucene.Net.Util
 		/// (:TODO: is this a bad idea? are we masking a real problem?)
 		/// <p/>
 		/// </summary>
-		public Insanity[] Check(CacheEntry[] cacheEntries)
+		public Insanity[] Check(params CacheEntry[] cacheEntries)
 		{
 			if (null == cacheEntries || 0 == cacheEntries.Length)
 				return new Insanity[0];
@@ -115,14 +115,13 @@ namespace Lucene.Net.Util
 			//
 			// maps the (valId) identityhashCode of cache values to 
 			// sets of CacheEntry instances
-			MapOfSets<int,CacheEntry> valIdToItems = new MapOfSets<int,CacheEntry>(new Dictionary<int,Dictionary<CacheEntry,CacheEntry>>(17));
+			MapOfSets<int,CacheEntry> valIdToItems = new MapOfSets<int,CacheEntry>(new Dictionary<int,HashSet<CacheEntry>>(17));
 			// maps ReaderField keys to Sets of ValueIds
-			MapOfSets<ReaderField,int> readerFieldToValIds = new MapOfSets<ReaderField,int>(new Dictionary<ReaderField,Dictionary<int,int>>(17));
+			MapOfSets<ReaderField,int> readerFieldToValIds = new MapOfSets<ReaderField,int>(new Dictionary<ReaderField,HashSet<int>>(17));
 			//
 			
 			// any keys that we know result in more then one valId
-            // TODO: This will be a HashSet<T> when we start using .NET Framework 3.5
-            Dictionary<ReaderField, ReaderField> valMismatchKeys = new Dictionary<ReaderField, ReaderField>();
+            HashSet<ReaderField> valMismatchKeys = new HashSet<ReaderField>();
 			
 			// iterate over all the cacheEntries to get the mappings we'll need
 			for (int i = 0; i < cacheEntries.Length; i++)
@@ -141,10 +140,7 @@ namespace Lucene.Net.Util
 				valIdToItems.Put(valId, item);
 				if (1 < readerFieldToValIds.Put(rf, valId))
 				{
-                    if (!valMismatchKeys.ContainsKey(rf))
-                    {
-                        valMismatchKeys.Add(rf, rf);
-                    }
+                    valMismatchKeys.Add(rf);
 				}
 			}
 			
@@ -163,7 +159,9 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <seealso cref="InsanityType.VALUEMISMATCH">
 		/// </seealso>
-		private List<Insanity> CheckValueMismatch(MapOfSets<int,CacheEntry> valIdToItems, MapOfSets<ReaderField,int> readerFieldToValIds, Dictionary<ReaderField,ReaderField> valMismatchKeys)
+		private List<Insanity> CheckValueMismatch(MapOfSets<int,CacheEntry> valIdToItems, 
+                                                  MapOfSets<ReaderField,int> readerFieldToValIds, 
+                                                  HashSet<ReaderField> valMismatchKeys)
 		{
 			
 			List<Insanity> insanity = new List<Insanity>(valMismatchKeys.Count * 3);
@@ -172,14 +170,14 @@ namespace Lucene.Net.Util
 			{
 				// we have multiple values for some ReaderFields
 				
-                IDictionary<ReaderField,Dictionary<int,int>> rfMap = readerFieldToValIds.GetMap();
-                IDictionary<int,Dictionary<CacheEntry,CacheEntry>> valMap = valIdToItems.GetMap();
-                foreach (ReaderField rf in valMismatchKeys.Keys)
+                IDictionary<ReaderField,HashSet<int>> rfMap = readerFieldToValIds.GetMap();
+                IDictionary<int,HashSet<CacheEntry>> valMap = valIdToItems.GetMap();
+                foreach (ReaderField rf in valMismatchKeys)
                 {
                     List<CacheEntry> badEntries = new List<CacheEntry>(valMismatchKeys.Count * 2);
-                    foreach (int val in rfMap[rf].Keys)
+                    foreach (int val in rfMap[rf])
                     {
-                        foreach (CacheEntry entry in valMap[val].Keys)
+                        foreach (CacheEntry entry in valMap[val])
                         {
                             badEntries.Add(entry);
                         }
@@ -199,28 +197,28 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <seealso cref="InsanityType.SUBREADER">
 		/// </seealso>
-		private List<Insanity> CheckSubreaders(MapOfSets<int,CacheEntry> valIdToItems, MapOfSets<ReaderField,int> readerFieldToValIds)
+		private List<Insanity> CheckSubreaders(MapOfSets<int,CacheEntry> valIdToItems, 
+                                               MapOfSets<ReaderField,int> readerFieldToValIds)
 		{
-			
             List<Insanity> insanity = new List<Insanity>(23);
 
-            Dictionary<ReaderField, Dictionary<ReaderField, ReaderField>> badChildren = new Dictionary<ReaderField, Dictionary<ReaderField, ReaderField>>(17);
+            Dictionary<ReaderField, HashSet<ReaderField>> badChildren = new Dictionary<ReaderField, HashSet<ReaderField>>(17);
 			MapOfSets<ReaderField, ReaderField> badKids = new MapOfSets<ReaderField, ReaderField>(badChildren); // wrapper
 
-            IDictionary<int, Dictionary<CacheEntry, CacheEntry>> viToItemSets = valIdToItems.GetMap();
-            IDictionary<ReaderField, Dictionary<int, int>> rfToValIdSets = readerFieldToValIds.GetMap();
+            IDictionary<int, HashSet<CacheEntry>> viToItemSets = valIdToItems.GetMap();
+            IDictionary<ReaderField, HashSet<int>> rfToValIdSets = readerFieldToValIds.GetMap();
 
-            Dictionary<ReaderField, ReaderField> seen = new Dictionary<ReaderField, ReaderField>(17);
+            HashSet<ReaderField> seen = new HashSet<ReaderField>();
 
             foreach (ReaderField rf in rfToValIdSets.Keys)
             {
-                if (seen.ContainsKey(rf))
+                if (seen.Contains(rf))
                     continue;
 
                 System.Collections.IList kids = GetAllDecendentReaderKeys(rf.readerKey);
-				for (int i = 0; i < kids.Count; i++)
+				foreach (Object kidKey in kids)
 				{
-					ReaderField kid = new ReaderField(kids[i], rf.fieldName);
+                    ReaderField kid = new ReaderField(kidKey, rf.fieldName);
 
 					if (badChildren.ContainsKey(kid))
 					{
@@ -235,38 +233,32 @@ namespace Lucene.Net.Util
 						// we have cache entries for the kid
 						badKids.Put(rf, kid);
 					}
-                    if (!seen.ContainsKey(kid))
-                    {
-                        seen.Add(kid, kid);
-                    }
+                    seen.Add(kid);
 				}
-                if (!seen.ContainsKey(rf))
-                {
-                    seen.Add(rf, rf);
-                }
+                seen.Add(rf);
 			}
 			
 			// every mapping in badKids represents an Insanity
 			foreach (ReaderField parent in badChildren.Keys)
 			{
-				Dictionary<ReaderField,ReaderField> kids = badChildren[parent];
+				HashSet<ReaderField> kids = badChildren[parent];
 				
 				List<CacheEntry> badEntries = new List<CacheEntry>(kids.Count * 2);
 				
 				// put parent entr(ies) in first
 				{
-					foreach (int val in rfToValIdSets[parent].Keys)
+					foreach (int val in rfToValIdSets[parent])
 					{
-						badEntries.AddRange(viToItemSets[val].Keys);
+						badEntries.AddRange(viToItemSets[val]);
 					}
 				}
 				
 				// now the entries for the descendants
-				foreach (ReaderField kid in kids.Keys)
+				foreach (ReaderField kid in kids)
 				{
-					foreach (int val in rfToValIdSets[kid].Keys)
+					foreach (int val in rfToValIdSets[kid])
 					{
-						badEntries.AddRange(viToItemSets[val].Keys);
+						badEntries.AddRange(viToItemSets[val]);
 					}
 				}
 				
@@ -282,7 +274,7 @@ namespace Lucene.Net.Util
 		/// </summary>
 		private System.Collections.IList GetAllDecendentReaderKeys(System.Object seed)
 		{
-			System.Collections.IList all = new System.Collections.ArrayList(17); // will grow as we iter
+			List<object> all = new List<object>(17); // will grow as we iter
 			all.Add(seed);
 			for (int i = 0; i < all.Count; i++)
 			{
@@ -297,7 +289,7 @@ namespace Lucene.Net.Util
 				}
 			}
 			// need to skip the first, because it was the seed
-			return (System.Collections.IList) ((System.Collections.ArrayList) all).GetRange(1, all.Count - 1);
+			return all.GetRange(1, all.Count - 1);
 		}
 		
 		/// <summary> Simple pair object for using "readerKey + fieldName" a Map key</summary>
@@ -337,7 +329,7 @@ namespace Lucene.Net.Util
 			private InsanityType type;
 			private System.String msg;
 			private CacheEntry[] entries;
-			public Insanity(InsanityType type, System.String msg, CacheEntry[] entries)
+			public Insanity(InsanityType type, System.String msg, params CacheEntry[] entries)
 			{
 				if (null == type)
 				{

Modified: incubator/lucene.net/trunk/src/core/Util/IndexableBinaryStringTools.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/IndexableBinaryStringTools.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/IndexableBinaryStringTools.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/IndexableBinaryStringTools.cs Tue Feb 28 22:43:08 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Lucene.Net.Support;
 
 // {{Aroush-2.9}} Port issue?  Both of those were treated as: System.IO.MemoryStream
 //using CharBuffer = java.nio.CharBuffer;
@@ -138,12 +139,12 @@ namespace Lucene.Net.Util
                     codingCase = CODING_CASES[caseNum];
                     if (2 == codingCase.numBytes)
                     {
-                        output[outputCharNum] = (char)(((input[inputByteNum] & 0xFF) << codingCase.initialShift) + ((SupportClass.Number.URShift((input[inputByteNum + 1] & 0xFF), codingCase.finalShift)) & codingCase.finalMask) & (short)0x7FFF);
+                        output[outputCharNum] = (char)(((input[inputByteNum] & 0xFF) << codingCase.initialShift) + ((Number.URShift((input[inputByteNum + 1] & 0xFF), codingCase.finalShift)) & codingCase.finalMask) & (short)0x7FFF);
                     }
                     else
                     {
                         // numBytes is 3
-                        output[outputCharNum] = (char)(((input[inputByteNum] & 0xFF) << codingCase.initialShift) + ((input[inputByteNum + 1] & 0xFF) << codingCase.middleShift) + ((SupportClass.Number.URShift((input[inputByteNum + 2] & 0xFF), codingCase.finalShift)) & codingCase.finalMask) & (short)0x7FFF);
+                        output[outputCharNum] = (char)(((input[inputByteNum] & 0xFF) << codingCase.initialShift) + ((input[inputByteNum + 1] & 0xFF) << codingCase.middleShift) + ((Number.URShift((input[inputByteNum + 2] & 0xFF), codingCase.finalShift)) & codingCase.finalMask) & (short)0x7FFF);
                     }
                     inputByteNum += codingCase.advanceBytes;
                     if (++caseNum == CODING_CASES.Length)
@@ -221,19 +222,19 @@ namespace Lucene.Net.Util
                     {
                         if (0 == caseNum)
                         {
-                            output[outputByteNum] = (byte) (SupportClass.Number.URShift(inputChar, codingCase.initialShift));
+                            output[outputByteNum] = (byte) (Number.URShift(inputChar, codingCase.initialShift));
                         }
                         else
                         {
-                            output[outputByteNum] = (byte) (output[outputByteNum] + (byte) (SupportClass.Number.URShift(inputChar, codingCase.initialShift)));
+                            output[outputByteNum] = (byte) (output[outputByteNum] + (byte) (Number.URShift(inputChar, codingCase.initialShift)));
                         }
                         output[outputByteNum + 1] = (byte) ((inputChar & codingCase.finalMask) << codingCase.finalShift);
                     }
                     else
                     {
                         // numBytes is 3
-                        output[outputByteNum] = (byte) (output[outputByteNum] + (byte) (SupportClass.Number.URShift(inputChar, codingCase.initialShift)));
-                        output[outputByteNum + 1] = (byte) (SupportClass.Number.URShift((inputChar & codingCase.middleMask), codingCase.middleShift));
+                        output[outputByteNum] = (byte) (output[outputByteNum] + (byte) (Number.URShift(inputChar, codingCase.initialShift)));
+                        output[outputByteNum + 1] = (byte) (Number.URShift((inputChar & codingCase.middleMask), codingCase.middleShift));
                         output[outputByteNum + 2] = (byte) ((inputChar & codingCase.finalMask) << codingCase.finalShift);
                     }
                     outputByteNum += codingCase.advanceBytes;
@@ -249,18 +250,18 @@ namespace Lucene.Net.Util
                 {
                     output[outputByteNum] = 0;
                 }
-                output[outputByteNum] = (byte) (output[outputByteNum] + (byte) (SupportClass.Number.URShift(inputChar, codingCase.initialShift)));
+                output[outputByteNum] = (byte) (output[outputByteNum] + (byte) (Number.URShift(inputChar, codingCase.initialShift)));
                 long bytesLeft = numOutputBytes - outputByteNum;
                 if (bytesLeft > 1)
                 {
                     if (2 == codingCase.numBytes)
                     {
-                        output[outputByteNum + 1] = (byte) (SupportClass.Number.URShift((inputChar & codingCase.finalMask), codingCase.finalShift));
+                        output[outputByteNum + 1] = (byte) (Number.URShift((inputChar & codingCase.finalMask), codingCase.finalShift));
                     }
                     else
                     {
                         // numBytes is 3
-                        output[outputByteNum + 1] = (byte) (SupportClass.Number.URShift((inputChar & codingCase.middleMask), codingCase.middleShift));
+                        output[outputByteNum + 1] = (byte) (Number.URShift((inputChar & codingCase.middleMask), codingCase.middleShift));
                         if (bytesLeft > 2)
                         {
                             output[outputByteNum + 2] = (byte) ((inputChar & codingCase.finalMask) << codingCase.finalShift);
@@ -321,7 +322,7 @@ namespace Lucene.Net.Util
 				this.initialShift = initialShift;
 				this.middleShift = middleShift;
 				this.finalShift = finalShift;
-				this.finalMask = (short) (SupportClass.Number.URShift((short) 0xFF, finalShift));
+				this.finalMask = (short) (Number.URShift((short) 0xFF, finalShift));
 				this.middleMask = (short) ((short) 0xFF << middleShift);
 			}
 			
@@ -330,7 +331,7 @@ namespace Lucene.Net.Util
 				this.numBytes = 2;
 				this.initialShift = initialShift;
 				this.finalShift = finalShift;
-				this.finalMask = (short) (SupportClass.Number.URShift((short) 0xFF, finalShift));
+				this.finalMask = (short) (Number.URShift((short) 0xFF, finalShift));
 				if (finalShift != 0)
 				{
 					advanceBytes = 1;

Modified: incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs Tue Feb 28 22:43:08 2012
@@ -16,27 +16,26 @@
  */
 
 using System;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Util
 {
 	
 	/// <summary> Helper class for keeping Listss of Objects associated with keys. <b>WARNING: THIS CLASS IS NOT THREAD SAFE</b></summary>
-    public class MapOfSets<T, V>
+    public class MapOfSets<TKey, TValue>
     {
-		
-		// TODO: This will be a HashSet<T> when we start using .NET Framework 3.5
-		private System.Collections.Generic.IDictionary<T, System.Collections.Generic.Dictionary<V, V>> theMap;
+		private IDictionary<TKey, HashSet<TValue>> theMap;
 		
 		/// <param name="m">the backing store for this object
 		/// </param>
-		public MapOfSets(System.Collections.Generic.IDictionary<T, System.Collections.Generic.Dictionary<V, V>> m)
+        public MapOfSets(IDictionary<TKey, HashSet<TValue>> m)
 		{
 			theMap = m;
 		}
 		
 		/// <returns> direct access to the map backing this object.
 		/// </returns>
-		public virtual System.Collections.Generic.IDictionary<T, System.Collections.Generic.Dictionary<V, V>> GetMap()
+        public virtual IDictionary<TKey, HashSet<TValue>> GetMap()
 		{
 			return theMap;
 		}
@@ -46,19 +45,15 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <returns> the size of the Set associated with key once val is added to it.
 		/// </returns>
-		public virtual int Put(T key, V val)
+		public virtual int Put(TKey key, TValue val)
 		{
-            // TODO: This will be a HashSet<T> when we start using .NET Framework 3.5
-            System.Collections.Generic.Dictionary<V, V> theSet;
+            HashSet<TValue> theSet;
             if (!theMap.TryGetValue(key, out theSet))
             {
-                theSet = new System.Collections.Generic.Dictionary<V, V>(23);
+                theSet = new HashSet<TValue>();
                 theMap[key] = theSet;
             }
-            if (!theSet.ContainsKey(val))
-            {
-                theSet.Add(val, val);
-            }
+            theSet.Add(val);
 			return theSet.Count;
 		}
 		/// <summary> Adds multiple vals to the Set associated with key in the Map.  
@@ -67,22 +62,15 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <returns> the size of the Set associated with key once val is added to it.
 		/// </returns>
-		public virtual int PutAll(T key, System.Collections.Generic.Dictionary<V, V> vals)
+		public virtual int PutAll(TKey key, IEnumerable<TValue> vals)
 		{
-            // TODO: This will be a HashSet<T> when we start using .NET Framework 3.5
-            System.Collections.Generic.Dictionary<V, V> theSet;
+            HashSet<TValue> theSet;
             if (!theMap.TryGetValue(key, out theSet))
             {
-                theSet = new System.Collections.Generic.Dictionary<V, V>(23);
+                theSet = new HashSet<TValue>();
                 theMap[key] = theSet;
             }
-            foreach(V item in vals.Keys)
-            {
-                if (!theSet.ContainsKey(item))
-                {
-                    theSet.Add(item, item);
-                }
-            }
+		    theSet.UnionWith(vals);
 			return theSet.Count;
 		}
 	}

Modified: incubator/lucene.net/trunk/src/core/Util/NumericUtils.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/NumericUtils.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/NumericUtils.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/NumericUtils.cs Tue Feb 28 22:43:08 2012
@@ -16,11 +16,10 @@
  */
 
 using System;
-
+using Lucene.Net.Documents;
+using Lucene.Net.Search;
+using Lucene.Net.Support;
 using NumericTokenStream = Lucene.Net.Analysis.NumericTokenStream;
-using NumericField = Lucene.Net.Documents.NumericField;
-using NumericRangeFilter = Lucene.Net.Search.NumericRangeFilter;
-using NumericRangeQuery = Lucene.Net.Search.NumericRangeQuery;
 
 namespace Lucene.Net.Util
 {
@@ -50,7 +49,7 @@ namespace Lucene.Net.Util
 	/// <p/>For easy usage, the trie algorithm is implemented for indexing inside
 	/// <see cref="NumericTokenStream" /> that can index <c>int</c>, <c>long</c>,
 	/// <c>float</c>, and <c>double</c>. For querying,
-	/// <see cref="NumericRangeQuery" /> and <see cref="NumericRangeFilter" /> implement the query part
+    /// <see cref="NumericRangeQuery{T}" /> and <see cref="NumericRangeFilter{T}" /> implement the query part
 	/// for the same data types.
 	/// 
 	/// <p/>This class can also be used, to generate lexicographically sortable (according
@@ -71,7 +70,7 @@ namespace Lucene.Net.Util
 		} // no instance!
 		
 		/// <summary> The default precision step used by <see cref="NumericField" />, <see cref="NumericTokenStream" />,
-		/// <see cref="NumericRangeQuery" />, and <see cref="NumericRangeFilter" /> as default
+        /// <see cref="NumericRangeQuery{T}" />, and <see cref="NumericRangeFilter{T}" /> as default
 		/// </summary>
 		public const int PRECISION_STEP_DEFAULT = 4;
 		
@@ -173,14 +172,14 @@ namespace Lucene.Net.Util
 			int nChars = (31 - shift) / 7 + 1, len = nChars + 1;
 			buffer[0] = (char) (SHIFT_START_INT + shift);
 			int sortableBits = val ^ unchecked((int) 0x80000000);
-			sortableBits = SupportClass.Number.URShift(sortableBits, shift);
+			sortableBits = Number.URShift(sortableBits, shift);
 			while (nChars >= 1)
 			{
 				// Store 7 bits per character for good efficiency when UTF-8 encoding.
 				// The whole number is right-justified so that lucene can prefix-encode
 				// the terms more efficiently.
 				buffer[nChars--] = (char) (sortableBits & 0x7f);
-				sortableBits = SupportClass.Number.URShift(sortableBits, 7);
+				sortableBits = Number.URShift(sortableBits, 7);
 			}
 			return len;
 		}
@@ -352,7 +351,7 @@ namespace Lucene.Net.Util
 		/// <see cref="Lucene.Net.Search.BooleanQuery" /> for each call to its
 		/// <see cref="LongRangeBuilder.AddRange(String,String)" />
 		/// method.
-		/// <p/>This method is used by <see cref="NumericRangeQuery" />.
+		/// <p/>This method is used by <see cref="NumericRangeQuery{T}" />.
 		/// </summary>
 		public static void  SplitLongRange(LongRangeBuilder builder, int precisionStep, long minBound, long maxBound)
 		{
@@ -364,7 +363,7 @@ namespace Lucene.Net.Util
 		/// <see cref="Lucene.Net.Search.BooleanQuery" /> for each call to its
 		/// <see cref="IntRangeBuilder.AddRange(String,String)" />
 		/// method.
-		/// <p/>This method is used by <see cref="NumericRangeQuery" />.
+		/// <p/>This method is used by <see cref="NumericRangeQuery{T}" />.
 		/// </summary>
 		public static void  SplitIntRange(IntRangeBuilder builder, int precisionStep, int minBound, int maxBound)
 		{

Modified: incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs Tue Feb 28 22:43:08 2012
@@ -16,7 +16,7 @@
  */
 
 using System;
-
+using Lucene.Net.Support;
 using DocIdSet = Lucene.Net.Search.DocIdSet;
 using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
 
@@ -900,7 +900,7 @@ namespace Lucene.Net.Util
 		
 		
 		/// <summary>returns true if both sets have the same bits set </summary>
-		public  override bool Equals(System.Object o)
+		public override bool Equals(System.Object o)
 		{
 			if (this == o)
 				return true;
@@ -942,7 +942,7 @@ namespace Lucene.Net.Util
             for (int i = bits.Length; --i >= 0; )
             {
                 h ^= bits[i];
-                h = (h << 1) | (SupportClass.Number.URShift(h, 63)); // rotate left
+                h = (h << 1) | (Number.URShift(h, 63)); // rotate left
             }
             // fold leftmost bits into right and add a constant to prevent
             // empty sets from returning 0, which is too common.

Modified: incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs Tue Feb 28 22:43:08 2012
@@ -37,8 +37,49 @@ namespace Lucene.Net.Util
 		// packed inside a 32 bit integer (8 4 bit numbers).  That
 		// should be faster than accessing an array for each index, and
 		// the total array size is kept smaller (256*sizeof(int))=1K
-		protected internal static readonly uint[] bitlist = new uint[]{0x0, 0x1, 0x2, 0x21, 0x3, 0x31, 0x32, 0x321, 0x4, 0x41, 0x42, 0x421, 0x43, 0x431, 0x432, 0x4321, 0x5, 0x51, 0x52, 0x521, 0x53, 0x531, 0x532, 0x5321, 0x54, 0x541, 0x542, 0x5421, 0x543, 0x5431, 0x5432, 0x54321, 0x6, 0x61, 0x62, 0x621, 0x63, 0x631, 0x632, 0x6321, 0x64, 0x641, 0x642, 0x6421, 0x643, 0x6431, 0x6432, 0x64321, 0x65, 0x651, 0x652, 0x6521, 0x653, 0x6531, 0x6532, 0x65321, 0x654, 0x6541, 0x6542, 0x65421, 0x6543, 0x65431, 0x65432, 0x654321, 0x7, 0x71, 0x72, 0x721, 0x73, 0x731, 0x732, 0x7321, 0x74, 0x741, 0x742, 0x7421, 0x743, 0x7431, 0x7432, 0x74321, 0x75, 0x751, 0x752, 0x7521, 0x753, 0x7531, 0x7532, 0x75321, 0x754, 0x7541, 0x7542, 0x75421, 0x7543, 0x75431, 0x75432, 0x754321, 0x76, 0x761, 0x762, 0x7621, 0x763, 0x7631, 0x7632, 0x76321, 0x764, 0x7641, 0x7642, 0x76421, 0x7643, 0x76431, 0x76432, 0x764321, 0x765, 0x7651, 0x7652, 0x76521, 0x7653, 0x76531, 0x76532, 0x765321, 0x7654, 0x76541, 0x76542, 0x765421, 0x7
 6543, 0x765431, 0x765432, 0x7654321, 0x8, 0x81, 0x82, 0x821, 0x83, 0x831, 0x832, 0x8321, 0x84, 0x841, 0x842, 0x8421, 0x843, 0x8431, 0x8432, 0x84321, 0x85, 0x851, 0x852, 0x8521, 0x853, 0x8531, 0x8532, 0x85321, 0x854, 0x8541, 0x8542, 0x85421, 0x8543, 0x85431, 0x85432, 0x854321, 0x86, 0x861, 0x862, 0x8621, 0x863, 0x8631, 0x8632, 0x86321, 0x864, 0x8641, 0x8642, 0x86421, 0x8643, 0x86431, 0x86432, 0x864321, 0x865, 0x8651, 0x8652, 0x86521, 0x8653, 0x86531, 0x86532, 0x865321, 0x8654, 0x86541, 0x86542, 0x865421, 0x86543, 0x865431, 0x865432, 0x8654321, 0x87, 0x871, 0x872, 0x8721, 0x873, 0x8731, 0x8732, 0x87321, 0x874, 0x8741, 0x8742, 0x87421, 0x8743, 0x87431, 0x87432, 0x874321, 0x875, 0x8751, 0x8752, 0x87521, 0x8753, 0x87531, 0x87532, 0x875321, 0x8754, 0x87541, 0x87542, 0x875421, 0x87543, 0x875431, 0x875432, 0x8754321, 0x876, 0x8761, 0x8762, 0x87621, 0x8763, 0x87631, 0x87632, 0x876321, 0x8764, 0x87641, 0x87642, 0x876421, 0x87643, 0x876431, 0x876432, 0x8764321, 0x8765, 0x87651, 0x87652
 , 0x876521, 0x87653, 0x876531, 0x876532, 0x8765321, 0x87654, 
-			0x876541, 0x876542, 0x8765421, 0x876543, 0x8765431, 0x8765432, 0x87654321};
+	    protected internal static readonly uint[] bitlist = new uint[]
+	                                                            {
+	                                                                0x0, 0x1, 0x2, 0x21, 0x3, 0x31, 0x32, 0x321, 0x4, 0x41,
+	                                                                0x42, 0x421, 0x43, 0x431, 0x432, 0x4321, 0x5, 0x51,
+	                                                                0x52, 0x521, 0x53, 0x531, 0x532, 0x5321, 0x54, 0x541,
+	                                                                0x542, 0x5421, 0x543, 0x5431, 0x5432, 0x54321, 0x6,
+	                                                                0x61, 0x62, 0x621, 0x63, 0x631, 0x632, 0x6321, 0x64,
+	                                                                0x641, 0x642, 0x6421, 0x643, 0x6431, 0x6432, 0x64321,
+	                                                                0x65, 0x651, 0x652, 0x6521, 0x653, 0x6531, 0x6532,
+	                                                                0x65321, 0x654, 0x6541, 0x6542, 0x65421, 0x6543,
+	                                                                0x65431, 0x65432, 0x654321, 0x7, 0x71, 0x72, 0x721,
+	                                                                0x73, 0x731, 0x732, 0x7321, 0x74, 0x741, 0x742, 0x7421,
+	                                                                0x743, 0x7431, 0x7432, 0x74321, 0x75, 0x751, 0x752,
+	                                                                0x7521, 0x753, 0x7531, 0x7532, 0x75321, 0x754, 0x7541,
+	                                                                0x7542, 0x75421, 0x7543, 0x75431, 0x75432, 0x754321,
+	                                                                0x76, 0x761, 0x762, 0x7621, 0x763, 0x7631, 0x7632,
+	                                                                0x76321, 0x764, 0x7641, 0x7642, 0x76421, 0x7643,
+	                                                                0x76431, 0x76432, 0x764321, 0x765, 0x7651, 0x7652,
+	                                                                0x76521, 0x7653, 0x76531, 0x76532, 0x765321, 0x7654,
+	                                                                0x76541, 0x76542, 0x765421, 0x76543, 0x765431, 0x765432
+	                                                                , 0x7654321, 0x8, 0x81, 0x82, 0x821, 0x83, 0x831, 0x832
+	                                                                , 0x8321, 0x84, 0x841, 0x842, 0x8421, 0x843, 0x8431,
+	                                                                0x8432, 0x84321, 0x85, 0x851, 0x852, 0x8521, 0x853,
+	                                                                0x8531, 0x8532, 0x85321, 0x854, 0x8541, 0x8542, 0x85421
+	                                                                , 0x8543, 0x85431, 0x85432, 0x854321, 0x86, 0x861,
+	                                                                0x862, 0x8621, 0x863, 0x8631, 0x8632, 0x86321, 0x864,
+	                                                                0x8641, 0x8642, 0x86421, 0x8643, 0x86431, 0x86432,
+	                                                                0x864321, 0x865, 0x8651, 0x8652, 0x86521, 0x8653,
+	                                                                0x86531, 0x86532, 0x865321, 0x8654, 0x86541, 0x86542,
+	                                                                0x865421, 0x86543, 0x865431, 0x865432, 0x8654321, 0x87,
+	                                                                0x871, 0x872, 0x8721, 0x873, 0x8731, 0x8732, 0x87321,
+	                                                                0x874, 0x8741, 0x8742, 0x87421, 0x8743, 0x87431,
+	                                                                0x87432, 0x874321, 0x875, 0x8751, 0x8752, 0x87521,
+	                                                                0x8753, 0x87531, 0x87532, 0x875321, 0x8754, 0x87541,
+	                                                                0x87542, 0x875421, 0x87543, 0x875431, 0x875432,
+	                                                                0x8754321, 0x876, 0x8761, 0x8762, 0x87621, 0x8763,
+	                                                                0x87631, 0x87632, 0x876321, 0x8764, 0x87641, 0x87642,
+	                                                                0x876421, 0x87643, 0x876431, 0x876432, 0x8764321,
+	                                                                0x8765, 0x87651, 0x87652, 0x876521, 0x87653, 0x876531,
+	                                                                0x876532, 0x8765321, 0x87654,
+	                                                                0x876541, 0x876542, 0x8765421, 0x876543, 0x8765431,
+	                                                                0x8765432, 0x87654321
+	                                                            };
 		/// <summary>** the python code that generated bitlist
 		/// def bits2int(val):
 		/// arr=0
@@ -116,14 +157,6 @@ namespace Lucene.Net.Util
 		/// ****
 		/// </summary>*/
 		
-		/// <deprecated> use <see cref="NextDoc()" /> instead. 
-		/// </deprecated>
-        [Obsolete("use NextDoc() instead.")]
-		public override bool Next()
-		{
-			return NextDoc() != NO_MORE_DOCS;
-		}
-		
 		public override int NextDoc()
 		{
 			if (indexArray == 0)
@@ -156,14 +189,6 @@ namespace Lucene.Net.Util
 			return curDocId = (i << 6) + bitIndex;
 		}
 		
-		/// <deprecated> use <see cref="Advance(int)" /> instead. 
-		/// </deprecated>
-        [Obsolete("use Advance(int) instead.")]
-		public override bool SkipTo(int target)
-		{
-			return Advance(target) != NO_MORE_DOCS;
-		}
-		
 		public override int Advance(int target)
 		{
 			indexArray = 0;
@@ -201,14 +226,6 @@ namespace Lucene.Net.Util
 			return curDocId = (i << 6) + bitIndex;
 		}
 		
-		/// <deprecated> use <see cref="DocID()" /> instead. 
-		/// </deprecated>
-        [Obsolete("use DocID() instead.")]
-		public override int Doc()
-		{
-			return curDocId;
-		}
-		
 		public override int DocID()
 		{
 			return curDocId;

Modified: incubator/lucene.net/trunk/src/core/Util/Parameter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/Parameter.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/Parameter.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/Parameter.cs Tue Feb 28 22:43:08 2012
@@ -55,7 +55,7 @@ namespace Lucene.Net.Util
 		{
 			return name;
 		}
-		
+
 		/// <summary> Resolves the deserialized instance to the local reference for accurate
 		/// equals() and == comparisons.
 		/// 

Modified: incubator/lucene.net/trunk/src/core/Util/PriorityQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/PriorityQueue.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/PriorityQueue.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/PriorityQueue.cs Tue Feb 28 22:43:08 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Lucene.Net.Support;
 
 namespace Lucene.Net.Util
 {
@@ -28,16 +29,20 @@ namespace Lucene.Net.Util
 	/// length <c>maxSize+1</c>, in <see cref="Initialize" />.
 	/// 
 	/// </summary>
-	public abstract class PriorityQueue
+	// TODO: T needs to be able to return null.  Behavior might be unexpected otherwise, since it returns default(T)
+    //       I only see a non-nullable type used in PriorityQueue in the tests.  may be possible to re-write tests to
+    //       use an IComparable class, and this can be changed back to constraining on class, to return null, or should
+    //       we leave as is?
+	public abstract class PriorityQueue<T> //where T : class
 	{
 		private int size;
 		private int maxSize;
-		protected internal System.Object[] heap;
+		protected internal T[] heap;
 		
 		/// <summary>Determines the ordering of objects in this priority queue.  Subclasses
 		/// must define this one method. 
 		/// </summary>
-		public abstract bool LessThan(System.Object a, System.Object b);
+		public abstract bool LessThan(T a, T b);
 		
 		/// <summary> This method can be overridden by extending classes to return a sentinel
 		/// object which will be used by <see cref="Initialize(int)" /> to fill the queue, so
@@ -45,7 +50,7 @@ namespace Lucene.Net.Util
 		/// change the top without attempting to insert any new object.<br/>
 		/// 
 		/// Those sentinel values should always compare worse than any non-sentinel
-		/// value (i.e., <see cref="LessThan(Object, Object)" /> should always favor the
+		/// value (i.e., <see cref="LessThan" /> should always favor the
 		/// non-sentinel values).<br/>
 		/// 
 		/// By default, this method returns false, which means the queue will not be
@@ -57,9 +62,9 @@ namespace Lucene.Net.Util
 		/// 
         /// <code>
 		/// // extends getSentinelObject() to return a non-null value.
-		/// PriorityQueue pq = new MyQueue(numHits);
+        /// PriorityQueue&lt;MyObject&gt; pq = new MyQueue&lt;MyObject&gt;(numHits);
 		/// // save the 'top' element, which is guaranteed to not be null.
-		/// MyObject pqTop = (MyObject) pq.top();
+		/// MyObject pqTop = pq.top();
 		/// &lt;...&gt;
 		/// // now in order to add a new element, which is 'better' than top (after 
 		/// // you've verified it is better), it is as simple as:
@@ -78,9 +83,9 @@ namespace Lucene.Net.Util
 		/// <returns> the sentinel object to use to pre-populate the queue, or null if
 		/// sentinel objects are not supported.
 		/// </returns>
-		protected internal virtual System.Object GetSentinelObject()
+		protected internal virtual T GetSentinelObject()
 		{
-			return null;
+			return default(T);
 		}
 		
 		/// <summary>Subclass constructors must call this. </summary>
@@ -112,11 +117,11 @@ namespace Lucene.Net.Util
                     heapSize = maxSize + 1;
                 }
             }
-			heap = new System.Object[heapSize];
+			heap = new T[heapSize];
 			this.maxSize = maxSize;
 			
 			// If sentinel objects are supported, populate the queue with them
-			System.Object sentinel = GetSentinelObject();
+			T sentinel = GetSentinelObject();
 			if (sentinel != null)
 			{
 				heap[1] = sentinel;
@@ -128,56 +133,23 @@ namespace Lucene.Net.Util
 			}
 		}
 		
-		/// <summary> Adds an Object to a PriorityQueue in log(size) time. If one tries to add
-		/// more objects than maxSize from initialize a RuntimeException
-		/// (ArrayIndexOutOfBound) is thrown.
-		/// 
-		/// </summary>
-		/// <deprecated> use <see cref="Add(Object)" /> which returns the new top object,
-		/// saving an additional call to <see cref="Top()" />.
-		/// </deprecated>
-        [Obsolete("use Add(Object) which returns the new top object, saving an additional call to Top().")]
-		public void  Put(System.Object element)
-		{
-			size++;
-			heap[size] = element;
-			UpHeap();
-		}
-		
-		/// <summary> Adds an Object to a PriorityQueue in log(size) time. If one tries to add
+		/// <summary> 
+		/// Adds an Object to a PriorityQueue in log(size) time. If one tries to add
 		/// more objects than maxSize from initialize an
 		/// <see cref="System.IndexOutOfRangeException" /> is thrown.
-		/// 
 		/// </summary>
 		/// <returns> the new 'top' element in the queue.
 		/// </returns>
-		public System.Object Add(System.Object element)
+		public T Add(T element)
 		{
 			size++;
 			heap[size] = element;
 			UpHeap();
 			return heap[1];
 		}
-		
-		/// <summary> Adds element to the PriorityQueue in log(size) time if either the
-		/// PriorityQueue is not full, or not lessThan(element, top()).
-		/// 
-		/// </summary>
-		/// <param name="element">
-		/// </param>
-		/// <returns> true if element is added, false otherwise.
-		/// </returns>
-		/// <deprecated> use <see cref="InsertWithOverflow(Object)" /> instead, which
-		/// encourages objects reuse.
-		/// </deprecated>
-        [Obsolete("use InsertWithOverflow(Object) instead, which encourages objects reuse.")]
-		public virtual bool Insert(System.Object element)
-		{
-			return InsertWithOverflow(element) != element;
-		}
-		
-		/// <summary> insertWithOverflow() is the same as insert() except its
-		/// return value: it returns the object (if any) that was
+
+        /// <summary> Adds an Object to a PriorityQueue in log(size) time.
+        /// It returns the object (if any) that was
 		/// dropped off the heap because it was full. This can be
 		/// the given parameter (in case it is smaller than the
 		/// full heap's minimum, and couldn't be added), or another
@@ -185,18 +157,18 @@ namespace Lucene.Net.Util
 		/// heap and now has been replaced by a larger one, or null
 		/// if the queue wasn't yet full with maxSize elements.
 		/// </summary>
-		public virtual System.Object InsertWithOverflow(System.Object element)
+		public virtual T InsertWithOverflow(T element)
 		{
 			if (size < maxSize)
 			{
-				Put(element);
-				return null;
+				Add(element);
+				return default(T);
 			}
 			else if (size > 0 && !LessThan(element, heap[1]))
 			{
-				System.Object ret = heap[1];
+				T ret = heap[1];
 				heap[1] = element;
-				AdjustTop();
+				UpdateTop();
 				return ret;
 			}
 			else
@@ -206,7 +178,7 @@ namespace Lucene.Net.Util
 		}
 		
 		/// <summary>Returns the least element of the PriorityQueue in constant time. </summary>
-		public System.Object Top()
+		public T Top()
 		{
 			// We don't need to check size here: if maxSize is 0,
 			// then heap is length 2 array with both entries null.
@@ -214,70 +186,40 @@ namespace Lucene.Net.Util
 			return heap[1];
 		}
 		
-		/// <summary>Removes and returns the least element of the PriorityQueue in log(size)
-		/// time. 
+		/// <summary>
+		/// Removes and returns the least element of the 
+		/// PriorityQueue in log(size) time. 
 		/// </summary>
-		public System.Object Pop()
+		public T Pop()
 		{
 			if (size > 0)
 			{
-				System.Object result = heap[1]; // save first value
+				T result = heap[1]; // save first value
 				heap[1] = heap[size]; // move last to first
-				heap[size] = null; // permit GC of objects
+				heap[size] = default(T); // permit GC of objects
 				size--;
 				DownHeap(); // adjust heap
 				return result;
 			}
 			else
-				return null;
-		}
-		
-		/// <summary> Should be called when the Object at top changes values. Still log(n) worst
-		/// case, but it's at least twice as fast to
-		/// 
-        /// <code>
-		/// pq.top().change();
-		/// pq.adjustTop();
-        /// </code>
-		/// 
-		/// instead of
-		/// 
-        /// <code>
-		/// o = pq.pop();
-		/// o.change();
-		/// pq.push(o);
-        /// </code>
-		/// 
-		/// </summary>
-		/// <deprecated> use <see cref="UpdateTop()" /> which returns the new top element and
-		/// saves an additional call to <see cref="Top()" />.
-		/// </deprecated>
-        [Obsolete("use UpdateTop() which returns the new top element and saves an additional call to Top()")]
-		public void  AdjustTop()
-		{
-			DownHeap();
+                return default(T);
 		}
 		
-		/// <summary> Should be called when the Object at top changes values. Still log(n) worst
-		/// case, but it's at least twice as fast to
-		/// 
+		/// <summary> Should be called when the Object at top changes values. 
+		/// Still log(n) worst case, but it's at least twice as fast to
         /// <code>
 		/// pq.top().change();
 		/// pq.updateTop();
         /// </code>
-		/// 
 		/// instead of
-		/// 
         /// <code>
 		/// o = pq.pop();
 		/// o.change();
 		/// pq.push(o);
         /// </code>
-		/// 
 		/// </summary>
-		/// <returns> the new 'top' element.
-		/// </returns>
-		public System.Object UpdateTop()
+		/// <returns> the new 'top' element.</returns>
+		public T UpdateTop()
 		{
 			DownHeap();
 			return heap[1];
@@ -294,7 +236,7 @@ namespace Lucene.Net.Util
 		{
 			for (int i = 0; i <= size; i++)
 			{
-				heap[i] = null;
+                heap[i] = default(T);
 			}
 			size = 0;
 		}
@@ -302,13 +244,13 @@ namespace Lucene.Net.Util
 		private void  UpHeap()
 		{
 			int i = size;
-			System.Object node = heap[i]; // save bottom node
-			int j = SupportClass.Number.URShift(i, 1);
+			T node = heap[i]; // save bottom node
+			int j = Number.URShift(i, 1);
 			while (j > 0 && LessThan(node, heap[j]))
 			{
 				heap[i] = heap[j]; // shift parents down
 				i = j;
-				j = SupportClass.Number.URShift(j, 1);
+				j = Number.URShift(j, 1);
 			}
 			heap[i] = node; // install saved node
 		}
@@ -316,7 +258,7 @@ namespace Lucene.Net.Util
 		private void  DownHeap()
 		{
 			int i = 1;
-			System.Object node = heap[i]; // save top node
+			T node = heap[i]; // save top node
 			int j = i << 1; // find smaller child
 			int k = j + 1;
 			if (k <= size && LessThan(heap[k], heap[j]))

Modified: incubator/lucene.net/trunk/src/core/Util/RamUsageEstimator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/RamUsageEstimator.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/RamUsageEstimator.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/RamUsageEstimator.cs Tue Feb 28 22:43:08 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Util
 {
@@ -36,7 +37,7 @@ namespace Lucene.Net.Util
 	{
 		private MemoryModel memoryModel;
 		
-		private System.Collections.IDictionary seen;
+		private IDictionary<object, object> seen;
 		
 		private int refSize;
 		private int arraySize;
@@ -79,7 +80,7 @@ namespace Lucene.Net.Util
 			this.checkInterned = checkInterned;
 			// Use Map rather than Set so that we can use an IdentityHashMap - not
 			// seeing an IdentityHashSet
-            seen = new System.Collections.Hashtable(64);    // {{Aroush-2.9}} Port issue; need to mimic java's IdentityHashMap equals() through C#'s Equals()
+            seen = new IdentityDictionary<object, object>(64);
 			this.refSize = memoryModel.GetReferenceSize();
 			this.arraySize = memoryModel.GetArraySize();
 			this.classSize = memoryModel.GetClassSize();
@@ -108,7 +109,7 @@ namespace Lucene.Net.Util
 			}
 			
 			// skip if we have seen before
-			if (seen.Contains(obj))
+			if (seen.ContainsKey(obj))
 			{
 				return 0;
 			}

Modified: incubator/lucene.net/trunk/src/core/Util/ReaderUtil.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/ReaderUtil.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/ReaderUtil.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/ReaderUtil.cs Tue Feb 28 22:43:08 2012
@@ -16,26 +16,20 @@
  */
 
 using System;
-
+using Lucene.Net.Support;
 using IndexReader = Lucene.Net.Index.IndexReader;
 
 namespace Lucene.Net.Util
 {
-	
-	/// <summary> Common util methods for dealing with <see cref="IndexReader" />s.
-	/// 
+	/// <summary>
+	/// Common util methods for dealing with <see cref="IndexReader" />s.
 	/// </summary>
 	public class ReaderUtil
 	{
-		
-		/// <summary> Gathers sub-readers from reader into a List.
-		/// 
-		/// </summary>
-		/// <param name="allSubReaders">
-		/// </param>
-		/// <param name="reader">
-		/// </param>
-		public static void  GatherSubReaders(System.Collections.IList allSubReaders, IndexReader reader)
+		/// <summary>Gathers sub-readers from reader into a List.</summary>
+		/// <param name="allSubReaders"></param>
+		/// <param name="reader"></param>
+		public static void GatherSubReaders(System.Collections.Generic.IList<IndexReader> allSubReaders, IndexReader reader)
 		{
 			IndexReader[] subReaders = reader.GetSequentialSubReaders();
 			if (subReaders == null)
@@ -63,9 +57,9 @@ namespace Lucene.Net.Util
 		/// </returns>
 		public static IndexReader SubReader(int doc, IndexReader reader)
 		{
-			System.Collections.ArrayList subReadersList = new System.Collections.ArrayList();
+            var subReadersList = new System.Collections.Generic.List<IndexReader>();
 			ReaderUtil.GatherSubReaders(subReadersList, reader);
-			IndexReader[] subReaders = (IndexReader[]) subReadersList.ToArray(typeof(IndexReader));
+			IndexReader[] subReaders = subReadersList.ToArray();
 			int[] docStarts = new int[subReaders.Length];
 			int maxDoc = 0;
 			for (int i = 0; i < subReaders.Length; i++)
@@ -87,9 +81,9 @@ namespace Lucene.Net.Util
 		/// </returns>
 		public static IndexReader SubReader(IndexReader reader, int subIndex)
 		{
-			System.Collections.ArrayList subReadersList = new System.Collections.ArrayList();
+            var subReadersList = new System.Collections.Generic.List<IndexReader>();
 			ReaderUtil.GatherSubReaders(subReadersList, reader);
-			IndexReader[] subReaders = (IndexReader[]) subReadersList.ToArray(typeof(IndexReader));
+			IndexReader[] subReaders = subReadersList.ToArray();
 			return subReaders[subIndex];
 		}
 		
@@ -106,7 +100,7 @@ namespace Lucene.Net.Util
 			int hi = size - 1; // for first element less than n, return its index
 			while (hi >= lo)
 			{
-				int mid = SupportClass.Number.URShift((lo + hi), 1);
+				int mid = Number.URShift((lo + hi), 1);
 				int midValue = docStarts[mid];
 				if (n < midValue)
 					hi = mid - 1;

Modified: incubator/lucene.net/trunk/src/core/Util/ScorerDocQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/ScorerDocQueue.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/ScorerDocQueue.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/ScorerDocQueue.cs Tue Feb 28 22:43:08 2012
@@ -18,7 +18,7 @@
 
 /* Derived from Lucene.Net.Util.PriorityQueue of March 2005 */
 using System;
-
+using Lucene.Net.Support;
 using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
 using Scorer = Lucene.Net.Search.Scorer;
 
@@ -236,12 +236,12 @@ namespace Lucene.Net.Util
 		{
 			int i = size;
 			HeapedScorerDoc node = heap[i]; // save bottom node
-			int j = SupportClass.Number.URShift(i, 1);
+			int j = Number.URShift(i, 1);
 			while ((j > 0) && (node.doc < heap[j].doc))
 			{
 				heap[i] = heap[j]; // shift parents down
 				i = j;
-				j = SupportClass.Number.URShift(j, 1);
+				j = Number.URShift(j, 1);
 			}
 			heap[i] = node; // install saved node
 			topHSD = heap[1];

Modified: incubator/lucene.net/trunk/src/core/Util/SimpleStringInterner.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/SimpleStringInterner.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/SimpleStringInterner.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/SimpleStringInterner.cs Tue Feb 28 22:43:08 2012
@@ -68,7 +68,7 @@ namespace Lucene.Net.Util
 			
 			for (Entry e = first; e != null; e = e.next)
 			{
-				if (e.hash == h && ((System.Object) e.str == (System.Object) s || String.CompareOrdinal(e.str, s) == 0))
+                if (e.hash == h && (ReferenceEquals(e.str, s) || String.CompareOrdinal(e.str, s) == 0))
 				{
 					// if (e.str == s || (e.hash == h && e.str.compareTo(s)==0)) {
 					return e.str;

Modified: incubator/lucene.net/trunk/src/core/Util/SortedVIntList.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/SortedVIntList.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/SortedVIntList.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/SortedVIntList.cs Tue Feb 28 22:43:08 2012
@@ -16,7 +16,7 @@
  */
 
 using System;
-
+using Lucene.Net.Support;
 using DocIdSet = Lucene.Net.Search.DocIdSet;
 using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
 
@@ -69,27 +69,11 @@ namespace Lucene.Net.Util
 				}
 			}
 			
-			/// <deprecated> use <see cref="DocID()" /> instead. 
-			/// </deprecated>
-            [Obsolete("use DocID() instead.")]
-			public override int Doc()
-			{
-				return lastInt;
-			}
-			
 			public override int DocID()
 			{
 				return doc;
 			}
 			
-			/// <deprecated> use <see cref="NextDoc()" /> instead. 
-			/// </deprecated>
-            [Obsolete("use NextDoc() instead.")]
-			public override bool Next()
-			{
-				return NextDoc() != NO_MORE_DOCS;
-			}
-			
 			public override int NextDoc()
 			{
 				if (bytePos >= Enclosing_Instance.lastBytePos)
@@ -104,14 +88,6 @@ namespace Lucene.Net.Util
 				return doc;
 			}
 			
-			/// <deprecated> use <see cref="Advance(int)" /> instead. 
-			/// </deprecated>
-            [Obsolete("use Advance(int) instead.")]
-			public override bool SkipTo(int docNr)
-			{
-				return Advance(docNr) != NO_MORE_DOCS;
-			}
-			
 			public override int Advance(int target)
 			{
 				while (bytePos < Enclosing_Instance.lastBytePos)
@@ -140,7 +116,7 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <param name="sortedInts"> A sorted array of non negative integers.
 		/// </param>
-		public SortedVIntList(int[] sortedInts):this(sortedInts, sortedInts.Length)
+		public SortedVIntList(params int[] sortedInts):this(sortedInts, sortedInts.Length)
 		{
 		}
 		
@@ -165,11 +141,11 @@ namespace Lucene.Net.Util
 		public SortedVIntList(System.Collections.BitArray bits)
 		{
 			SortedVIntListBuilder builder = new SortedVIntListBuilder(this);
-			int nextInt = SupportClass.BitSetSupport.NextSetBit(bits, 0);
+			int nextInt = BitSetSupport.NextSetBit(bits, 0);
 			while (nextInt != - 1)
 			{
 				builder.AddInt(nextInt);
-				nextInt = SupportClass.BitSetSupport.NextSetBit(bits, nextInt + 1);
+				nextInt = BitSetSupport.NextSetBit(bits, nextInt + 1);
 			}
 			builder.Done();
 		}
@@ -250,7 +226,7 @@ namespace Lucene.Net.Util
 				{
 					// The high bit of the next byte needs to be set.
 					Enclosing_Instance.bytes[Enclosing_Instance.lastBytePos++] = (sbyte) ((diff & Lucene.Net.Util.SortedVIntList.VB1) | ~ Lucene.Net.Util.SortedVIntList.VB1);
-					diff = SupportClass.Number.URShift(diff, Lucene.Net.Util.SortedVIntList.BIT_SHIFT);
+					diff = Number.URShift(diff, Lucene.Net.Util.SortedVIntList.BIT_SHIFT);
 				}
 				Enclosing_Instance.bytes[Enclosing_Instance.lastBytePos++] = (sbyte) diff; // Last byte, high bit not set.
 				Enclosing_Instance.size++;

Modified: incubator/lucene.net/trunk/src/core/Util/StringHelper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/StringHelper.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/StringHelper.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/StringHelper.cs Tue Feb 28 22:43:08 2012
@@ -21,10 +21,7 @@ namespace Lucene.Net.Util
 {
 	
 	
-	/// <summary> Methods for manipulating strings.
-	/// 
-	/// $Id: StringHelper.java 801344 2009-08-05 18:05:06Z yonik $
-	/// </summary>
+	/// <summary> Methods for manipulating strings.</summary>
 	public abstract class StringHelper
 	{
 		/// <summary> Expert:

Modified: incubator/lucene.net/trunk/src/core/Util/UnicodeUtil.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/UnicodeUtil.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/UnicodeUtil.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/UnicodeUtil.cs Tue Feb 28 22:43:08 2012
@@ -59,7 +59,7 @@ namespace Lucene.Net.Util
 	/// may suddenly change. <p/>
 	/// </summary>
 	
-	sealed public class UnicodeUtil
+	public static class UnicodeUtil
 	{
 		
 		public const int UNI_SUR_HIGH_START = 0xD800;

Modified: incubator/lucene.net/trunk/src/core/Util/Version.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/Version.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/Version.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/Version.cs Tue Feb 28 22:43:08 2012
@@ -19,7 +19,6 @@ using System;
 
 namespace Lucene.Net.Util
 {
-	
 	/// <summary> Use by certain classes to match version compatibility
 	/// across releases of Lucene.
     ///  <p/>
@@ -28,9 +27,37 @@ namespace Lucene.Net.Util
     ///  change the version at search-time, but instead also adjust
     ///  your indexing code to match, and re-index.
 	/// </summary>
-	[Serializable]
-	public sealed class Version:Parameter
+	public enum Version
 	{
+		/// <summary>Match settings and bugs in Lucene's 2.0 release.</summary>
+		LUCENE_20,
+		
+		/// <summary>Match settings and bugs in Lucene's 2.1 release. </summary>
+		LUCENE_21,
+		
+		/// <summary>Match settings and bugs in Lucene's 2.2 release. </summary>
+		LUCENE_22,
+		
+		/// <summary>Match settings and bugs in Lucene's 2.3 release.</summary>
+		LUCENE_23,
+
+        /// <summary>Match settings and bugs in Lucene's 2.4 release.</summary>
+		LUCENE_24,
+
+        /// <summary>Match settings and bugs in Lucene's 2.9 release.</summary>
+		LUCENE_29,
+
+        /// <summary>
+        /// Match settings and bugs in Lucene's 3.0 release.
+        /// <para>
+        /// Use this to get the latest and greatest settings, bug fixes,
+        /// etc, for Lucene.
+        /// </para>
+        /// </summary>
+        LUCENE_30,
+
+        // NOTE: Add new constants for later versions **here** to respect order!
+		
         /// <summary>
 		/// <p/><b>WARNING</b>: if you use this setting, and then
 		/// upgrade to a newer release of Lucene, sizable changes
@@ -46,39 +73,14 @@ namespace Lucene.Net.Util
         /// in your application.
 		/// </summary>
         [Obsolete("Use an actual version instead.")]
-		public static readonly Version LUCENE_CURRENT = new Version("LUCENE_CURRENT", 0);
-		
-		/// <summary>Match settings and bugs in Lucene's 2.0 release. </summary>
-		public static readonly Version LUCENE_20 = new Version("LUCENE_20", 2000);
-		
-		/// <summary>Match settings and bugs in Lucene's 2.1 release. </summary>
-		public static readonly Version LUCENE_21 = new Version("LUCENE_21", 2100);
-		
-		/// <summary>Match settings and bugs in Lucene's 2.2 release. </summary>
-		public static readonly Version LUCENE_22 = new Version("LUCENE_22", 2200);
-		
-		/// <summary>Match settings and bugs in Lucene's 2.3 release. </summary>
-		public static readonly Version LUCENE_23 = new Version("LUCENE_23", 2300);
-
-        /// <summary>Match settings and bugs in Lucene's 2.3 release. </summary>
-		public static readonly Version LUCENE_24 = new Version("LUCENE_24", 2400);
+		LUCENE_CURRENT,
+	}
 
-        /// <summary>Match settings and bugs in Lucene's 2.3 release. 
-        /// Use this to get the latest and greatest settings, bug
-        /// fixes, etc, for Lucene.
-        /// </summary>
-		public static readonly Version LUCENE_29 = new Version("LUCENE_29", 2900);
-		
-		private int v;
-		
-		public Version(System.String name, int v):base(name)
-		{
-			this.v = v;
-		}
-		
-		public bool OnOrAfter(Version other)
+    public static class VersionEnumExtensions
+    {
+		public static bool OnOrAfter(this Version first, Version other)
 		{
-			return v == 0 || v >= other.v;
+		    return first.CompareTo(other) >= 0;
 		}
-	}
+    }
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/demo/Demo.Common/Demo.Common.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/demo/Demo.Common/Demo.Common.csproj?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/demo/Demo.Common/Demo.Common.csproj (original)
+++ incubator/lucene.net/trunk/src/demo/Demo.Common/Demo.Common.csproj Tue Feb 28 22:43:08 2012
@@ -19,7 +19,6 @@
  under the License.
 
 -->
-
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
@@ -33,8 +32,7 @@
     <AssemblyKeyContainerName>
     </AssemblyKeyContainerName>
     <AssemblyName>Lucene.Net.Demo.Common</AssemblyName>
-    <AssemblyOriginatorKeyFile>
-    </AssemblyOriginatorKeyFile>
+    <AssemblyOriginatorKeyFile>Lucene.Net.snk</AssemblyOriginatorKeyFile>
     <DefaultClientScript>JScript</DefaultClientScript>
     <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
     <DefaultTargetSchema>IE50</DefaultTargetSchema>
@@ -48,7 +46,7 @@
     </FileUpgradeFlags>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
-    <SignAssembly>false</SignAssembly>
+    <SignAssembly>true</SignAssembly>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <OldToolsVersion>2.0</OldToolsVersion>
     <IsWebBootstrapper>false</IsWebBootstrapper>
@@ -165,6 +163,7 @@
       <SubType>Code</SubType>
     </Compile>
     <None Include="HTML\HTMLParser.jj" />
+    <None Include="Lucene.Net.snk" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\core\Lucene.Net.csproj">

Modified: incubator/lucene.net/trunk/src/demo/Demo.Common/FileDocument.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/demo/Demo.Common/FileDocument.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/demo/Demo.Common/FileDocument.cs (original)
+++ incubator/lucene.net/trunk/src/demo/Demo.Common/FileDocument.cs Tue Feb 28 22:43:08 2012
@@ -40,7 +40,7 @@ namespace Lucene.Net.Demo
 		/// <li><code>contents</code>--containing the full contents of the file, as a
 		/// Reader field;
 		/// </summary>
-		public static Document Document(System.IO.FileInfo f)
+		public static Document Document(System.IO.DirectoryInfo f)
 		{
 			
 			// make a new, empty document

Modified: incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/HTMLParser.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/HTMLParser.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/HTMLParser.cs (original)
+++ incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/HTMLParser.cs Tue Feb 28 22:43:08 2012
@@ -18,6 +18,7 @@
 /* Generated By:JavaCC: Do not edit this line. HTMLParser.java */
 
 using System;
+using Lucene.Net.Support;
 
 namespace Lucene.Net.Demo.Html
 {
@@ -167,7 +168,7 @@ namespace Lucene.Net.Demo.Html
 				pipeIn = new System.IO.StreamReader(pipeInStream.BaseStream, System.Text.Encoding.GetEncoding("UTF-16BE"));
 				pipeOut = new System.IO.StreamWriter(pipeOutStream.BaseStream, System.Text.Encoding.GetEncoding("UTF-16BE"));
 				
-				SupportClass.ThreadClass thread = new ParserThread(this);
+				ThreadClass thread = new ParserThread(this);
 				thread.Start(); // start parsing
 			}
 			

Modified: incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParseException.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParseException.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParseException.cs (original)
+++ incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParseException.cs Tue Feb 28 22:43:08 2012
@@ -18,6 +18,7 @@
 /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
 
 using System;
+using Lucene.Net.Support;
 
 namespace Lucene.Net.Demo.Html
 {
@@ -161,7 +162,7 @@ namespace Lucene.Net.Demo.Html
 		public System.String[] tokenImage;
 		
 		/// <summary> The end of line string for this machine.</summary>
-		protected internal System.String eol = SupportClass.AppSettings.Get("line.separator", "\n");
+		protected internal System.String eol = AppSettings.Get("line.separator", "\n");
 		
 		/// <summary> Used to convert raw characters to their escaped version
 		/// when these raw version cannot be used as part of an ASCII

Modified: incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParserThread.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParserThread.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParserThread.cs (original)
+++ incubator/lucene.net/trunk/src/demo/Demo.Common/HTML/ParserThread.cs Tue Feb 28 22:43:08 2012
@@ -16,11 +16,12 @@
  */
 
 using System;
+using Lucene.Net.Support;
 
 namespace Lucene.Net.Demo.Html
 {
 	
-	class ParserThread:SupportClass.ThreadClass
+	class ParserThread:ThreadClass
 	{
 		internal HTMLParser parser;
 		

Propchange: incubator/lucene.net/trunk/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Feb 28 22:43:08 2012
@@ -0,0 +1 @@
+/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test:1199075-1294851

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/AR/TestArabicAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/AR/TestArabicAnalyzer.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/AR/TestArabicAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/AR/TestArabicAnalyzer.cs Tue Feb 28 22:43:08 2012
@@ -23,6 +23,7 @@ using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Util;
 using NUnit.Framework;
+using Version = Lucene.Net.Util.Version;
 
 namespace Lucene.Net.Analysis.AR
 {
@@ -41,7 +42,7 @@ namespace Lucene.Net.Analysis.AR
         [Test]
         public void TestResourcesAvailable()
         {
-            new ArabicAnalyzer();
+            new ArabicAnalyzer(Version.LUCENE_CURRENT);
         }
 
         /**
@@ -50,7 +51,7 @@ namespace Lucene.Net.Analysis.AR
         [Test]
         public void TestBasicFeatures()
         {
-            ArabicAnalyzer a = new ArabicAnalyzer();
+            ArabicAnalyzer a = new ArabicAnalyzer(Version.LUCENE_CURRENT);
             AssertAnalyzesTo(a, "كبير", new String[] { "كبير" });
             AssertAnalyzesTo(a, "كبيرة", new String[] { "كبير" }); // feminine marker
 
@@ -73,7 +74,7 @@ namespace Lucene.Net.Analysis.AR
         [Test]
         public void TestReusableTokenStream()
         {
-            ArabicAnalyzer a = new ArabicAnalyzer();
+            ArabicAnalyzer a = new ArabicAnalyzer(Version.LUCENE_CURRENT);
             AssertAnalyzesToReuse(a, "كبير", new String[] { "كبير" });
             AssertAnalyzesToReuse(a, "كبيرة", new String[] { "كبير" }); // feminine marker
         }
@@ -84,7 +85,7 @@ namespace Lucene.Net.Analysis.AR
         [Test]
         public void TestEnglishInput()
         {
-            AssertAnalyzesTo(new ArabicAnalyzer(), "English text.", new String[] {
+            AssertAnalyzesTo(new ArabicAnalyzer(Version.LUCENE_CURRENT), "English text.", new String[] {
         "english", "text" });
         }
 
@@ -94,7 +95,7 @@ namespace Lucene.Net.Analysis.AR
         [Test]
         public void TestCustomStopwords()
         {
-            ArabicAnalyzer a = new ArabicAnalyzer(new String[] { "the", "and", "a" });
+            ArabicAnalyzer a = new ArabicAnalyzer(Version.LUCENE_CURRENT, new String[] { "the", "and", "a" });
             AssertAnalyzesTo(a, "The quick brown fox.", new String[] { "quick", "brown", "fox" });
         }
     }

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Contrib.Analyzers.Test.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Contrib.Analyzers.Test.csproj?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Contrib.Analyzers.Test.csproj (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Contrib.Analyzers.Test.csproj Tue Feb 28 22:43:08 2012
@@ -19,7 +19,6 @@
  under the License.
 
 -->
-
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -75,6 +74,9 @@
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>
   </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>Lucene.Net.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="nunit.framework">
       <HintPath>..\..\..\lib\NUnit.org\NUnit\2.5.9\bin\net-2.0\framework\nunit.framework.dll</HintPath>
@@ -85,16 +87,43 @@
     <Compile Include="AR\TestArabicAnalyzer.cs" />
     <Compile Include="AR\TestArabicNormalizationFilter.cs" />
     <Compile Include="AR\TestArabicStemFilter.cs" />
-    <Compile Include="Miscellaneous\TestPrefixAndSuffixAwareTokenFilter.cs" />
-    <Compile Include="Miscellaneous\TestPrefixAwareTokenFilter.cs" />
+    <Compile Include="Br\TestBrazilianStemmer.cs" />
+    <Compile Include="Cjk\TestCJKTokenizer.cs" />
+    <Compile Include="Cn\TestChineseTokenizer.cs" />
+    <Compile Include="Compound\TestCompoundWordTokenFilter.cs" />
+    <Compile Include="Cz\TestCzechAnalyzer.cs" />
+    <Compile Include="De\TestGermanStemFilter.cs" />
+    <Compile Include="El\GreekAnalyzerTest.cs" />
+    <Compile Include="Fa\TestPersianAnalyzer.cs" />
+    <Compile Include="Fr\TestElision.cs" />
+    <Compile Include="Fr\TestFrenchAnalyzer.cs" />
     <Compile Include="NGram\TestEdgeNGramTokenFilter.cs" />
     <Compile Include="NGram\TestEdgeNGramTokenizer.cs" />
+    <Compile Include="Miscellaneous\PatternAnalyzerTest.cs" />
+    <Compile Include="Miscellaneous\TestEmptyTokenStream.cs" />
+    <Compile Include="Miscellaneous\TestPrefixAndSuffixAwareTokenFilter.cs" />
+    <Compile Include="Miscellaneous\TestPrefixAwareTokenFilter.cs" />
+    <Compile Include="Miscellaneous\TestSingleTokenTokenFilter.cs" />
     <Compile Include="NGram\TestNGramTokenFilter.cs" />
     <Compile Include="NGram\TestNGramTokenizer.cs" />
+    <Compile Include="Nl\TestDutchStemmer.cs" />
+    <Compile Include="Payloads\DelimitedPayloadTokenFilterTest.cs" />
+    <Compile Include="Payloads\NumericPayloadTokenFilterTest.cs" />
+    <Compile Include="Payloads\TokenOffsetPayloadTokenFilterTest.cs" />
+    <Compile Include="Payloads\TypeAsPayloadTokenFilterTest.cs" />
+    <Compile Include="Position\PositionFilterTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Query\QueryAutoStopWordAnalyzerTest.cs" />
+    <Compile Include="Reverse\TestReverseStringFilter.cs" />
+    <Compile Include="Ru\TestRussianAnalyzer.cs" />
+    <Compile Include="Ru\TestRussianStem.cs" />
     <Compile Include="Shingle\ShingleAnalyzerWrapperTest.cs" />
     <Compile Include="Shingle\ShingleFilterTest.cs" />
     <Compile Include="Shingle\TestShingleMatrixFilter.cs" />
+    <Compile Include="Sinks\DateRecognizerSinkTokenizerTest.cs" />
+    <Compile Include="Sinks\TokenRangeSinkTokenizerTest.cs" />
+    <Compile Include="Sinks\TokenTypeSinkTokenizerTest.cs" />
+    <Compile Include="Th\TestThaiAnalyzer.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\..\src\contrib\Analyzers\Contrib.Analyzers.csproj">
@@ -132,6 +161,35 @@
       <Install>true</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="Cz\customStopWordFile.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="De\data.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Compile Include="Fa\TestPersianNormalizationFilter.cs" />
+    <Content Include="Nl\customStemDict.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="PortedTests.txt" />
+    <Content Include="Ru\resUTF8.htm">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Ru\stemsUTF8.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Ru\testUTF8.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Ru\wordsUTF8.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Lucene.Net.snk" />
+  </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestPrefixAndSuffixAwareTokenFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestPrefixAndSuffixAwareTokenFilter.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestPrefixAndSuffixAwareTokenFilter.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestPrefixAndSuffixAwareTokenFilter.cs Tue Feb 28 22:43:08 2012
@@ -22,6 +22,7 @@ using NUnit.Framework;
 
 namespace Lucene.Net.Analyzers.Miscellaneous
 {
+    [TestFixture]
     public class TestPrefixAndSuffixAwareTokenFilter : BaseTokenStreamTestCase
     {
         [Test]

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/NGram/TestEdgeNGramTokenFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/NGram/TestEdgeNGramTokenFilter.cs?rev=1294875&r1=1294874&r2=1294875&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/NGram/TestEdgeNGramTokenFilter.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/NGram/TestEdgeNGramTokenFilter.cs Tue Feb 28 22:43:08 2012
@@ -1,44 +1,24 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
+using System;
+using System.Collections.Generic;
 using System.IO;
-using System.Collections;
-
+using System.Linq;
+using System.Text;
 using Lucene.Net.Analysis;
-using Lucene.Net.Analysis.Tokenattributes;
-using Lucene.Net.Util;
+using Lucene.Net.Analysis.NGram;
 using NUnit.Framework;
 
-namespace Lucene.Net.Analysis.NGram
+namespace Lucene.Net.Analyzers.Miscellaneous
 {
-
     /**
      * Tests {@link EdgeNGramTokenFilter} for correctness.
      */
     [TestFixture]
-    public class TestEdgeNGramTokenFilter : BaseTokenStreamTestCase
+    public class EdgeNGramTokenFilterTest : BaseTokenStreamTestCase
     {
         private TokenStream input;
 
-        [SetUp]
-        public void SetUp()
+        public override void SetUp()
         {
-            base.SetUp();
             input = new WhitespaceTokenizer(new StringReader("abcde"));
         }
 
@@ -48,13 +28,13 @@ namespace Lucene.Net.Analysis.NGram
             bool gotException = false;
             try
             {
-                new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 0, 0);
+                new EdgeNGramTokenFilter(input, Side.FRONT, 0, 0);
             }
-            catch (System.ArgumentException e)
+            catch (ArgumentException e)
             {
                 gotException = true;
             }
-            Assert.IsTrue(gotException);
+            Assert.True(gotException);
         }
 
         [Test]
@@ -63,13 +43,13 @@ namespace Lucene.Net.Analysis.NGram
             bool gotException = false;
             try
             {
-                new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 2, 1);
+                new EdgeNGramTokenFilter(input, Side.FRONT, 2, 1);
             }
-            catch (System.ArgumentException e)
+            catch (ArgumentException e)
             {
                 gotException = true;
             }
-            Assert.IsTrue(gotException);
+            Assert.True(gotException);
         }
 
         [Test]
@@ -78,47 +58,47 @@ namespace Lucene.Net.Analysis.NGram
             bool gotException = false;
             try
             {
-                new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, -1, 2);
+                new EdgeNGramTokenFilter(input, Side.FRONT, -1, 2);
             }
-            catch (System.ArgumentException e)
+            catch (ArgumentException e)
             {
                 gotException = true;
             }
-            Assert.IsTrue(gotException);
+            Assert.True(gotException);
         }
 
         [Test]
         public void TestFrontUnigram()
         {
-            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 1, 1);
+            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, Side.FRONT, 1, 1);
             AssertTokenStreamContents(tokenizer, new String[] { "a" }, new int[] { 0 }, new int[] { 1 });
         }
 
         [Test]
         public void TestBackUnigram()
         {
-            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.BACK, 1, 1);
+            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, Side.BACK, 1, 1);
             AssertTokenStreamContents(tokenizer, new String[] { "e" }, new int[] { 4 }, new int[] { 5 });
         }
 
         [Test]
         public void TestOversizedNgrams()
         {
-            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 6, 6);
+            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, Side.FRONT, 6, 6);
             AssertTokenStreamContents(tokenizer, new String[0], new int[0], new int[0]);
         }
 
         [Test]
         public void TestFrontRangeOfNgrams()
         {
-            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 1, 3);
+            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, Side.FRONT, 1, 3);
             AssertTokenStreamContents(tokenizer, new String[] { "a", "ab", "abc" }, new int[] { 0, 0, 0 }, new int[] { 1, 2, 3 });
         }
 
         [Test]
         public void TestBackRangeOfNgrams()
         {
-            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.BACK, 1, 3);
+            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, Side.BACK, 1, 3);
             AssertTokenStreamContents(tokenizer, new String[] { "e", "de", "cde" }, new int[] { 4, 3, 2 }, new int[] { 5, 5, 5 });
         }
 
@@ -126,7 +106,7 @@ namespace Lucene.Net.Analysis.NGram
         public void TestSmallTokenInStream()
         {
             input = new WhitespaceTokenizer(new StringReader("abc de fgh"));
-            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 3, 3);
+            EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, Side.FRONT, 3, 3);
             AssertTokenStreamContents(tokenizer, new String[] { "abc", "fgh" }, new int[] { 0, 7 }, new int[] { 3, 10 });
         }
 
@@ -134,7 +114,7 @@ namespace Lucene.Net.Analysis.NGram
         public void TestReset()
         {
             WhitespaceTokenizer tokenizer = new WhitespaceTokenizer(new StringReader("abcde"));
-            EdgeNGramTokenFilter filter = new EdgeNGramTokenFilter(tokenizer, EdgeNGramTokenFilter.Side.FRONT, 1, 3);
+            EdgeNGramTokenFilter filter = new EdgeNGramTokenFilter(tokenizer, Side.FRONT, 1, 3);
             AssertTokenStreamContents(filter, new String[] { "a", "ab", "abc" }, new int[] { 0, 0, 0 }, new int[] { 1, 2, 3 });
             tokenizer.Reset(new StringReader("abcde"));
             AssertTokenStreamContents(filter, new String[] { "a", "ab", "abc" }, new int[] { 0, 0, 0 }, new int[] { 1, 2, 3 });