You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/06/06 00:12:01 UTC
[28/48] lucenenet git commit: Lucene.Net.Util: Fixed XML
Documentation comments, types beginning with H-Z
Lucene.Net.Util: Fixed XML Documentation comments, types beginning with H-Z
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/268e78d4
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/268e78d4
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/268e78d4
Branch: refs/heads/master
Commit: 268e78d421ba86810646029fddf90c966bf24be5
Parents: dd55920
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jun 4 23:12:03 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Mon Jun 5 06:16:23 2017 +0700
----------------------------------------------------------------------
CONTRIBUTING.md | 4 +-
src/Lucene.Net/Util/IOUtils.cs | 145 ++++++------
src/Lucene.Net/Util/InPlaceMergeSorter.cs | 15 +-
.../Util/IndexableBinaryStringTools.cs | 118 +++++-----
src/Lucene.Net/Util/InfoStream.cs | 26 ++-
src/Lucene.Net/Util/IntBlockPool.cs | 83 +++----
src/Lucene.Net/Util/IntroSorter.cs | 19 +-
src/Lucene.Net/Util/IntsRef.cs | 39 ++--
src/Lucene.Net/Util/LongBitSet.cs | 52 ++---
src/Lucene.Net/Util/LongValues.cs | 16 +-
src/Lucene.Net/Util/LongsRef.cs | 37 +--
src/Lucene.Net/Util/MapOfSets.cs | 30 +--
src/Lucene.Net/Util/MathUtil.cs | 68 +++---
src/Lucene.Net/Util/MergedIterator.cs | 135 ++---------
src/Lucene.Net/Util/MutableBits.cs | 6 +-
src/Lucene.Net/Util/NumericUtils.cs | 199 ++++++++--------
src/Lucene.Net/Util/OfflineSorter.cs | 100 ++++----
src/Lucene.Net/Util/OpenBitSet.cs | 229 ++++++++++---------
src/Lucene.Net/Util/OpenBitSetDISI.cs | 22 +-
src/Lucene.Net/Util/OpenBitSetIterator.cs | 48 ++--
src/Lucene.Net/Util/PForDeltaDocIdSet.cs | 20 +-
src/Lucene.Net/Util/PagedBytes.cs | 68 +++---
src/Lucene.Net/Util/PrintStreamInfoStream.cs | 8 +-
src/Lucene.Net/Util/PriorityQueue.cs | 117 +++++-----
src/Lucene.Net/Util/QueryBuilder.cs | 152 ++++++------
src/Lucene.Net/Util/RamUsageEstimator.cs | 103 +++++----
.../Util/RecyclingByteBlockAllocator.cs | 41 ++--
.../Util/RecyclingIntBlockAllocator.cs | 31 ++-
src/Lucene.Net/Util/RollingBuffer.cs | 23 +-
src/Lucene.Net/Util/SPIClassIterator.cs | 5 +-
src/Lucene.Net/Util/SentinelIntSet.cs | 32 +--
src/Lucene.Net/Util/SetOnce.cs | 3 +
src/Lucene.Net/Util/SloppyMath.cs | 30 +--
src/Lucene.Net/Util/SmallFloat.cs | 24 +-
src/Lucene.Net/Util/Sorter.cs | 13 +-
src/Lucene.Net/Util/StringHelper.cs | 46 ++--
src/Lucene.Net/Util/TimSorter.cs | 50 ++--
src/Lucene.Net/Util/ToStringUtils.cs | 4 +-
src/Lucene.Net/Util/UnicodeUtil.cs | 84 ++++---
src/Lucene.Net/Util/Version.cs | 12 +-
src/Lucene.Net/Util/WAH8DocIdSet.cs | 94 ++++----
src/Lucene.Net/Util/WeakIdentityMap.cs | 92 ++++----
42 files changed, 1208 insertions(+), 1235 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cec7578..9fb8f3c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,7 +53,9 @@ helpers to help with that, see for examples see our [Java style methods to avoid
1. Lucene.Net.Core (project)
1. Codecs (namespace)
2. Support (namespace)
- 3. Util (namespace) Types starting with I-Z, Util.Automaton, Util.Mutable, and Util.Packed.
+ 3. Util.Automaton (namespace)
+ 4. Util.Mutable (namespace)
+ 5. Util.Packed (namespace)
2. Lucene.Net.Codecs (project)
See [Documenting Lucene.Net](https://cwiki.apache.org/confluence/display/LUCENENET/Documenting+Lucene.Net) for instructions.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/IOUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IOUtils.cs b/src/Lucene.Net/Util/IOUtils.cs
index 380f54c..87049da 100644
--- a/src/Lucene.Net/Util/IOUtils.cs
+++ b/src/Lucene.Net/Util/IOUtils.cs
@@ -28,24 +28,24 @@ namespace Lucene.Net.Util
using Directory = Lucene.Net.Store.Directory;
/// <summary>
- /// this class emulates the new Java 7 "Try-With-Resources" statement.
+ /// This class emulates the new Java 7 "Try-With-Resources" statement.
/// Remove once Lucene is on Java 7.
+ /// <para/>
/// @lucene.internal
/// </summary>
[ExceptionToClassNameConvention]
public sealed class IOUtils
{
/// <summary>
- /// UTF-8 <seealso cref="Charset"/> instance to prevent repeated
- /// <seealso cref="Charset#forName(String)"/> lookups </summary>
- /// @deprecated Use <seealso cref="StandardCharsets#UTF_8"/> instead.
+ /// UTF-8 <see cref="Encoding"/> instance to prevent repeated
+ /// <see cref="Encoding.UTF8"/> lookups </summary>
[Obsolete("Use Encoding.UTF8 instead.")]
public static readonly Encoding CHARSET_UTF_8 = Encoding.UTF8;
/// <summary>
/// UTF-8 charset string.
/// <para/>Where possible, use <see cref="Encoding.UTF8"/> instead,
- /// as using the String constant may slow things down. </summary>
+ /// as using the <see cref="string"/> constant may slow things down. </summary>
/// <seealso cref="Encoding.UTF8"/>
public static readonly string UTF_8 = "UTF-8";
@@ -54,26 +54,32 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// <p>Closes all given <tt>IDisposable</tt>s, suppressing all thrown exceptions. Some of the <tt>IDisposable</tt>s
- /// may be null, they are ignored. After everything is closed, method either throws <tt>priorException</tt>,
- /// if one is supplied, or the first of suppressed exceptions, or completes normally.</p>
- /// <p>Sample usage:<br/>
- /// <pre class="prettyprint">
+ /// <para>Disposes all given <c>IDisposable</c>s, suppressing all thrown exceptions. Some of the <c>IDisposable</c>s
+ /// may be <c>null</c>, they are ignored. After everything is disposed, method either throws <paramref name="priorException"/>,
+ /// if one is supplied, or the first of suppressed exceptions, or completes normally.</para>
+ /// <para>Sample usage:
+ /// <code>
/// IDisposable resource1 = null, resource2 = null, resource3 = null;
/// ExpectedException priorE = null;
- /// try {
- /// resource1 = ...; resource2 = ...; resource3 = ...; // Acquisition may throw ExpectedException
- /// ..do..stuff.. // May throw ExpectedException
- /// } catch (ExpectedException e) {
- /// priorE = e;
- /// } finally {
- /// closeWhileHandlingException(priorE, resource1, resource2, resource3);
+ /// try
+ /// {
+ /// resource1 = ...; resource2 = ...; resource3 = ...; // Acquisition may throw ExpectedException
+ /// ..do..stuff.. // May throw ExpectedException
+ /// }
+ /// catch (ExpectedException e)
+ /// {
+ /// priorE = e;
+ /// }
+ /// finally
+ /// {
+ /// CloseWhileHandlingException(priorE, resource1, resource2, resource3);
/// }
- /// </pre>
- /// </p> </summary>
- /// <param name="priorException"> <tt>null</tt> or an exception that will be rethrown after method completion </param>
- /// <param name="objects"> objects to call <tt>close()</tt> on </param>
- public static void CloseWhileHandlingException(Exception priorException, params IDisposable[] objects)
+ /// </code>
+ /// </para>
+ /// </summary>
+ /// <param name="priorException"> <c>null</c> or an exception that will be rethrown after method completion. </param>
+ /// <param name="objects"> Objects to call <see cref="IDisposable.Dispose()"/> on. </param>
+ public static void CloseWhileHandlingException(Exception priorException, params IDisposable[] objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
{
Exception th = null;
@@ -107,9 +113,9 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Closes all given <tt>IDisposable</tt>s, suppressing all thrown exceptions. </summary>
- /// <seealso> cref= #closeWhileHandlingException(Exception, IDisposable...) </seealso>
- public static void CloseWhileHandlingException(Exception priorException, IEnumerable<IDisposable> objects)
+ /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions. </summary>
+ /// <seealso cref="CloseWhileHandlingException(Exception, IDisposable[])"/>
+ public static void CloseWhileHandlingException(Exception priorException, IEnumerable<IDisposable> objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
{
Exception th = null;
@@ -143,15 +149,15 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Closes all given <tt>IDisposable</tt>s. Some of the
- /// <tt>IDisposable</tt>s may be null; they are
+ /// Disposes all given <see cref="IDisposable"/>s. Some of the
+ /// <see cref="IDisposable"/>s may be <c>null</c>; they are
/// ignored. After everything is closed, the method either
/// throws the first exception it hit while closing, or
/// completes normally if there were no exceptions.
/// </summary>
/// <param name="objects">
- /// objects to call <tt>close()</tt> on </param>
- public static void Close(params IDisposable[] objects)
+ /// Objects to call <see cref="IDisposable.Dispose()"/> on </param>
+ public static void Close(params IDisposable[] objects) // LUCENENET TODO: API rename Dispose()
{
Exception th = null;
@@ -178,9 +184,9 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Closes all given <tt>IDisposable</tt>s. </summary>
- /// <seealso cref= #close(IDisposable...) </seealso>
- public static void Close(IEnumerable<IDisposable> objects)
+ /// Disposes all given <see cref="IDisposable"/>s. </summary>
+ /// <seealso cref="Close(IDisposable[])"/>
+ public static void Close(IEnumerable<IDisposable> objects) // LUCENENET TODO: API rename Dispose()
{
Exception th = null;
@@ -207,12 +213,12 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Closes all given <tt>IDisposable</tt>s, suppressing all thrown exceptions.
- /// Some of the <tt>IDisposable</tt>s may be null, they are ignored.
+ /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions.
+ /// Some of the <see cref="IDisposable"/>s may be <c>null</c>, they are ignored.
/// </summary>
/// <param name="objects">
- /// objects to call <tt>close()</tt> on </param>
- public static void CloseWhileHandlingException(params IDisposable[] objects)
+ /// Objects to call <see cref="IDisposable.Dispose()"/> on </param>
+ public static void CloseWhileHandlingException(params IDisposable[] objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
{
foreach (var o in objects)
{
@@ -231,9 +237,9 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Closes all given <tt>IDisposable</tt>s, suppressing all thrown exceptions. </summary>
- /// <seealso cref= #closeWhileHandlingException(IDisposable...) </seealso>
- public static void CloseWhileHandlingException(IEnumerable<IDisposable> objects)
+ /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions. </summary>
+ /// <seealso cref="CloseWhileHandlingException(IDisposable[])"/>
+ public static void CloseWhileHandlingException(IEnumerable<IDisposable> objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
{
foreach (IDisposable @object in objects)
{
@@ -270,33 +276,33 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Wrapping the given <seealso cref="InputStream"/> in a reader using a <seealso cref="CharsetDecoder"/>.
+ /// Wrapping the given <see cref="Stream"/> in a reader using a <see cref="Encoding"/>.
/// Unlike Java's defaults this reader will throw an exception if your it detects
- /// the read charset doesn't match the expected <seealso cref="Charset"/>.
- /// <p>
+ /// the read charset doesn't match the expected <see cref="Encoding"/>.
+ /// <para/>
/// Decoding readers are useful to load configuration files, stopword lists or synonym files
/// to detect character set problems. However, its not recommended to use as a common purpose
/// reader.
/// </summary>
- /// <param name="stream"> the stream to wrap in a reader </param>
- /// <param name="charSet"> the expected charset </param>
- /// <returns> a wrapping reader </returns>
+ /// <param name="stream"> The stream to wrap in a reader </param>
+ /// <param name="charSet"> The expected charset </param>
+ /// <returns> A wrapping reader </returns>
public static TextReader GetDecodingReader(Stream stream, Encoding charSet)
{
return new StreamReader(stream, charSet);
}
/// <summary>
- /// Opens a TextReader for the given <seealso cref="File"/> using a <seealso cref="CharsetDecoder"/>.
+ /// Opens a <see cref="TextReader"/> for the given <see cref="FileInfo"/> using a <see cref="Encoding"/>.
/// Unlike Java's defaults this reader will throw an exception if your it detects
- /// the read charset doesn't match the expected <seealso cref="Charset"/>.
- /// <p>
+ /// the read charset doesn't match the expected <see cref="Encoding"/>.
+ /// <para/>
/// Decoding readers are useful to load configuration files, stopword lists or synonym files
/// to detect character set problems. However, its not recommended to use as a common purpose
/// reader. </summary>
- /// <param name="file"> the file to open a reader on </param>
- /// <param name="charSet"> the expected charset </param>
- /// <returns> a reader to read the given file </returns>
+ /// <param name="file"> The file to open a reader on </param>
+ /// <param name="charSet"> The expected charset </param>
+ /// <returns> A reader to read the given file </returns>
public static TextReader GetDecodingReader(FileInfo file, Encoding charSet)
{
FileStream stream = null;
@@ -318,18 +324,17 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Opens a TextReader for the given resource using a <seealso cref="CharsetDecoder"/>.
+ /// Opens a <see cref="TextReader"/> for the given resource using a <see cref="Encoding"/>.
/// Unlike Java's defaults this reader will throw an exception if your it detects
- /// the read charset doesn't match the expected <seealso cref="Charset"/>.
- /// <p>
+ /// the read charset doesn't match the expected <see cref="Encoding"/>.
+ /// <para/>
/// Decoding readers are useful to load configuration files, stopword lists or synonym files
/// to detect character set problems. However, its not recommended to use as a common purpose
/// reader. </summary>
- /// <param name="clazz"> the class used to locate the resource </param>
- /// <param name="resource"> the resource name to load </param>
- /// <param name="charSet"> the expected charset </param>
- /// <returns> a reader to read the given file
- /// </returns>
+ /// <param name="clazz"> The class used to locate the resource </param>
+ /// <param name="resource"> The resource name to load </param>
+ /// <param name="charSet"> The expected charset </param>
+ /// <returns> A reader to read the given file </returns>
public static TextReader GetDecodingReader(Type clazz, string resource, Encoding charSet)
{
Stream stream = null;
@@ -351,9 +356,9 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Deletes all given files, suppressing all thrown IOExceptions.
- /// <p>
- /// Note that the files should not be null.
+ /// Deletes all given files, suppressing all thrown <see cref="Exception"/>s.
+ /// <para/>
+ /// Note that the files should not be <c>null</c>.
/// </summary>
public static void DeleteFilesIgnoringExceptions(Directory dir, params string[] files)
{
@@ -398,9 +403,9 @@ namespace Lucene.Net.Util
/// <summary>
/// Simple utilty method that takes a previously caught
- /// {@code Throwable} and rethrows either {@code
- /// IOException} or an unchecked exception. If the
- /// argument is null then this method does nothing.
+ /// <see cref="Exception"/> and rethrows either
+ /// <see cref="IOException"/> or an unchecked exception. If the
+ /// argument is <c>null</c> then this method does nothing.
/// </summary>
public static void ReThrow(Exception th)
{
@@ -416,12 +421,12 @@ namespace Lucene.Net.Util
/// <summary>
/// Simple utilty method that takes a previously caught
- /// {@code Throwable} and rethrows it as an unchecked exception.
- /// If the argument is null then this method does nothing.
+ /// <see cref="Exception"/> and rethrows it as an unchecked exception.
+ /// If the argument is <c>null</c> then this method does nothing.
/// </summary>
public static void ReThrowUnchecked(Exception th)
{
- if (th != null)
+ if (th != null) // LUCENENET TODO: BUG - In Lucene we throw a new exception type in some cases which may not be caught in a different layer
{
throw th;
}
@@ -429,8 +434,8 @@ namespace Lucene.Net.Util
/// <summary>
/// Ensure that any writes to the given file is written to the storage device that contains it. </summary>
- /// <param name="fileToSync"> the file to fsync </param>
- /// <param name="isDir"> if true, the given file is a directory (we open for read and ignore IOExceptions,
+ /// <param name="fileToSync"> The file to fsync </param>
+ /// <param name="isDir"> If <c>true</c>, the given file is a directory (we open for read and ignore <see cref="IOException"/>s,
/// because not all file systems and operating systems allow to fsync on a directory) </param>
public static void Fsync(string fileToSync, bool isDir)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/InPlaceMergeSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/InPlaceMergeSorter.cs b/src/Lucene.Net/Util/InPlaceMergeSorter.cs
index 14c578b..31bda95 100644
--- a/src/Lucene.Net/Util/InPlaceMergeSorter.cs
+++ b/src/Lucene.Net/Util/InPlaceMergeSorter.cs
@@ -18,19 +18,24 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// <seealso cref="Sorter"/> implementation based on the merge-sort algorithm that merges
- /// in place (no extra memory will be allocated). Small arrays are sorted with
- /// insertion sort.
- /// @lucene.internal
+ /// <see cref="Sorter"/> implementation based on the merge-sort algorithm that merges
+ /// in place (no extra memory will be allocated). Small arrays are sorted with
+ /// insertion sort.
+ /// <para/>
+ /// @lucene.internal
/// </summary>
public abstract class InPlaceMergeSorter : Sorter
{
/// <summary>
- /// Create a new <seealso cref="InPlaceMergeSorter"/> </summary>
+ /// Create a new <see cref="InPlaceMergeSorter"/> </summary>
public InPlaceMergeSorter()
{
}
+ /// <summary>
+ /// Sort the slice which starts at <paramref name="from"/> (inclusive) and ends at
+ /// <paramref name="to"/> (exclusive).
+ /// </summary>
public override sealed void Sort(int from, int to)
{
CheckRange(from, to);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/IndexableBinaryStringTools.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IndexableBinaryStringTools.cs b/src/Lucene.Net/Util/IndexableBinaryStringTools.cs
index aad4d03..efb1182 100644
--- a/src/Lucene.Net/Util/IndexableBinaryStringTools.cs
+++ b/src/Lucene.Net/Util/IndexableBinaryStringTools.cs
@@ -21,27 +21,25 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// Provides support for converting byte sequences to Strings and back again.
- /// The resulting Strings preserve the original byte sequences' sort order.
- /// <p/>
- /// The Strings are constructed using a Base 8000h encoding of the original
- /// binary data - each char of an encoded String represents a 15-bit chunk
+ /// Provides support for converting byte sequences to <see cref="string"/>s and back again.
+ /// The resulting <see cref="string"/>s preserve the original byte sequences' sort order.
+ /// <para/>
+ /// The <see cref="string"/>s are constructed using a Base 8000h encoding of the original
+ /// binary data - each char of an encoded <see cref="string"/> represents a 15-bit chunk
/// from the byte sequence. Base 8000h was chosen because it allows for all
/// lower 15 bits of char to be used without restriction; the surrogate range
/// [U+D8000-U+DFFF] does not represent valid chars, and would require
/// complicated handling to avoid them and allow use of char's high bit.
- /// <p/>
+ /// <para/>
/// Although unset bits are used as padding in the final char, the original
/// byte sequence could contain trailing bytes with no set bits (null bytes):
/// padding is indistinguishable from valid information. To overcome this
/// problem, a char is appended, indicating the number of encoded bytes in the
/// final content char.
- /// <p/>
- ///
- /// @lucene.experimental </summary>
- /// @deprecated Implement <seealso cref="ITermToBytesRefAttribute"/> and store bytes directly
- /// instead. this class will be removed in Lucene 5.0
- [Obsolete("Implement ITermToBytesRefAttribute and store bytes directly")]
+ /// <para/>
+ /// @lucene.experimental
+ /// </summary>
+ [Obsolete("Implement Analysis.TokenAttributes.ITermToBytesRefAttribute and store bytes directly instead. this class will be removed in Lucene 5.0")]
public sealed class IndexableBinaryStringTools
{
private static readonly CodingCase[] CODING_CASES = new CodingCase[] {
@@ -63,12 +61,12 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns the number of chars required to encode the given bytes.
+ /// Returns the number of chars required to encode the given <see cref="byte"/>s.
/// </summary>
- /// <param name="inputArray"> byte sequence to be encoded </param>
- /// <param name="inputOffset"> initial offset into inputArray </param>
- /// <param name="inputLength"> number of bytes in inputArray </param>
- /// <returns> The number of chars required to encode the number of bytes. </returns>
+ /// <param name="inputArray"> Byte sequence to be encoded </param>
+ /// <param name="inputOffset"> Initial offset into <paramref name="inputArray"/> </param>
+ /// <param name="inputLength"> Number of bytes in <paramref name="inputArray"/> </param>
+ /// <returns> The number of chars required to encode the number of <see cref="byte"/>s. </returns>
// LUCENENET specific overload for CLS compliance
public static int GetEncodedLength(byte[] inputArray, int inputOffset, int inputLength)
{
@@ -77,12 +75,12 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns the number of chars required to encode the given sbytes.
+ /// Returns the number of chars required to encode the given <see cref="sbyte"/>s.
/// </summary>
- /// <param name="inputArray"> sbyte sequence to be encoded </param>
- /// <param name="inputOffset"> initial offset into inputArray </param>
- /// <param name="inputLength"> number of sbytes in inputArray </param>
- /// <returns> The number of chars required to encode the number of sbytes. </returns>
+ /// <param name="inputArray"> <see cref="sbyte"/> sequence to be encoded </param>
+ /// <param name="inputOffset"> Initial offset into <paramref name="inputArray"/> </param>
+ /// <param name="inputLength"> Number of sbytes in <paramref name="inputArray"/> </param>
+ /// <returns> The number of chars required to encode the number of <see cref="sbyte"/>s. </returns>
[CLSCompliant(false)]
public static int GetEncodedLength(sbyte[] inputArray, int inputOffset, int inputLength)
{
@@ -91,12 +89,12 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns the number of bytes required to decode the given char sequence.
+ /// Returns the number of <see cref="byte"/>s required to decode the given char sequence.
/// </summary>
- /// <param name="encoded"> char sequence to be decoded </param>
- /// <param name="offset"> initial offset </param>
- /// <param name="length"> number of characters </param>
- /// <returns> The number of bytes required to decode the given char sequence </returns>
+ /// <param name="encoded"> Char sequence to be decoded </param>
+ /// <param name="offset"> Initial offset </param>
+ /// <param name="length"> Number of characters </param>
+ /// <returns> The number of <see cref="byte"/>s required to decode the given char sequence </returns>
public static int GetDecodedLength(char[] encoded, int offset, int length)
{
int numChars = length - 1;
@@ -114,16 +112,16 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Encodes the input sbyte sequence into the output char sequence. Before
+ /// Encodes the input <see cref="byte"/> sequence into the output char sequence. Before
/// calling this method, ensure that the output array has sufficient
- /// capacity by calling <seealso cref="#getEncodedLength(byte[], int, int)"/>.
+ /// capacity by calling <see cref="GetEncodedLength(byte[], int, int)"/>.
/// </summary>
- /// <param name="inputArray"> sbyte sequence to be encoded </param>
- /// <param name="inputOffset"> initial offset into inputArray </param>
- /// <param name="inputLength"> number of bytes in inputArray </param>
- /// <param name="outputArray"> char sequence to store encoded result </param>
- /// <param name="outputOffset"> initial offset into outputArray </param>
- /// <param name="outputLength"> length of output, must be getEncodedLength </param>
+ /// <param name="inputArray"> <see cref="byte"/> sequence to be encoded </param>
+ /// <param name="inputOffset"> Initial offset into <paramref name="inputArray"/> </param>
+ /// <param name="inputLength"> Number of bytes in <paramref name="inputArray"/> </param>
+ /// <param name="outputArray"> <see cref="char"/> sequence to store encoded result </param>
+ /// <param name="outputOffset"> Initial offset into outputArray </param>
+ /// <param name="outputLength"> Length of output, must be GetEncodedLength(inputArray, inputOffset, inputLength) </param>
// LUCENENET specific overload for CLS compliance
public static void Encode(byte[] inputArray, int inputOffset, int inputLength, char[] outputArray, int outputOffset, int outputLength)
{
@@ -131,16 +129,16 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Encodes the input sbyte sequence into the output char sequence. Before
+ /// Encodes the input <see cref="sbyte"/> sequence into the output char sequence. Before
/// calling this method, ensure that the output array has sufficient
- /// capacity by calling <seealso cref="#getEncodedLength(byte[], int, int)"/>.
+ /// capacity by calling <see cref="GetEncodedLength(sbyte[], int, int)"/>.
/// </summary>
- /// <param name="inputArray"> sbyte sequence to be encoded </param>
- /// <param name="inputOffset"> initial offset into inputArray </param>
- /// <param name="inputLength"> number of bytes in inputArray </param>
- /// <param name="outputArray"> char sequence to store encoded result </param>
- /// <param name="outputOffset"> initial offset into outputArray </param>
- /// <param name="outputLength"> length of output, must be getEncodedLength </param>
+ /// <param name="inputArray"> <see cref="sbyte"/> sequence to be encoded </param>
+ /// <param name="inputOffset"> Initial offset into <paramref name="inputArray"/> </param>
+ /// <param name="inputLength"> Number of bytes in <paramref name="inputArray"/> </param>
+ /// <param name="outputArray"> <see cref="char"/> sequence to store encoded result </param>
+ /// <param name="outputOffset"> Initial offset into outputArray </param>
+ /// <param name="outputLength"> Length of output, must be getEncodedLength </param>
[CLSCompliant(false)]
public static void Encode(sbyte[] inputArray, int inputOffset, int inputLength, char[] outputArray, int outputOffset, int outputLength)
{
@@ -192,17 +190,17 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Decodes the input char sequence into the output byte sequence. Before
+ /// Decodes the input <see cref="char"/> sequence into the output <see cref="byte"/> sequence. Before
/// calling this method, ensure that the output array has sufficient capacity
- /// by calling <seealso cref="#getDecodedLength(char[], int, int)"/>.
+ /// by calling <see cref="GetDecodedLength(char[], int, int)"/>.
/// </summary>
- /// <param name="inputArray"> char sequence to be decoded </param>
- /// <param name="inputOffset"> initial offset into inputArray </param>
- /// <param name="inputLength"> number of chars in inputArray </param>
- /// <param name="outputArray"> byte sequence to store encoded result </param>
- /// <param name="outputOffset"> initial offset into outputArray </param>
- /// <param name="outputLength"> length of output, must be
- /// getDecodedLength(inputArray, inputOffset, inputLength) </param>
+ /// <param name="inputArray"> <see cref="char"/> sequence to be decoded </param>
+ /// <param name="inputOffset"> Initial offset into <paramref name="inputArray"/> </param>
+ /// <param name="inputLength"> Number of chars in <paramref name="inputArray"/> </param>
+ /// <param name="outputArray"> <see cref="byte"/> sequence to store encoded result </param>
+ /// <param name="outputOffset"> Initial offset into outputArray </param>
+ /// <param name="outputLength"> Length of output, must be
+ /// GetDecodedLength(inputArray, inputOffset, inputLength) </param>
// LUCENENET specific overload for CLS compliance
public static void Decode(char[] inputArray, int inputOffset, int inputLength, byte[] outputArray, int outputOffset, int outputLength)
{
@@ -212,15 +210,15 @@ namespace Lucene.Net.Util
/// <summary>
/// Decodes the input char sequence into the output sbyte sequence. Before
/// calling this method, ensure that the output array has sufficient capacity
- /// by calling <seealso cref="#getDecodedLength(char[], int, int)"/>.
+ /// by calling <see cref="GetDecodedLength(char[], int, int)"/>.
/// </summary>
- /// <param name="inputArray"> char sequence to be decoded </param>
- /// <param name="inputOffset"> initial offset into inputArray </param>
- /// <param name="inputLength"> number of chars in inputArray </param>
- /// <param name="outputArray"> byte sequence to store encoded result </param>
- /// <param name="outputOffset"> initial offset into outputArray </param>
- /// <param name="outputLength"> length of output, must be
- /// getDecodedLength(inputArray, inputOffset, inputLength) </param>
+ /// <param name="inputArray"> <see cref="char"/> sequence to be decoded </param>
+ /// <param name="inputOffset"> Initial offset into <paramref name="inputArray"/> </param>
+ /// <param name="inputLength"> Number of chars in <paramref name="inputArray"/> </param>
+ /// <param name="outputArray"> <see cref="byte"/> sequence to store encoded result </param>
+ /// <param name="outputOffset"> Initial offset into outputArray </param>
+ /// <param name="outputLength"> Length of output, must be
+ /// GetDecodedLength(inputArray, inputOffset, inputLength) </param>
[CLSCompliant(false)]
public static void Decode(char[] inputArray, int inputOffset, int inputLength, sbyte[] outputArray, int outputOffset, int outputLength)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/InfoStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/InfoStream.cs b/src/Lucene.Net/Util/InfoStream.cs
index 8d97037..da90d24 100644
--- a/src/Lucene.Net/Util/InfoStream.cs
+++ b/src/Lucene.Net/Util/InfoStream.cs
@@ -21,18 +21,18 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// Debugging API for Lucene classes such as <seealso cref="IndexWriter"/>
- /// and <seealso cref="SegmentInfos"/>.
- /// <p>
+ /// Debugging API for Lucene classes such as <see cref="Index.IndexWriter"/>
+ /// and <see cref="Index.SegmentInfos"/>.
+ /// <para>
/// NOTE: Enabling infostreams may cause performance degradation
/// in some components.
- ///
+ /// </para>
/// @lucene.internal
/// </summary>
public abstract class InfoStream : IDisposable
{
/// <summary>
- /// Instance of InfoStream that does no logging at all. </summary>
+ /// Instance of <see cref="InfoStream"/> that does no logging at all. </summary>
public static readonly InfoStream NO_OUTPUT = new NoOutput();
private sealed class NoOutput : InfoStream
@@ -53,18 +53,17 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// prints a message </summary>
+ /// Prints a message </summary>
public abstract void Message(string component, string message);
/// <summary>
- /// returns true if messages are enabled and should be posted to <seealso cref="#message"/>. </summary>
+ /// Returns <c>true</c> if messages are enabled and should be posted to <see cref="Message(string, string)"/>. </summary>
public abstract bool IsEnabled(string component);
private static InfoStream defaultInfoStream = NO_OUTPUT;
/// <summary>
- /// The default {@code InfoStream} used by a newly instantiated classes. </summary>
- /// <seealso cref= #setDefault </seealso>
+ /// Gets or Sets the default <see cref="InfoStream"/> used by a newly instantiated classes. </summary>
public static InfoStream Default
{
get
@@ -88,16 +87,25 @@ namespace Lucene.Net.Util
}
// LUCENENET specific - implementing proper dispose pattern
+ /// <summary>
+ /// Disposes this <see cref="InfoStream"/>
+ /// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
+ /// <summary>
+ /// Disposes this <see cref="InfoStream"/>
+ /// </summary>
protected virtual void Dispose(bool disposing)
{
}
+ /// <summary>
+ /// Clones this <see cref="InfoStream"/>
+ /// </summary>
public virtual object Clone()
{
try
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/IntBlockPool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IntBlockPool.cs b/src/Lucene.Net/Util/IntBlockPool.cs
index 18180e9..2201258 100644
--- a/src/Lucene.Net/Util/IntBlockPool.cs
+++ b/src/Lucene.Net/Util/IntBlockPool.cs
@@ -23,9 +23,10 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// A pool for int blocks similar to <seealso cref="ByteBlockPool"/>.
+ /// A pool for <see cref="int"/> blocks similar to <see cref="ByteBlockPool"/>.
/// <para/>
/// NOTE: This was IntBlockPool in Lucene
+ /// <para/>
/// @lucene.internal
/// </summary>
public sealed class Int32BlockPool
@@ -46,7 +47,7 @@ namespace Lucene.Net.Util
public static readonly int INT32_BLOCK_MASK = INT32_BLOCK_SIZE - 1;
/// <summary>
- /// Abstract class for allocating and freeing int
+ /// Abstract class for allocating and freeing <see cref="int"/>
/// blocks.
/// </summary>
public abstract class Allocator
@@ -73,11 +74,11 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// A simple <seealso cref="Allocator"/> that never recycles. </summary>
+ /// A simple <see cref="Allocator"/> that never recycles. </summary>
public sealed class DirectAllocator : Allocator
{
/// <summary>
- /// Creates a new <seealso cref="DirectAllocator"/> with a default block size
+ /// Creates a new <see cref="DirectAllocator"/> with a default block size
/// </summary>
public DirectAllocator()
: base(INT32_BLOCK_SIZE)
@@ -93,7 +94,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// array of buffers currently used in the pool. Buffers are allocated if needed don't modify this outside of this class </summary>
+ /// Array of buffers currently used in the pool. Buffers are allocated if needed don't modify this outside of this class. </summary>
[WritableArray]
[SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
public int[][] Buffers
@@ -104,7 +105,7 @@ namespace Lucene.Net.Util
private int[][] buffers = new int[10][];
/// <summary>
- /// index into the buffers array pointing to the current buffer used as the head </summary>
+ /// Index into the buffers array pointing to the current buffer used as the head. </summary>
private int bufferUpto = -1;
/// <summary>
@@ -115,7 +116,7 @@ namespace Lucene.Net.Util
public int Int32Upto { get; set; }
/// <summary>
- /// Current head buffer </summary>
+ /// Current head buffer. </summary>
[WritableArray]
[SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
public int[] Buffer
@@ -126,7 +127,7 @@ namespace Lucene.Net.Util
private int[] buffer;
/// <summary>
- /// Current head offset
+ /// Current head offset.
/// <para/>
/// NOTE: This was intOffset in Lucene
/// </summary>
@@ -135,16 +136,16 @@ namespace Lucene.Net.Util
private readonly Allocator allocator;
/// <summary>
- /// Creates a new <seealso cref="Int32BlockPool"/> with a default <seealso cref="Allocator"/>. </summary>
- /// <seealso cref= Int32BlockPool#nextBuffer() </seealso>
+ /// Creates a new <see cref="Int32BlockPool"/> with a default <see cref="Allocator"/>. </summary>
+ /// <seealso cref="Int32BlockPool.NextBuffer()"/>
public Int32BlockPool()
: this(new DirectAllocator())
{
}
/// <summary>
- /// Creates a new <seealso cref="Int32BlockPool"/> with the given <seealso cref="Allocator"/>. </summary>
- /// <seealso cref= Int32BlockPool#nextBuffer() </seealso>
+ /// Creates a new <see cref="Int32BlockPool"/> with the given <see cref="Allocator"/>. </summary>
+ /// <seealso cref="Int32BlockPool.NextBuffer()"/>
public Int32BlockPool(Allocator allocator)
{
// set defaults
@@ -156,7 +157,7 @@ namespace Lucene.Net.Util
/// <summary>
/// Resets the pool to its initial state reusing the first buffer. Calling
- /// <seealso cref="Int32BlockPool#nextBuffer()"/> is not needed after reset.
+ /// <see cref="Int32BlockPool.NextBuffer()"/> is not needed after reset.
/// </summary>
public void Reset()
{
@@ -165,12 +166,12 @@ namespace Lucene.Net.Util
/// <summary>
/// Expert: Resets the pool to its initial state reusing the first buffer. </summary>
- /// <param name="zeroFillBuffers"> if <code>true</code> the buffers are filled with <tt>0</tt>.
- /// this should be set to <code>true</code> if this pool is used with
- /// <seealso cref="SliceWriter"/>. </param>
- /// <param name="reuseFirst"> if <code>true</code> the first buffer will be reused and calling
- /// <seealso cref="Int32BlockPool#nextBuffer()"/> is not needed after reset iff the
- /// block pool was used before ie. <seealso cref="Int32BlockPool#nextBuffer()"/> was called before. </param>
+ /// <param name="zeroFillBuffers"> If <c>true</c> the buffers are filled with <c>0</c>.
+ /// this should be set to <c>true</c> if this pool is used with
+ /// <see cref="SliceWriter"/>. </param>
+ /// <param name="reuseFirst"> If <c>true</c> the first buffer will be reused and calling
+ /// <see cref="Int32BlockPool.NextBuffer()"/> is not needed after reset if the
+ /// block pool was used before ie. <see cref="Int32BlockPool.NextBuffer()"/> was called before. </param>
public void Reset(bool zeroFillBuffers, bool reuseFirst)
{
if (bufferUpto != -1)
@@ -214,9 +215,9 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Advances the pool to its next buffer. this method should be called once
+ /// Advances the pool to its next buffer. This method should be called once
/// after the constructor to initialize the pool. In contrast to the
- /// constructor a <seealso cref="Int32BlockPool#reset()"/> call will advance the pool to
+ /// constructor a <see cref="Int32BlockPool.Reset()"/> call will advance the pool to
/// its first buffer immediately.
/// </summary>
public void NextBuffer()
@@ -235,8 +236,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Creates a new int slice with the given starting size and returns the slices offset in the pool. </summary>
- /// <seealso cref= SliceReader </seealso>
+ /// Creates a new <see cref="int"/> slice with the given starting size and returns the slices offset in the pool. </summary>
+ /// <seealso cref="SliceReader"/>
private int NewSlice(int size)
{
if (Int32Upto > INT32_BLOCK_SIZE - size)
@@ -264,23 +265,23 @@ namespace Lucene.Net.Util
// no need to make this public unless we support different sizes
// TODO make the levels and the sizes configurable
/// <summary>
- /// An array holding the offset into the <seealso cref="Int32BlockPool#LEVEL_SIZE_ARRAY"/>
+ /// An array holding the offset into the <see cref="Int32BlockPool.LEVEL_SIZE_ARRAY"/>
/// to quickly navigate to the next slice level.
/// </summary>
private static readonly int[] NEXT_LEVEL_ARRAY = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 9 };
/// <summary>
- /// An array holding the level sizes for int slices.
+ /// An array holding the level sizes for <see cref="int"/> slices.
/// </summary>
private static readonly int[] LEVEL_SIZE_ARRAY = new int[] { 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 };
/// <summary>
- /// The first level size for new slices
+ /// The first level size for new slices.
/// </summary>
private static readonly int FIRST_LEVEL_SIZE = LEVEL_SIZE_ARRAY[0];
/// <summary>
- /// Allocates a new slice from the given offset
+ /// Allocates a new slice from the given offset.
/// </summary>
private int AllocSlice(int[] slice, int sliceOffset)
{
@@ -307,10 +308,11 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// A <seealso cref="SliceWriter"/> that allows to write multiple integer slices into a given <seealso cref="Int32BlockPool"/>.
+ /// A <see cref="SliceWriter"/> that allows to write multiple integer slices into a given <see cref="Int32BlockPool"/>.
+ /// <para/>
+ /// @lucene.internal
/// </summary>
- /// <seealso cref= SliceReader
- /// @lucene.internal </seealso>
+ /// <seealso cref="SliceReader"/>
public class SliceWriter
{
private int offset;
@@ -349,8 +351,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// starts a new slice and returns the start offset. The returned value
- /// should be used as the start offset to initialize a <seealso cref="SliceReader"/>.
+ /// Starts a new slice and returns the start offset. The returned value
+ /// should be used as the start offset to initialize a <see cref="SliceReader"/>.
/// </summary>
public virtual int StartNewSlice()
{
@@ -359,7 +361,7 @@ namespace Lucene.Net.Util
/// <summary>
/// Returns the offset of the currently written slice. The returned value
- /// should be used as the end offset to initialize a <seealso cref="SliceReader"/> once
+ /// should be used as the end offset to initialize a <see cref="SliceReader"/> once
/// this slice is fully written or to reset the this writer if another slice
/// needs to be written.
/// </summary>
@@ -373,7 +375,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// A <seealso cref="SliceReader"/> that can read int slices written by a <seealso cref="SliceWriter"/>
+ /// A <see cref="SliceReader"/> that can read <see cref="int"/> slices written by a <see cref="SliceWriter"/>.
+ /// <para/>
/// @lucene.internal
/// </summary>
public sealed class SliceReader
@@ -388,7 +391,7 @@ namespace Lucene.Net.Util
private int end;
/// <summary>
- /// Creates a new <seealso cref="SliceReader"/> on the given pool
+ /// Creates a new <see cref="SliceReader"/> on the given pool.
/// </summary>
public SliceReader(Int32BlockPool pool)
{
@@ -396,7 +399,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Resets the reader to a slice give the slices absolute start and end offset in the pool
+ /// Resets the reader to a slice give the slices absolute start and end offset in the pool.
/// </summary>
public void Reset(int startOffset, int endOffset)
{
@@ -422,8 +425,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns <code>true</code> iff the current slice is fully read. If this
- /// method returns <code>true</code> <seealso cref="SliceReader#readInt()"/> should not
+ /// Returns <c>true</c> if the current slice is fully read. If this
+ /// method returns <c>true</c> <seealso cref="SliceReader.ReadInt32()"/> should not
/// be called again on this slice.
/// </summary>
public bool IsEndOfSlice
@@ -436,11 +439,11 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Reads the next int from the current slice and returns it.
+ /// Reads the next <see cref="int"/> from the current slice and returns it.
/// <para/>
/// NOTE: This was readInt() in Lucene
/// </summary>
- /// <seealso cref= SliceReader#endOfSlice() </seealso>
+ /// <seealso cref="SliceReader.IsEndOfSlice"/>
public int ReadInt32()
{
Debug.Assert(!IsEndOfSlice);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/IntroSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IntroSorter.cs b/src/Lucene.Net/Util/IntroSorter.cs
index ea8df37..488443d 100644
--- a/src/Lucene.Net/Util/IntroSorter.cs
+++ b/src/Lucene.Net/Util/IntroSorter.cs
@@ -20,12 +20,13 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// <seealso cref="Sorter"/> implementation based on a variant of the quicksort algorithm
+ /// <see cref="Sorter"/> implementation based on a variant of the quicksort algorithm
/// called <a href="http://en.wikipedia.org/wiki/Introsort">introsort</a>: when
/// the recursion level exceeds the log of the length of the array to sort, it
- /// falls back to heapsort. this prevents quicksort from running into its
+ /// falls back to heapsort. This prevents quicksort from running into its
/// worst-case quadratic runtime. Small arrays are sorted with
/// insertion sort.
+ /// <para/>
/// @lucene.internal
/// </summary>
public abstract class IntroSorter : Sorter
@@ -37,11 +38,15 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Create a new <seealso cref="IntroSorter"/>. </summary>
+ /// Create a new <see cref="IntroSorter"/>. </summary>
public IntroSorter()
{
}
+ /// <summary>
+ /// Sort the slice which starts at <paramref name="from"/> (inclusive) and ends at
+ /// <paramref name="to"/> (exclusive).
+ /// </summary>
public override sealed void Sort(int from, int to)
{
CheckRange(from, to);
@@ -109,14 +114,14 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Save the value at slot <code>i</code> so that it can later be used as a
- /// pivot, see <seealso cref="#comparePivot(int)"/>.
+ /// Save the value at slot <paramref name="i"/> so that it can later be used as a
+ /// pivot, see <see cref="ComparePivot(int)"/>.
/// </summary>
protected abstract void SetPivot(int i);
/// <summary>
- /// Compare the pivot with the slot at <code>j</code>, similarly to
- /// <seealso cref="#compare(int, int) compare(i, j)"/>.
+ /// Compare the pivot with the slot at <paramref name="j"/>, similarly to
+ /// Compare(i, j) (<see cref="Sorter.Compare(int, int)"/>).
/// </summary>
protected abstract int ComparePivot(int j);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/IntsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IntsRef.cs b/src/Lucene.Net/Util/IntsRef.cs
index d98fc62..9a37b34 100644
--- a/src/Lucene.Net/Util/IntsRef.cs
+++ b/src/Lucene.Net/Util/IntsRef.cs
@@ -25,12 +25,12 @@ namespace Lucene.Net.Util
/// <summary>
/// Represents <see cref="T:int[]"/>, as a slice (offset + length) into an
- /// existing <see cref="T:int[]"/>. The <see cref="Int32s"/> member should never be null; use
+ /// existing <see cref="T:int[]"/>. The <see cref="Int32s"/> member should never be <c>null</c>; use
/// <see cref="EMPTY_INT32S"/> if necessary.
/// <para/>
/// NOTE: This was IntsRef in Lucene
- ///
- /// @lucene.internal
+ /// <para/>
+ /// @lucene.internal
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -38,14 +38,14 @@ namespace Lucene.Net.Util
public sealed class Int32sRef : IComparable<Int32sRef>
{
/// <summary>
- /// An empty integer array for convenience
+ /// An empty integer array for convenience.
/// <para/>
/// NOTE: This was EMPTY_INTS in Lucene
/// </summary>
public static readonly int[] EMPTY_INT32S = new int[0];
/// <summary>
- /// The contents of the IntsRef. Should never be {@code null}.
+ /// The contents of the <see cref="Int32sRef"/>. Should never be <c>null</c>.
/// <para/>
/// NOTE: This was ints (field) in Lucene
/// </summary>
@@ -70,18 +70,18 @@ namespace Lucene.Net.Util
public int Offset { get; set; }
/// <summary>
- /// Length of used ints. </summary>
+ /// Length of used <see cref="int"/>s. </summary>
public int Length { get; set; }
/// <summary>
- /// Create a IntsRef with <see cref="EMPTY_INT32S"/> </summary>
+ /// Create a <see cref="Int32sRef"/> with <see cref="EMPTY_INT32S"/>. </summary>
public Int32sRef()
{
ints = EMPTY_INT32S;
}
/// <summary>
- /// Create a IntsRef pointing to a new array of size <code>capacity</code>.
+ /// Create a <see cref="Int32sRef"/> pointing to a new array of size <paramref name="capacity"/>.
/// Offset and length will both be zero.
/// </summary>
public Int32sRef(int capacity)
@@ -90,8 +90,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// this instance will directly reference ints w/o making a copy.
- /// ints should not be null.
+ /// This instance will directly reference <paramref name="ints"/> w/o making a copy.
+ /// <paramref name="ints"/> should not be <c>null</c>.
/// </summary>
public Int32sRef(int[] ints, int offset, int length)
{
@@ -102,11 +102,11 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns a shallow clone of this instance (the underlying ints are
+ /// Returns a shallow clone of this instance (the underlying <see cref="int"/>s are
/// <b>not</b> copied and will be shared by both the returned object and this
/// object.
/// </summary>
- /// <seealso cref= #deepCopyOf </seealso>
+ /// <seealso cref="DeepCopyOf(Int32sRef)"/>
public object Clone()
{
return new Int32sRef(ints, Offset, Length);
@@ -163,7 +163,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Signed int order comparison </summary>
+ /// Signed <see cref="int"/> order comparison. </summary>
public int CompareTo(Int32sRef other)
{
if (this == other)
@@ -212,8 +212,9 @@ namespace Lucene.Net.Util
/// <summary>
/// Used to grow the reference array.
- ///
+ /// <para/>
/// In general this should not be used as it does not take the offset into account.
+ /// <para/>
/// @lucene.internal
/// </summary>
public void Grow(int newLength)
@@ -243,10 +244,10 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Creates a new IntsRef that points to a copy of the ints from
- /// <code>other</code>
- /// <p>
- /// The returned IntsRef will have a length of other.length
+ /// Creates a new <see cref="Int32sRef"/> that points to a copy of the <see cref="int"/>s from
+ /// <paramref name="other"/>
+ /// <para/>
+ /// The returned <see cref="Int32sRef"/> will have a length of <c>other.Length</c>
/// and an offset of zero.
/// </summary>
public static Int32sRef DeepCopyOf(Int32sRef other)
@@ -258,7 +259,7 @@ namespace Lucene.Net.Util
/// <summary>
/// Performs internal consistency checks.
- /// Always returns true (or throws InvalidOperationException)
+ /// Always returns true (or throws <see cref="InvalidOperationException"/>)
/// </summary>
public bool IsValid()
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/LongBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/LongBitSet.cs b/src/Lucene.Net/Util/LongBitSet.cs
index 6bbde98..f1d6644 100644
--- a/src/Lucene.Net/Util/LongBitSet.cs
+++ b/src/Lucene.Net/Util/LongBitSet.cs
@@ -22,12 +22,12 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// BitSet of fixed length (numBits), backed by accessible (<seealso cref="#getBits"/>)
- /// long[], accessed with a long index. Use it only if you intend to store more
- /// than 2.1B bits, otherwise you should use <seealso cref="FixedBitSet"/>.
+ /// BitSet of fixed length (<see cref="numBits"/>), backed by accessible (<see cref="GetBits()"/>)
+ /// <see cref="T:long[]"/>, accessed with a <see cref="long"/> index. Use it only if you intend to store more
+ /// than 2.1B bits, otherwise you should use <see cref="FixedBitSet"/>.
/// <para/>
/// NOTE: This was LongBitSet in Lucene
- ///
+ /// <para/>
/// @lucene.internal
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -40,14 +40,14 @@ namespace Lucene.Net.Util
private readonly int numWords;
/// <summary>
- /// If the given <seealso cref="Int64BitSet"/> is large enough to hold
- /// {@code numBits}, returns the given bits, otherwise returns a new
- /// <seealso cref="Int64BitSet"/> which can hold the requested number of bits.
+ /// If the given <see cref="Int64BitSet"/> is large enough to hold
+ /// <paramref name="numBits"/>, returns the given <paramref name="bits"/>, otherwise returns a new
+ /// <see cref="Int64BitSet"/> which can hold the requested number of bits.
///
- /// <p>
- /// <b>NOTE:</b> the returned bitset reuses the underlying {@code long[]} of
- /// the given {@code bits} if possible. Also, calling <seealso cref="#length()"/> on the
- /// returned bits may return a value greater than {@code numBits}.
+ /// <para/>
+ /// <b>NOTE:</b> the returned bitset reuses the underlying <see cref="T:long[]"/> of
+ /// the given <paramref name="bits"/> if possible. Also, reading <see cref="Length"/> on the
+ /// returned bits may return a value greater than <paramref name="numBits"/>.
/// </summary>
public static Int64BitSet EnsureCapacity(Int64BitSet bits, long numBits)
{
@@ -68,7 +68,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// returns the number of 64 bit words it would take to hold numBits </summary>
+ /// Returns the number of 64 bit words it would take to hold <paramref name="numBits"/>. </summary>
public static int Bits2words(long numBits)
{
int numLong = (int)((long)((ulong)numBits >> 6));
@@ -114,8 +114,8 @@ namespace Lucene.Net.Util
/// <summary>
/// Returns number of set bits. NOTE: this visits every
- /// long in the backing bits array, and the result is not
- /// internally cached!
+ /// long in the backing bits array, and the result is not
+ /// internally cached!
/// </summary>
public long Cardinality()
{
@@ -174,8 +174,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns the index of the first set bit starting at the index specified.
- /// -1 is returned if there are no more set bits.
+ /// Returns the index of the first set bit starting at the <paramref name="index"/> specified.
+ /// -1 is returned if there are no more set bits.
/// </summary>
public long NextSetBit(long index)
{
@@ -202,8 +202,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns the index of the last set bit before or on the index specified.
- /// -1 is returned if there are no more set bits.
+ /// Returns the index of the last set bit before or on the <paramref name="index"/> specified.
+ /// -1 is returned if there are no more set bits.
/// </summary>
public long PrevSetBit(long index)
{
@@ -254,7 +254,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// returns true if the sets have any elements in common </summary>
+ /// Returns <c>true</c> if the sets have any elements in common </summary>
public bool Intersects(Int64BitSet other)
{
int pos = Math.Min(numWords, other.numWords);
@@ -301,8 +301,8 @@ namespace Lucene.Net.Util
/// <summary>
/// Flips a range of bits
/// </summary>
- /// <param name="startIndex"> lower index </param>
- /// <param name="endIndex"> one-past the last bit to flip </param>
+ /// <param name="startIndex"> Lower index </param>
+ /// <param name="endIndex"> One-past the last bit to flip </param>
public void Flip(long startIndex, long endIndex)
{
Debug.Assert(startIndex >= 0 && startIndex < numBits);
@@ -346,8 +346,8 @@ namespace Lucene.Net.Util
/// <summary>
/// Sets a range of bits
/// </summary>
- /// <param name="startIndex"> lower index </param>
- /// <param name="endIndex"> one-past the last bit to set </param>
+ /// <param name="startIndex"> Lower index </param>
+ /// <param name="endIndex"> One-past the last bit to set </param>
public void Set(long startIndex, long endIndex)
{
Debug.Assert(startIndex >= 0 && startIndex < numBits);
@@ -377,8 +377,8 @@ namespace Lucene.Net.Util
/// <summary>
/// Clears a range of bits.
/// </summary>
- /// <param name="startIndex"> lower index </param>
- /// <param name="endIndex"> one-past the last bit to clear </param>
+ /// <param name="startIndex"> Lower index </param>
+ /// <param name="endIndex"> One-past the last bit to clear </param>
public void Clear(long startIndex, long endIndex)
{
Debug.Assert(startIndex >= 0 && startIndex < numBits);
@@ -420,7 +420,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// returns true if both sets have the same bits set </summary>
+ /// Returns <c>true</c> if both sets have the same bits set </summary>
public override bool Equals(object o)
{
if (this == o)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/LongValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/LongValues.cs b/src/Lucene.Net/Util/LongValues.cs
index ce1335f..93e5873 100644
--- a/src/Lucene.Net/Util/LongValues.cs
+++ b/src/Lucene.Net/Util/LongValues.cs
@@ -21,21 +21,23 @@ namespace Lucene.Net.Util
using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
/// <summary>
- /// Abstraction over an array of longs.
- /// this class extends NumericDocValues so that we don't need to add another
- /// level of abstraction every time we want eg. to use the <seealso cref="PackedInt32s"/>
- /// utility classes to represent a <seealso cref="NumericDocValues"/> instance.
+ /// Abstraction over an array of <see cref="long"/>s.
+ /// This class extends <see cref="NumericDocValues"/> so that we don't need to add another
+ /// level of abstraction every time we want eg. to use the <see cref="PackedInt32s"/>
+ /// utility classes to represent a <see cref="NumericDocValues"/> instance.
/// <para/>
/// NOTE: This was LongValues in Lucene
- ///
- /// @lucene.internal
+ /// <para/>
+ /// @lucene.internal
/// </summary>
public abstract class Int64Values : NumericDocValues
{
/// <summary>
- /// Get value at <code>index</code>. </summary>
+ /// Get value at <paramref name="index"/>. </summary>
public abstract long Get(long index);
+ /// <summary>
+ /// Get value at <paramref name="idx"/>. </summary>
public override long Get(int idx)
{
return Get((long)idx);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/LongsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/LongsRef.cs b/src/Lucene.Net/Util/LongsRef.cs
index 9fb7679..f5a0c4f 100644
--- a/src/Lucene.Net/Util/LongsRef.cs
+++ b/src/Lucene.Net/Util/LongsRef.cs
@@ -25,12 +25,12 @@ namespace Lucene.Net.Util
/// <summary>
/// Represents <see cref="T:long[]"/>, as a slice (offset + length) into an
- /// existing <see cref="T:long[]"/>. The <see cref="Int64s"/> member should never be null; use
+ /// existing <see cref="T:long[]"/>. The <see cref="Int64s"/> member should never be <c>null</c>; use
/// <see cref="EMPTY_INT64S"/> if necessary.
/// <para/>
/// NOTE: This was LongsRef in Lucene
- ///
- /// @lucene.internal
+ /// <para/>
+ /// @lucene.internal
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -38,14 +38,14 @@ namespace Lucene.Net.Util
public sealed class Int64sRef : IComparable<Int64sRef>
{
/// <summary>
- /// An empty long array for convenience
+ /// An empty <see cref="long"/> array for convenience
/// <para/>
/// NOTE: This was EMPTY_LONGS in Lucene
/// </summary>
public static readonly long[] EMPTY_INT64S = new long[0];
/// <summary>
- /// The contents of the LongsRef. Should never be {@code null}.
+ /// The contents of the <see cref="Int64sRef"/>. Should never be <c>null</c>.
/// <para/>
/// NOTE: This was longs (field) in Lucene
/// </summary>
@@ -74,14 +74,14 @@ namespace Lucene.Net.Util
public int Length { get; set; }
/// <summary>
- /// Create a LongsRef with <see cref="EMPTY_INT64S"/> </summary>
+ /// Create a <see cref="Int64sRef"/> with <see cref="EMPTY_INT64S"/> </summary>
public Int64sRef()
{
longs = EMPTY_INT64S;
}
/// <summary>
- /// Create a LongsRef pointing to a new array of size <code>capacity</code>.
+ /// Create a <see cref="Int64sRef"/> pointing to a new array of size <paramref name="capacity"/>.
/// Offset and length will both be zero.
/// </summary>
public Int64sRef(int capacity)
@@ -90,8 +90,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// this instance will directly reference longs w/o making a copy.
- /// longs should not be null
+ /// This instance will directly reference <paramref name="longs"/> w/o making a copy.
+ /// <paramref name="longs"/> should not be <c>null</c>.
/// </summary>
public Int64sRef(long[] longs, int offset, int length)
{
@@ -102,11 +102,11 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns a shallow clone of this instance (the underlying longs are
+ /// Returns a shallow clone of this instance (the underlying <see cref="long"/>s are
/// <b>not</b> copied and will be shared by both the returned object and this
/// object.
/// </summary>
- /// <seealso cref= #deepCopyOf </seealso>
+ /// <seealso cref="DeepCopyOf(Int64sRef)"/>
public object Clone()
{
return new Int64sRef(longs, Offset, Length);
@@ -163,7 +163,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Signed int order comparison </summary>
+ /// Signed <see cref="int"/> order comparison </summary>
public int CompareTo(Int64sRef other)
{
if (this == other)
@@ -212,8 +212,9 @@ namespace Lucene.Net.Util
/// <summary>
/// Used to grow the reference array.
- ///
+ /// <para/>
/// In general this should not be used as it does not take the offset into account.
+ /// <para/>
/// @lucene.internal
/// </summary>
public void Grow(int newLength)
@@ -243,10 +244,10 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Creates a new IntsRef that points to a copy of the longs from
- /// <code>other</code>
- /// <p>
- /// The returned IntsRef will have a length of other.length
+ /// Creates a new <see cref="Int64sRef"/> that points to a copy of the <see cref="long"/>s from
+ /// <paramref name="other"/>.
+ /// <para/>
+ /// The returned <see cref="Int64sRef"/> will have a length of <c>other.Length</c>
/// and an offset of zero.
/// </summary>
public static Int64sRef DeepCopyOf(Int64sRef other)
@@ -258,7 +259,7 @@ namespace Lucene.Net.Util
/// <summary>
/// Performs internal consistency checks.
- /// Always returns true (or throws InvalidOperationException)
+ /// Always returns <c>true</c> (or throws <see cref="InvalidOperationException"/>)
/// </summary>
public bool IsValid()
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/MapOfSets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/MapOfSets.cs b/src/Lucene.Net/Util/MapOfSets.cs
index 0cf1549..df4ce9d 100644
--- a/src/Lucene.Net/Util/MapOfSets.cs
+++ b/src/Lucene.Net/Util/MapOfSets.cs
@@ -21,20 +21,21 @@ namespace Lucene.Net.Util
/// <summary>
/// Helper class for keeping Lists of Objects associated with keys. <b>WARNING: this CLASS IS NOT THREAD SAFE</b>
+ /// <para/>
/// @lucene.internal
/// </summary>
public class MapOfSets<TKey, TValue>
{
- private readonly IDictionary<TKey, HashSet<TValue>> theMap;
+ private readonly IDictionary<TKey, HashSet<TValue>> theMap; // LUCENENET TODO: API Change to ISet
- /// <param name="m"> the backing store for this object </param>
- public MapOfSets(IDictionary<TKey, HashSet<TValue>> m)
+ /// <param name="m"> The backing store for this object. </param>
+ public MapOfSets(IDictionary<TKey, HashSet<TValue>> m) // LUCENENET TODO: API Change to ISet
{
theMap = m;
}
- /// <returns> direct access to the map backing this object. </returns>
- public virtual IDictionary<TKey, HashSet<TValue>> Map
+ /// <returns> Direct access to the map backing this object. </returns>
+ public virtual IDictionary<TKey, HashSet<TValue>> Map // LUCENENET TODO: API Change to ISet
{
get
{
@@ -43,12 +44,13 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Adds val to the Set associated with key in the Map. If key is not
- /// already in the map, a new Set will first be created. </summary>
- /// <returns> the size of the Set associated with key once val is added to it. </returns>
+ /// Adds <paramref name="val"/> to the <see cref="ISet{T}"/> associated with key in the <see cref="IDictionary{TKey, TValue}"/>.
+ /// If <paramref name="key"/> is not
+ /// already in the map, a new <see cref="ISet{T}"/> will first be created. </summary>
+ /// <returns> The size of the <see cref="ISet{T}"/> associated with key once val is added to it. </returns>
public virtual int Put(TKey key, TValue val)
{
- HashSet<TValue> theSet;
+ HashSet<TValue> theSet; // LUCENENET TODO: API Change to ISet
if (theMap.ContainsKey(key))
{
theSet = theMap[key];
@@ -63,13 +65,13 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Adds multiple vals to the Set associated with key in the Map.
- /// If key is not
- /// already in the map, a new Set will first be created. </summary>
- /// <returns> the size of the Set associated with key once val is added to it. </returns>
+ /// Adds multiple <paramref name="vals"/> to the <see cref="ISet{T}"/> associated with key in the <see cref="IDictionary{TKey, TValue}"/>.
+ /// If <paramref name="key"/> is not
+ /// already in the map, a new <see cref="ISet{T}"/> will first be created. </summary>
+ /// <returns> The size of the <see cref="ISet{T}"/> associated with key once val is added to it. </returns>
public virtual int PutAll(TKey key, IEnumerable<TValue> vals)
{
- HashSet<TValue> theSet;
+ HashSet<TValue> theSet; // LUCENENET TODO: API Change to ISet
if (theMap.ContainsKey(key))
{
theSet = theMap[key];
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/MathUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/MathUtil.cs b/src/Lucene.Net/Util/MathUtil.cs
index 4ea0a6d..12aa41d 100644
--- a/src/Lucene.Net/Util/MathUtil.cs
+++ b/src/Lucene.Net/Util/MathUtil.cs
@@ -31,8 +31,8 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Returns {@code x <= 0 ? 0 : Math.floor(Math.log(x) / Math.log(base))} </summary>
- /// <param name="base"> must be {@code > 1} </param>
+ /// Returns <c>x <= 0 ? 0 : Math.Floor(Math.Log(x) / Math.Log(base))</c>. </summary>
+ /// <param name="base"> Must be <c>> 1</c>.</param>
public static int Log(long x, int @base)
{
if (@base <= 1)
@@ -49,7 +49,7 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Calculates logarithm in a given base with doubles.
+ /// Calculates logarithm in a given <paramref name="base"/> with doubles.
/// </summary>
public static double Log(double @base, double x)
{
@@ -57,13 +57,13 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Return the greatest common divisor of <code>a</code> and <code>b</code>,
- /// consistently with <seealso cref="BigInteger#gcd(BigInteger)"/>.
- /// <p><b>NOTE</b>: A greatest common divisor must be positive, but
- /// <code>2^64</code> cannot be expressed as a long although it
- /// is the GCD of <seealso cref="Long#MIN_VALUE"/> and <code>0</code> and the GCD of
- /// <seealso cref="Long#MIN_VALUE"/> and <seealso cref="Long#MIN_VALUE"/>. So in these 2 cases,
- /// and only them, this method will return <seealso cref="Long#MIN_VALUE"/>.
+ /// Return the greatest common divisor of <paramref name="a"/> and <paramref name="b"/>,
+ /// consistently with <c>System.Numerics.BigInteger.GreatestCommonDivisor(System.Numerics.BigInteger, System.Numerics.BigInteger)</c>.
+ /// <para/><b>NOTE</b>: A greatest common divisor must be positive, but
+ /// <c>2^64</c> cannot be expressed as a <see cref="long"/> although it
+ /// is the GCD of <see cref="long.MinValue"/> and <c>0</c> and the GCD of
+ /// <see cref="long.MinValue"/> and <see cref="long.MinValue"/>. So in these 2 cases,
+ /// and only them, this method will return <see cref="long.MinValue"/>.
/// </summary>
// see http://en.wikipedia.org/wiki/Binary_GCD_algorithm#Iterative_version_in_C.2B.2B_using_ctz_.28count_trailing_zeros.29
public static long Gcd(long a, long b)
@@ -104,14 +104,14 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Calculates inverse hyperbolic sine of a {@code double} value.
- /// <p>
+ /// Calculates inverse hyperbolic sine of a <see cref="double"/> value.
+ /// <para/>
/// Special cases:
- /// <ul>
- /// <li>If the argument is NaN, then the result is NaN.
- /// <li>If the argument is zero, then the result is a zero with the same sign as the argument.
- /// <li>If the argument is infinite, then the result is infinity with the same sign as the argument.
- /// </ul>
+ /// <list type="bullet">
+ /// <item><description>If the argument is NaN, then the result is NaN.</description></item>
+ /// <item><description>If the argument is zero, then the result is a zero with the same sign as the argument.</description></item>
+ /// <item><description>If the argument is infinite, then the result is infinity with the same sign as the argument.</description></item>
+ /// </list>
/// </summary>
public static double Asinh(double a)
{
@@ -131,15 +131,15 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Calculates inverse hyperbolic cosine of a {@code double} value.
- /// <p>
+ /// Calculates inverse hyperbolic cosine of a <see cref="double"/> value.
+ /// <para/>
/// Special cases:
- /// <ul>
- /// <li>If the argument is NaN, then the result is NaN.
- /// <li>If the argument is +1, then the result is a zero.
- /// <li>If the argument is positive infinity, then the result is positive infinity.
- /// <li>If the argument is less than 1, then the result is NaN.
- /// </ul>
+ /// <list type="bullet">
+ /// <item><description>If the argument is NaN, then the result is NaN.</description></item>
+ /// <item><description>If the argument is +1, then the result is a zero.</description></item>
+ /// <item><description>If the argument is positive infinity, then the result is positive infinity.</description></item>
+ /// <item><description>If the argument is less than 1, then the result is NaN.</description></item>
+ /// </list>
/// </summary>
public static double Acosh(double a)
{
@@ -147,16 +147,16 @@ namespace Lucene.Net.Util
}
/// <summary>
- /// Calculates inverse hyperbolic tangent of a {@code double} value.
- /// <p>
+ /// Calculates inverse hyperbolic tangent of a <see cref="double"/> value.
+ /// <para/>
/// Special cases:
- /// <ul>
- /// <li>If the argument is NaN, then the result is NaN.
- /// <li>If the argument is zero, then the result is a zero with the same sign as the argument.
- /// <li>If the argument is +1, then the result is positive infinity.
- /// <li>If the argument is -1, then the result is negative infinity.
- /// <li>If the argument's absolute value is greater than 1, then the result is NaN.
- /// </ul>
+ /// <list type="bullet">
+ /// <item><description>If the argument is NaN, then the result is NaN.</description></item>
+ /// <item><description>If the argument is zero, then the result is a zero with the same sign as the argument.</description></item>
+ /// <item><description>If the argument is +1, then the result is positive infinity.</description></item>
+ /// <item><description>If the argument is -1, then the result is negative infinity.</description></item>
+ /// <item><description>If the argument's absolute value is greater than 1, then the result is NaN.</description></item>
+ /// </list>
/// </summary>
public static double Atanh(double a)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/MergedIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/MergedIterator.cs b/src/Lucene.Net/Util/MergedIterator.cs
index 82f7951..668bfdf 100644
--- a/src/Lucene.Net/Util/MergedIterator.cs
+++ b/src/Lucene.Net/Util/MergedIterator.cs
@@ -24,24 +24,25 @@ namespace Lucene.Net.Util
/// <summary>
/// Provides a merged sorted view from several sorted iterators.
- /// <p>
- /// If built with <code>removeDuplicates</code> set to true and an element
+ /// <para/>
+ /// If built with <see cref="removeDuplicates"/> set to <c>true</c> and an element
/// appears in multiple iterators then it is deduplicated, that is this iterator
/// returns the sorted union of elements.
- /// <p>
- /// If built with <code>removeDuplicates</code> set to false then all elements
+ /// <para/>
+ /// If built with <see cref="removeDuplicates"/> set to <c>false</c> then all elements
/// in all iterators are returned.
- /// <p>
+ /// <para/>
/// Caveats:
- /// <ul>
- /// <li>The behavior is undefined if the iterators are not actually sorted.
- /// <li>Null elements are unsupported.
- /// <li>If removeDuplicates is set to true and if a single iterator contains
- /// duplicates then they will not be deduplicated.
- /// <li>When elements are deduplicated it is not defined which one is returned.
- /// <li>If removeDuplicates is set to false then the order in which duplicates
- /// are returned isn't defined.
- /// </ul>
+ /// <list type="bullet">
+ /// <item><description>The behavior is undefined if the iterators are not actually sorted.</description></item>
+ /// <item><description>Null elements are unsupported.</description></item>
+ /// <item><description>If <see cref="removeDuplicates"/> is set to <c>true</c> and if a single iterator contains
+ /// duplicates then they will not be deduplicated.</description></item>
+ /// <item><description>When elements are deduplicated it is not defined which one is returned.</description></item>
+ /// <item><description>If <see cref="removeDuplicates"/> is set to <c>false</c> then the order in which duplicates
+ /// are returned isn't defined.</description></item>
+ /// </list>
+ /// <para/>
/// @lucene.internal
/// </summary>
public sealed class MergedIterator<T> : IEnumerator<T>
@@ -151,112 +152,6 @@ namespace Lucene.Net.Util
numTop = 0;
}
- /*private T Current;
- private readonly TermMergeQueue<T> Queue;
- private readonly SubIterator<T>[] Top;
- private readonly bool RemoveDuplicates;
- private int NumTop;
-
- public MergedIterator(params IEnumerator<T>[] iterators) : this(true, iterators)
- {
- }
-
- public MergedIterator(bool removeDuplicates, params IEnumerator<T>[] iterators)
- {
- this.RemoveDuplicates = removeDuplicates;
- Queue = new TermMergeQueue<T>(iterators.Length);
- Top = new SubIterator[iterators.Length];
- int index = 0;
- foreach (IEnumerator<T> iterator in iterators)
- {
- if (iterator.HasNext())
- {
- SubIterator<T> sub = new SubIterator<T>();
- sub.Current = iterator.next();
- sub.Iterator = iterator;
- sub.Index = index++;
- Queue.Add(sub);
- }
- }
- }
-
- public override bool HasNext()
- {
- if (Queue.Size() > 0)
- {
- return true;
- }
-
- for (int i = 0; i < NumTop; i++)
- {
- if (Top[i].Iterator.hasNext())
- {
- return true;
- }
- }
- return false;
- }
-
- public override T Next()
- {
- // restore queue
- PushTop();
-
- // gather equal top elements
- if (Queue.Size() > 0)
- {
- PullTop();
- }
- else
- {
- Current = default(T);
- }
- if (Current == null)
- {
- throw new NoSuchElementException();
- }
- return Current;
- }
-
- public override void Remove()
- {
- throw new System.NotSupportedException();
- }
-
- private void PullTop()
- {
- Debug.Assert(NumTop == 0);
- Top[NumTop++] = Queue.Pop();
- if (RemoveDuplicates)
- {
- // extract all subs from the queue that have the same top element
- while (Queue.Size() != 0 && Queue.Top().Current.Equals(Top[0].Current))
- {
- Top[NumTop++] = Queue.Pop();
- }
- }
- Current = Top[0].Current;
- }
-
- private void PushTop()
- {
- // call next() on each top, and put back into queue
- for (int i = 0; i < NumTop; i++)
- {
- if (Top[i].Iterator.hasNext())
- {
- Top[i].Current = Top[i].Iterator.next();
- Queue.Add(Top[i]);
- }
- else
- {
- // no more elements
- Top[i].Current = default(T);
- }
- }
- NumTop = 0;
- }*/
-
private class SubIterator<I>
where I : IComparable<I>
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/268e78d4/src/Lucene.Net/Util/MutableBits.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/MutableBits.cs b/src/Lucene.Net/Util/MutableBits.cs
index a03aff7..117a707 100644
--- a/src/Lucene.Net/Util/MutableBits.cs
+++ b/src/Lucene.Net/Util/MutableBits.cs
@@ -18,13 +18,13 @@ namespace Lucene.Net.Util
*/
/// <summary>
- /// Extension of Bits for live documents.
+ /// Extension of <see cref="IBits"/> for live documents.
/// </summary>
public interface IMutableBits : IBits
{
/// <summary>
- /// Sets the bit specified by <code>index</code> to false. </summary>
- /// <param name="index"> index, should be non-negative and < <seealso cref="#length()"/>.
+ /// Sets the bit specified by <paramref name="index"/> to <c>false</c>. </summary>
+ /// <param name="index"> index, should be non-negative and < <see cref="IBits.Length"/>.
/// The result of passing negative or out of bounds values is undefined
/// by this interface, <b>just don't do it!</b> </param>
void Clear(int index);