/** * Creates a new instance of {@code ConfigurationNodeIteratorChildren} and * initializes it. * * @param parent the parent pointer * @param nodeTest the test selecting the sub nodes * @param reverse the reverse flag * @param startsWith the first element of the iteration */ public ConfigurationNodeIteratorChildren( final ConfigurationNodePointer<T> parent, final NodeTest nodeTest, final boolean reverse, final ConfigurationNodePointer<T> startsWith) { super(parent, reverse); final T root = parent.getConfigurationNode(); subNodes = createSubNodeList(root, nodeTest); if (startsWith != null) { setStartOffset(findStartIndex(subNodes, startsWith.getConfigurationNode())); } else { if (reverse) { setStartOffset(size()); } } }