Muster: Interpreter (Motivation)

(Wdhlg. Iterator)

enum Color { Red, Green, Blue }
class Data { int x; color c, }
class Store { 
  Collection<Data> contents; 
  Iterable<Data> all ();
}

interface Iterable<K> { Iterator<K> iterator(); }
interface Iterator<K> { .. }



Johannes Waldmann 2008-06-18