internal TrieSegment(string sourceSegment, int offset, int length) { this.SetSegmentString(sourceSegment, offset, length); this.children = new SortedBuffer<TrieSegment, TrieSegmentComparer>(SegComparer); }
internal NodeSequence Union(ProcessingContext context, NodeSequence otherSeq) { NodeSequence sequence = context.CreateSequence(); SortedBuffer<QueryNode, QueryNodeComparer> buffer = new SortedBuffer<QueryNode, QueryNodeComparer>(staticQueryNodeComparerInstance); for (int i = 0; i < this.count; i++) { buffer.Add(this.items[i].Node); } for (int j = 0; j < otherSeq.count; j++) { buffer.Add(otherSeq.items[j].Node); } for (int k = 0; k < buffer.Count; k++) { sequence.Add(buffer[k]); } sequence.RenumberItems(); return sequence; }
internal TrieSegment(char firstChar, string segmentTail) { this.SetSegment(firstChar, segmentTail); this.children = new SortedBuffer<TrieSegment, TrieSegmentComparer>(SegComparer); }