Skip to content

Commit 8237d31

Browse files
committed
soft deprecate peek(), then()
1 parent c79566b commit 8237d31

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mug/src/main/java/com/google/mu/util/Substring.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,9 @@ public Pattern skip(int fromBeginning, int fromEnd) {
12231223
* pattern after it has matched this pattern. For example {@code first('/').then(first('/'))}
12241224
* finds the second '/' character.
12251225
*
1226+
* <p>This method is soft-deprecated. It's prone to misuse. You should usually use other methods
1227+
* to achieve similar effects.
1228+
*
12261229
* @since 5.7
12271230
*/
12281231
public final Pattern then(Pattern following) {
@@ -1287,6 +1290,9 @@ public Pattern negativeLookaround(String lookbehind, String lookahead) {
12871290
* anchor {@code '\b'}, consider using {@link #separatedBy} if the boundary can be detected by
12881291
* a character.
12891292
*
1293+
* <p>This method is soft-deprecated. It's prone to misuse. You should usually use other methods
1294+
* to achieve similar effects.
1295+
*
12901296
* @since 6.0
12911297
*/
12921298
public Pattern peek(Pattern following) {

0 commit comments

Comments
 (0)