TrackItemStreamGenerator in Scala