Lines Matching defs:horizon

996     // Finds the specified pattern in the buffer up to horizon.
999 private boolean findPatternInBuffer(Pattern pattern, int horizon) {
1005 if (horizon > 0) {
1006 horizonLimit = position + horizon;
1013 // The match may be longer if didn't hit horizon or real end
1022 // that it is at the horizon and the end of input is
1028 // Did not hit end, or hit real end, or hit horizon
1036 // If there is no specified horizon, or if we have not searched
1037 // to the specified horizon yet, get more input
1038 if ((horizon == 0) || (searchLimit != horizonLimit))
1626 // with "horizon=0" will scan beyond the line bound.
1640 * {@code findWithinHorizon(Pattern.compile(pattern), horizon)}.
1643 * @param horizon the search horizon
1646 * @throws IllegalArgumentException if horizon is negative
1648 public String findWithinHorizon(String pattern, int horizon) {
1649 return findWithinHorizon(patternCache.forName(pattern), horizon);
1656 * search horizon, ignoring delimiters. If the pattern is found the
1662 * <p>A scanner will never search more than {@code horizon} code
1664 * by the horizon; that is, an arbitrary match result may have been
1665 * different if the horizon had been larger. The scanner treats the
1666 * horizon as a transparent, non-anchoring bound (see {@link
1669 * <p>If horizon is {@code 0}, then the horizon is ignored and
1674 * <p>If horizon is negative, then an IllegalArgumentException is
1678 * @param horizon the search horizon
1681 * @throws IllegalArgumentException if horizon is negative
1683 public String findWithinHorizon(Pattern pattern, int horizon) {
1687 if (horizon < 0)
1688 throw new IllegalArgumentException("horizon < 0");
1694 if (findPatternInBuffer(pattern, horizon)) {