Lines Matching refs:horizon

1042     // Finds the specified pattern in the buffer up to horizon.
1044 private String findPatternInBuffer(Pattern pattern, int horizon) {
1050 if (horizon > 0) {
1051 horizonLimit = position + horizon;
1058 // The match may be longer if didn't hit horizon or real end
1067 // that it is at the horizon and the end of input is
1073 // Did not hit end, or hit real end, or hit horizon
1081 // If there is no specified horizon, or if we have not searched
1082 // to the specified horizon yet, get more input
1083 if ((horizon == 0) || (searchLimit != horizonLimit))
1657 // with "horizon=0" will scan beyond the line bound.
1671 * <tt>findWithinHorizon(Pattern.compile(pattern, horizon))</tt>.
1676 * @throws IllegalArgumentException if horizon is negative
1678 public String findWithinHorizon(String pattern, int horizon) {
1679 return findWithinHorizon(patternCache.forName(pattern), horizon);
1686 * search horizon, ignoring delimiters. If the pattern is found the
1692 * <p>A scanner will never search more than <code>horizon</code> code
1694 * by the horizon; that is, an arbitrary match result may have been
1695 * different if the horizon had been larger. The scanner treats the
1696 * horizon as a transparent, non-anchoring bound (see {@link
1699 * <p>If horizon is <code>0</code>, then the horizon is ignored and
1704 * <p>If horizon is negative, then an IllegalArgumentException is
1710 * @throws IllegalArgumentException if horizon is negative
1712 public String findWithinHorizon(Pattern pattern, int horizon) {
1716 if (horizon < 0)
1717 throw new IllegalArgumentException("horizon < 0");
1722 String token = findPatternInBuffer(pattern, horizon);