sources[0] = new TermSource(source, terms[0]); for (int i = 1; i < terms.length; i++) { sources[i] = new TermSource(source.deepCopy(env), terms[i], notFlag[i]);
sources[0] = new TermSource(source, terms[0]); for (int i = 1; i < terms.length; i++) { sources[i] = new TermSource(source.deepCopy(env), terms[i], notFlag[i]);
/** * @deprecated since 1.6.0 */ @Deprecated public void addSource(SortedKeyValueIterator<Key,Value> source, IteratorEnvironment env, Text term, boolean notFlag) { // Check if we have space for the added Source if (sources == null) { sources = new TermSource[1]; } else { // allocate space for node, and copy current tree. // TODO: Should we change this to an ArrayList so that we can just add() ? - ACCUMULO-1309 TermSource[] localSources = new TermSource[sources.length + 1]; int currSource = 0; for (TermSource myTerm : sources) { // TODO: Do I need to call new here? or can I just re-use the term? - ACCUMULO-1309 localSources[currSource] = new TermSource(myTerm); currSource++; } sources = localSources; } sources[sourcesCount] = new TermSource(source.deepCopy(env), term, notFlag); sourcesCount++; }
private IntersectingIterator(IntersectingIterator other, IteratorEnvironment env) { if (other.sources != null) { sourcesCount = other.sourcesCount; sources = new TermSource[sourcesCount]; for (int i = 0; i < sourcesCount; i++) { sources[i] = new TermSource(other.sources[i].iter.deepCopy(env), other.sources[i].term); } } }
private IntersectingIterator(IntersectingIterator other, IteratorEnvironment env) { if (other.sources != null) { sourcesCount = other.sourcesCount; sources = new TermSource[sourcesCount]; for (int i = 0; i < sourcesCount; i++) { sources[i] = new TermSource(other.sources[i].iter.deepCopy(env), other.sources[i].term); } } }