void (Component root) { if (root instanceof Splitter) { Float prop = ((Splitter)root).getProportion(); proportions.add(prop); } if (root instanceof Container) { for (Component child : ((Container)root).getComponents()) { doSaveSplitterProportions(child); } } }