public void forEach(final PartPartsConsumer partPartsConsumer) {
        int idx = 0;
        if (parentParts != null) {
            for (final String part : parentParts) {
                partPartsConsumer.accept(idx++, part);
            }
        }
        if (leafPart != null) {
            partPartsConsumer.accept(idx++, leafPart);
        }
    }
@return The leaf part or null of this is an empty path
stroom-util-shared/src/main/java/stroom/util/shared/DocPath.java