java.util.regex.Matcher.resetForInput()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中java.util.regex.Matcher.resetForInput()方法的一些代码示例,展示了Matcher.resetForInput()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matcher.resetForInput()方法的具体详情如下:
包路径:java.util.regex.Matcher
类名称:Matcher
方法名:resetForInput

Matcher.resetForInput介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: robovm/robovm

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

代码示例来源:origin: ibinti/bugvm

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: com.bugvm/bugvm-rt

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: com.gluonhq/robovm-rt

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: MobiVM/robovm

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: FlexoVM/flexovm

this.regionStart = start;
this.regionEnd = end;
resetForInput();

代码示例来源:origin: ibinti/bugvm

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

代码示例来源:origin: MobiVM/robovm

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Sets a new pattern for the {@code Matcher}. Results of a previous find
 * get lost. The next attempt to find an occurrence of the {@link Pattern}
 * in the string will start at the beginning of the input.
 *
 * @param pattern
 *            the new {@code Pattern}.
 *
 * @return the {@code Matcher} itself.
 */
public Matcher usePattern(Pattern pattern) {
  if (pattern == null) {
    throw new IllegalArgumentException("pattern == null");
  }
  this.pattern = pattern;
  synchronized (this) {
    if (address != 0) {
      closeImpl(address);
      address = 0; // In case openImpl throws.
    }
    address = openImpl(pattern.address);
  }
  if (input != null) {
    resetForInput();
  }
  matchOffsets = new int[(groupCount() + 1) * 2];
  matchFound = false;
  return this;
}

相关文章