isTraversableAgain is declared final in GenTraversableLike and with its plethora of Known Subclasses, I would like to know the usage of the function and the wisdom behind its being final.
isTraversableAgain is declared final in GenTraversableLike and with its plethora of Known Subclasses ,
Share
That method is defined on
GenTraversableOnce, which is kind of a father to everything. Among that everything isIterator, which can only be traversed once, and everything else, which is expected to be traversable multiple times. Though, of course, you can go up toGenTraversableOnceorTraversableOnceand subclass it with something else that is only traversable once.The methods declared on
GenTraversableLikerely on being able to traverse a collection multiple times.