/** * Sets this.next to the next position in the message (from the given position), * which could be the next sibling, a new segment, or the next rep * of the parent. See next() for details. */ private boolean nextPosition(Position currPos, String direction, boolean makeNewSegmentIfNeeded) throws HL7Exception { boolean nextExists = true; if (isLast(currPos)) { nextExists = nextFromGroupEnd(currPos, direction, makeNewSegmentIfNeeded); } else { nextSibling(currPos); } return nextExists; }
/** * Sets this.next to the next position in the message (from the given position), * which could be the next sibling, a new segment, or the next rep * of the parent. See next() for details. */ private boolean nextPosition(Position currPos, String direction, boolean makeNewSegmentIfNeeded) throws HL7Exception { boolean nextExists = true; if (isLast(currPos)) { nextExists = nextFromGroupEnd(currPos, direction, makeNewSegmentIfNeeded); } else { nextSibling(currPos); } return nextExists; }