Exemplo n.º 1
0
		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;
		}
Exemplo n.º 2
0
			public ClusterQueryResultIntIterator(IEnumerator[] iterators)
			{
				_delegate = new CompositeIterator4(iterators);
			}
Exemplo n.º 3
0
		private void AssertIterator(CompositeIterator4 iterator)
		{
			Iterator4Assert.AreEqual(IntArrays4.NewIterator(new int[] { 1, 2, 3, 4, 5, 6 }), 
				iterator);
		}
Exemplo n.º 4
0
 private IEnumerator CheckDuplicates(CompositeIterator4 executeAllCandidates)
 {
     return Iterators.Filter(executeAllCandidates, new _IPredicate4_573());
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
 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);
 }