NightOwl888 commented on code in PR #1049: URL: https://github.com/apache/lucenenet/pull/1049#discussion_r1867357716
########## src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs: ########## @@ -62,37 +62,33 @@ public interface ICharTermAttribute : IAttribute, ICharSequence, IAppendable char[] ResizeBuffer(int newSize); /// <summary> - /// Gets or Sets the number of valid characters (in + /// Gets or sets the number of valid characters (length of the term) in /// the termBuffer array. - /// <seealso cref="SetLength(int)"/> - /// </summary> - new int Length { get; set; } // LUCENENET: To mimic StringBuilder, we allow this to be settable. - - // LUCENENET specific: Redefining this[] to make it settable - new char this[int index] { get; set; } - - /// <summary> - /// Set number of valid characters (length of the term) in - /// the termBuffer array. Use this to truncate the termBuffer + /// Use this setter to truncate the termBuffer /// or to synchronize with external manipulation of the termBuffer. /// Note: to grow the size of the array, /// use <see cref="ResizeBuffer(int)"/> first. - /// NOTE: This is exactly the same operation as calling the <see cref="Length"/> setter, the primary - /// difference is that this method returns a reference to the current object so it can be chained. - /// <code> - /// obj.SetLength(30).Append("hey you"); - /// </code> /// </summary> - /// <param name="length"> the truncated length </param> - ICharTermAttribute SetLength(int length); + /// <remarks> + /// LUCENENET: To mimic StringBuilder, we allow this to be settable. + /// This replaces the chainable SetLength method in the Java version. Review Comment: It isn't really fair to say this replaces the chainable `SetLength()` method as to supplement it. Let's change this to read: ```c# // The setter may be used as an alternative to <see cref="CharTermAttributeExtensions.SetLength{T}(T, int)"/> if chaining is not required. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org