20 using Term = Lucene.Net.Index.Term;
23 namespace Lucene.Net.Search
33 protected internal Term currentTerm = null;
36 protected internal TermEnum actualEnum = null;
43 protected internal abstract bool TermCompare(
Term term);
46 public abstract float Difference();
49 public abstract bool EndEnum();
51 private bool isDisposed;
56 protected internal virtual void SetEnum(
TermEnum actualEnum)
58 this.actualEnum = actualEnum;
60 Term term = actualEnum.Term;
61 if (term != null && TermCompare(term))
70 public override int DocFreq()
72 if (currentTerm == null)
74 System.Diagnostics.Debug.Assert(actualEnum != null);
75 return actualEnum.DocFreq();
79 public override bool Next()
81 if (actualEnum == null)
84 while (currentTerm == null)
88 if (actualEnum.Next())
90 Term term = actualEnum.Term;
91 if (TermCompare(term))
109 get {
return currentTerm; }
112 protected override void Dispose(
bool disposing)
114 if (isDisposed)
return;
118 if (actualEnum != null)