private CompositeIterator4 NewIterator() { Collection4 iterators = new Collection4(); iterators.Add(IntArrays4.NewIterator(new int[] { 1, 2, 3 })); iterators.Add(IntArrays4.NewIterator(new int[] { })); iterators.Add(IntArrays4.NewIterator(new int[] { 4 })); iterators.Add(IntArrays4.NewIterator(new int[] { 5, 6 })); CompositeIterator4 iterator = new CompositeIterator4(iterators.GetEnumerator()); return iterator; }
public ClusterQueryResultIntIterator(IEnumerator[] iterators) { _delegate = new CompositeIterator4(iterators); }
private void AssertIterator(CompositeIterator4 iterator) { Iterator4Assert.AreEqual(IntArrays4.NewIterator(new int[] { 1, 2, 3, 4, 5, 6 }), iterator); }
private IEnumerator CheckDuplicates(CompositeIterator4 executeAllCandidates) { return Iterators.Filter(executeAllCandidates, new _IPredicate4_573()); }
public virtual IEnumerator ExecuteSnapshot() { var r = CreateCandidateCollection(); var executionPath = ExecutionPath(r); IEnumerator candidatesIterator = new Iterator4Impl(r.candidateCollection); var snapshots = new Collection4(); while (candidatesIterator.MoveNext()) { var candidates = (QCandidates) candidatesIterator.Current; snapshots.Add(candidates.ExecuteSnapshot(executionPath)); } var snapshotsIterator = snapshots.GetEnumerator(); var resultingIDs = new CompositeIterator4(snapshotsIterator); if (!r.checkDuplicates) { return resultingIDs; } return CheckDuplicates(resultingIDs); }
public virtual IEnumerator ExecuteLazy() { CheckConstraintsEvaluationMode(); var r = CreateCandidateCollection(); var executionPath = ExecutionPath(r); IEnumerator candidateCollection = new Iterator4Impl(r.candidateCollection); MappingIterator executeCandidates = new _MappingIterator_438(executionPath, candidateCollection ); var resultingIDs = new CompositeIterator4(executeCandidates); if (!r.checkDuplicates) { return resultingIDs; } return CheckDuplicates(resultingIDs); }