21 using Term = Lucene.Net.Index.Term;
24 namespace Lucene.Net.Search
46 public virtual Term Prefix
48 get {
return prefix; }
57 public override System.String ToString(System.String field)
59 System.Text.StringBuilder buffer =
new System.Text.StringBuilder();
60 if (!prefix.Field.Equals(field))
62 buffer.Append(prefix.Field);
65 buffer.Append(prefix.Text);
68 return buffer.ToString();
72 public override int GetHashCode()
75 int result = base.GetHashCode();
76 result = prime * result + ((prefix == null)?0:prefix.GetHashCode());
81 public override bool Equals(System.Object obj)
85 if (!base.Equals(obj))
87 if (GetType() != obj.GetType())
92 if (other.prefix != null)
95 else if (!prefix.Equals(other.prefix))