what is the replacement for ComponentContainer class in vaadin 14 Flow ?

I am working vaadin 14 upgrade from vaadin 8. I just want to know the replacement for ComponentContainer class in vaadin 14 Flow.

Please advise / suggest the possible alternate for ComponentContainer in vaadin 14 .

Maybe the HasComponents interface?

Olli Tietäväinen:
Maybe the HasComponents interface?

I am not able to iterate HasComponents by for loop or iterator.

Can i know how to iterate or loop HasComponents in vaadin 14.

If you want to access child components, then you’ll need the abstract class Component, which has getChildren()