Esempio n. 1
0
		private void  addVerticesUsingFilter(SupportClass.SetSupport vertexSet, SupportClass.SetSupport filter)
		{
			System.Object v;
			
			//UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
			for (System.Collections.IEnumerator i = vertexSet.GetEnumerator(); i.MoveNext(); )
			{
				v = ((DictionaryEntry)i.Current).Value;
				
				// note the use of short circuit evaluation            
				if (filter == null || filter.Contains(v))
				{
					addVertex(v);
				}
			}
		}
Esempio n. 2
0
		private void  addEdgesUsingFilter(SupportClass.SetSupport edgeSet, SupportClass.SetSupport filter)
		{
			Edge e;
			bool containsVertices;
			bool edgeIncluded;
			
			//UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'"
			for (System.Collections.IEnumerator i = edgeSet.GetEnumerator(); i.MoveNext(); )
			{
				e = (Edge)((DictionaryEntry)i.Current).Value;
				
				containsVertices = containsVertex(e.Source) && containsVertex(e.Target);
				
				// note the use of short circuit evaluation            
				edgeIncluded = (filter == null) || filter.Contains(e);
				
				if (containsVertices && edgeIncluded)
				{
					addEdge(e);
				}
			}
		}