19 using Lucene.Net.Support;
21 namespace Lucene.Net.Search
108 public static readonly
Sort RELEVANCE =
new Sort();
145 this.fields = fields;
156 public override System.String ToString()
158 System.Text.StringBuilder buffer =
new System.Text.StringBuilder();
160 for (
int i = 0; i < fields.Length; i++)
162 buffer.Append(fields[i].ToString());
163 if ((i + 1) < fields.Length)
171 public override bool Equals(System.Object o)
177 Sort other = (Sort) o;
180 if ((this.fields == null) && (other.fields == null))
182 else if ((this.fields != null) && (other.fields != null))
184 if (this.fields.Length == other.fields.Length)
186 int length = this.fields.Length;
188 for (
int i = 0; i < length; i++)
190 if (!(this.fields[i].Equals(other.fields[i])))
202 public override int GetHashCode()
207 return 0x45aaf665 + EquatableList<SortField>.GetHashCode(fields);