Esempio n. 1
0
 public void recorrer()
 {
     //Console.WriteLine("Recorro iterador");
     if (it == null)
     {
         it = new IteradorConjunto <T>(this);
     }
     if (this.datos.Count > 0)
     {
         while (!it.fin())
         {
             foreach (Comparable elem in datos)
             {
                 Console.WriteLine(elem);
                 it.siguiente();
             }
         }
     }
 }
Esempio n. 2
0
 public Iterador crearIterador()
 {
     //Console.WriteLine("\nCreo iterador");
     it = new IteradorConjunto <T>(this);
     return(it);
 }