Lines Matching refs:elements
38 * A generic list of elements tracked in an alternative to be used in
45 * Once you start next()ing, do not try to add more elements. It will
58 * which bumps it to 1 meaning no more elements.
63 /** <summary>Track single elements w/o creating a list. Upon 2nd add, alloc list */
67 protected IList elements;
98 public RewriteRuleElementStream(ITreeAdaptor adaptor, string elementDescription, IList elements)
101 this.elements = elements;
106 * not consumed any of its elements. Elements themselves are untouched.
121 if (elements != null) { // if in list, just add
122 elements.Add(el);
125 if (singleElement == null) { // no elements yet, track w/o list
130 elements = new List<object>(5);
131 elements.Add(singleElement);
133 elements.Add(el);
137 * Return the next element in the stream. If out of elements, throw
138 * an exception unless size()==1. If size is 1, then return elements[0].
139 * Return a duplicate node/subtree if stream is out of elements and
146 // if out of elements and size is 1, dup
159 * if the stream is empty or we're out of elements and size>1.
168 if (cursor >= n) { // out of elements?
172 // out of elements and size was not 1, so we can't dup
175 // we have elements
180 // must have more than one in list, pull from elements
181 object o = ToTree(elements[cursor]);
207 (elements != null && cursor < elements.Count);
217 if (elements != null) {
218 return elements.Count;