< prev index next >
src/java.base/share/classes/java/util/regex/Matcher.java
Print this page
rev 58552 : [mq]: 8241727-Typos-empty-lines-in-javadoc-inconsistent-indents-etc
*** 1,7 ****
/*
! * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 354,378 ****
}
}
/**
! * Changes the {@code Pattern} that this {@code Matcher} uses to
! * find matches with.
! *
! * <p> This method causes this matcher to lose information
! * about the groups of the last match that occurred. The
! * matcher's position in the input is maintained and its
! * last append position is unaffected.</p>
! *
! * @param newPattern
! * The new pattern used by this matcher
! * @return This matcher
! * @throws IllegalArgumentException
! * If newPattern is {@code null}
! * @since 1.5
! */
public Matcher usePattern(Pattern newPattern) {
if (newPattern == null)
throw new IllegalArgumentException("Pattern cannot be null");
parentPattern = newPattern;
--- 354,378 ----
}
}
/**
! * Changes the {@code Pattern} that this {@code Matcher} uses to
! * find matches with.
! *
! * <p> This method causes this matcher to lose information
! * about the groups of the last match that occurred. The
! * matcher's position in the input is maintained and its
! * last append position is unaffected.</p>
! *
! * @param newPattern
! * The new pattern used by this matcher
! * @return This matcher
! * @throws IllegalArgumentException
! * If newPattern is {@code null}
! * @since 1.5
! */
public Matcher usePattern(Pattern newPattern) {
if (newPattern == null)
throw new IllegalArgumentException("Pattern cannot be null");
parentPattern = newPattern;
< prev index next >