@Override public final boolean matchesCollection( final Role role, final INode position, final Match match, final BacktrackingInfo backtrackingInfo) { backtrackingInfo.stack.push(new PossibleMatch(position, match.getCheckPoint())); return _node.matches(position, match); }
@Override public final boolean matchesCollection( final Role role, final INode position, final Match match, final BacktrackingInfo backtrackingInfo) { backtrackingInfo.stack.push(new PossibleMatch(position, match.getCheckPoint())); return _node.matches(position, match); }
@Override public final boolean matchesCollection( final Role role, final INode position, final Match match, final BacktrackingInfo backtrackingInfo) { backtrackingInfo.stack.push(new PossibleMatch(position, match.getCheckPoint())); return _node.matches(position, match); }
@Override public final boolean matchesCollection( final Role role, final INode position, final Match match, final BacktrackingInfo backtrackingInfo) { final Stack<PossibleMatch> backtrackingStack = backtrackingInfo.stack; assert position == null || position.getRole() == role; int matchCount = 0; INode current = position; if (_minCount <= 0) backtrackingStack.push(new PossibleMatch(current, match.getCheckPoint())); while (matchCount < _maxCount && current != null && _node.matches(current, match)) { matchCount++; do { current = current.getNextSibling(); } while (current != null && current.getRole() != role); if (matchCount >= _minCount) { backtrackingStack.push(new PossibleMatch(current, match.getCheckPoint())); } } // // Never do a single-element match; always make the caller look at the results on the // back-tracking stack. // return false; }
@Override public final boolean matchesCollection( final Role role, final INode position, final Match match, final BacktrackingInfo backtrackingInfo) { final Stack<PossibleMatch> backtrackingStack = backtrackingInfo.stack; assert position == null || position.getRole() == role; int matchCount = 0; INode current = position; if (_minCount <= 0) backtrackingStack.push(new PossibleMatch(current, match.getCheckPoint())); while (matchCount < _maxCount && current != null && _node.matches(current, match)) { matchCount++; do { current = current.getNextSibling(); } while (current != null && current.getRole() != role); if (matchCount >= _minCount) { backtrackingStack.push(new PossibleMatch(current, match.getCheckPoint())); } } // // Never do a single-element match; always make the caller look at the results on the // back-tracking stack. // return false; }
@Override public final boolean matchesCollection( final Role role, final INode position, final Match match, final BacktrackingInfo backtrackingInfo) { final Stack<PossibleMatch> backtrackingStack = backtrackingInfo.stack; assert position == null || position.getRole() == role; int matchCount = 0; INode current = position; if (_minCount <= 0) backtrackingStack.push(new PossibleMatch(current, match.getCheckPoint())); while (matchCount < _maxCount && current != null && _node.matches(current, match)) { matchCount++; do { current = current.getNextSibling(); } while (current != null && current.getRole() != role); if (matchCount >= _minCount) { backtrackingStack.push(new PossibleMatch(current, match.getCheckPoint())); } } // // Never do a single-element match; always make the caller look at the results on the // back-tracking stack. // return false; }
stack.push(new PossibleMatch(firstOtherChild, match.getCheckPoint()));
stack.push(new PossibleMatch(firstOtherChild, match.getCheckPoint()));
stack.push(new PossibleMatch(firstOtherChild, match.getCheckPoint()));