コード例 #1
0
ファイル: StringCharSequence.cs プロジェクト: introfog/J2N
 /// <summary>
 /// Determines whether this <see cref="StringCharSequence"/> is equal to <paramref name="other"/>.
 /// </summary>
 /// <param name="other">A <see cref="StringCharSequence"/> to compare to the current <see cref="StringCharSequence"/>.</param>
 /// <returns><c>true</c> if <paramref name="other"/> is equal to the current <see cref="StringCharSequence"/>; otherwise, <c>false</c>.</returns>
 public bool Equals(StringCharSequence other)
 {
     return(this.Equals(other.Value));
 }
コード例 #2
0
 /// <summary>
 /// Compares two character sequences and returns an indication of their relative sort order.
 /// </summary>
 /// <param name="x">A <see cref="ICharSequence"/> to compare to <paramref name="y"/>.</param>
 /// <param name="y">An <see cref="ICharSequence"/> to compare to <paramref name="x"/>.</param>
 /// <returns>
 /// A signed integer that indicates the relative values of <paramref name="x"/> and <paramref name="y"/>, as shown in the following table.
 /// <list type="table">
 ///     <listheader>
 ///         <term>Value</term>
 ///         <term>Meaning</term>
 ///     </listheader>
 ///     <item>
 ///         <term>Less than zero </term>
 ///         <term><paramref name="x"/> precedes y in the sort order. -or- <paramref name="x"/> is <c>null</c> and <paramref name="y"/> is not <c>null</c>.</term>
 ///     </item>
 ///     <item>
 ///         <term>Zero </term>
 ///         <term><paramref name="x"/> is equal to <paramref name="y"/>. -or- <paramref name="x"/> and <paramref name="y"/> are both <c>null</c>.</term>
 ///     </item>
 ///     <item>
 ///         <term>Greater than zero </term>
 ///         <term><paramref name="x"/> follows <paramref name="y"/> in the sort order. -or- <paramref name="y"/> is <c>null</c> and <paramref name="x"/> is not <c>null</c>.</term>
 ///     </item>
 /// </list>
 /// </returns>
 public virtual int Compare(ICharSequence x, StringCharSequence y) => Compare(x, y.Value);