Introducing the Zipper data structure 2 – Arrays, collections and data structuresIntroducing the Zipper data structure 2 – Arrays, collections and data structures
The remaining code handles the initialization of children in a lazy fashion (on demand): @Override public Collection<? extends Zippable> getChildren() { lazyGetChildren(); return (children != null) ? new LinkedList<>(Arrays.asList(children)) [...]