Esempio n. 1
0
        private static void test(Iterable collection)
        {
            collection.Add(3);
            collection.Add(4);
            collection.Add(5);
            collection.Add(6);

            Iterator iterator = collection.GetIterator();

            Console.WriteLine("Elements in a Collection: ");

            while (iterator.HasNext())
            {
                Console.WriteLine("\t" + iterator.GetItem() + " ");
            }
        }
Esempio n. 2
0
 public bool HasNext()
 {
     return(_entrySet.GetIterator().HasNext());
 }