21 namespace Lucene.Net.Analysis.Tokenattributes
28 private int startOffset;
29 private int endOffset;
37 public virtual int StartOffset
39 get {
return startOffset; }
46 public virtual void SetOffset(
int startOffset,
int endOffset)
48 this.startOffset = startOffset;
49 this.endOffset = endOffset;
57 public virtual int EndOffset
59 get {
return endOffset; }
63 public override void Clear()
69 public override bool Equals(System.Object other)
78 OffsetAttribute o = (OffsetAttribute) other;
79 return o.startOffset == startOffset && o.endOffset == endOffset;
85 public override int GetHashCode()
87 int code = startOffset;
88 code = code * 31 + endOffset;
98 override public System.Object Clone()
101 impl.endOffset = endOffset;
102 impl.startOffset = startOffset;