From f1249c4f0449260ff123e8da6b921a37fc058147 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Tue, 24 Jul 2018 12:39:42 -0700 Subject: [PATCH] Remove deprecated CharMatcher constants. RELNOTES=Removed deprecated `public static` fields from `CharMatcher`. Use the equivalent `public static` methods instead. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=205873973 --- .../com/google/common/base/CharMatcher.java | 182 ------------------ .../com/google/common/base/CharMatcher.java | 182 ------------------ 2 files changed, 364 deletions(-) diff --git a/android/guava/src/com/google/common/base/CharMatcher.java b/android/guava/src/com/google/common/base/CharMatcher.java index 370322db8535..6e150248e48f 100644 --- a/android/guava/src/com/google/common/base/CharMatcher.java +++ b/android/guava/src/com/google/common/base/CharMatcher.java @@ -288,188 +288,6 @@ public static CharMatcher singleWidth() { return SingleWidth.INSTANCE; } - // Legacy constants - - /** - * Determines whether a character is whitespace according to the latest Unicode - * standard, as illustrated - * here. - * This is not the same definition used by other Java APIs. (See a - * comparison of several definitions of - * "whitespace".) - * - *

Note: as the Unicode definition evolves, we will modify this constant - * to keep it up to date. - * - * @deprecated Use {@link #whitespace()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher WHITESPACE = whitespace(); - - /** - * Determines whether a character is a breaking whitespace (that is, a whitespace - * which can be interpreted as a break between words for formatting purposes). See - * {@link #whitespace} for a discussion of that term. - * - * @since 2.0 - * @deprecated Use {@link #breakingWhitespace()} instead. This constant is scheduled - * to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher BREAKING_WHITESPACE = breakingWhitespace(); - - /** - * Determines whether a character is ASCII, meaning that its code point is less than - * 128. - * - * @deprecated Use {@link #ascii()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher ASCII = ascii(); - - /** - * Determines whether a character is a digit according to - * - * Unicode. If you only care to match ASCII digits, you can use - * {@code inRange('0', '9')}. - * - * @deprecated Many digits are supplementary characters; see the class - * documentation. If you need to use this, use {@link #digit()} instead. This - * . constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher DIGIT = digit(); - - /** - * Determines whether a character is a digit according to - * {@linkplain Character#isDigit(char) Java's definition}. If you only care to match - * ASCII digits, you can use {@code inRange('0', '9')}. - * - * @deprecated Many digits are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaDigit()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_DIGIT = javaDigit(); - - /** - * Determines whether a character is a letter according to - * {@linkplain Character#isLetter(char) Java's definition}. If you only care to - * match letters of the Latin alphabet, you can use - * {@code inRange('a', 'z').or(inRange('A', 'Z'))}. - * - * @deprecated Most letters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaLetter()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_LETTER = javaLetter(); - - /** - * Determines whether a character is a letter or digit according to - * {@linkplain Character#isLetterOrDigit(char) Java's definition}. - * - * @deprecated Most letters and digits are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaLetterOrDigit()} - * instead. This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_LETTER_OR_DIGIT = javaLetterOrDigit(); - - /** - * Determines whether a character is upper case according to - * {@linkplain Character#isUpperCase(char) Java's definition}. - * - * @deprecated Some uppercase letters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaUpperCase()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_UPPER_CASE = javaUpperCase(); - - /** - * Determines whether a character is lower case according to - * {@linkplain Character#isLowerCase(char) Java's definition}. - * - * @deprecated Some lowercase letters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaLowerCase()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_LOWER_CASE = javaLowerCase(); - - /** - * Determines whether a character is an ISO control character as specified by - * {@link Character#isISOControl(char)}. - * - * @deprecated Use {@link #javaIsoControl()} instead. This constant is scheduled to - * be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_ISO_CONTROL = javaIsoControl(); - - /** - * Determines whether a character is invisible; that is, if its Unicode category is - * any of SPACE_SEPARATOR, LINE_SEPARATOR, PARAGRAPH_SEPARATOR, CONTROL, FORMAT, - * SURROGATE, and PRIVATE_USE according to ICU4J. - * - * @deprecated Most invisible characters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #invisible()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher INVISIBLE = invisible(); - - /** - * Determines whether a character is single-width (not double-width). When in doubt, - * this matcher errs on the side of returning {@code false} (that is, it tends to - * assume a character is double-width). - * - *

Note: as the reference file evolves, we will modify this constant to - * keep it up to date. - * - * @deprecated Many such characters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #singleWidth()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher SINGLE_WIDTH = singleWidth(); - - /** - * Matches any character. - * - * @deprecated Use {@link #any()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher ANY = any(); - - /** - * Matches no characters. - * - * @deprecated Use {@link #none()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher NONE = none(); - // Static factories /** Returns a {@code char} matcher that matches only one specified BMP character. */ diff --git a/guava/src/com/google/common/base/CharMatcher.java b/guava/src/com/google/common/base/CharMatcher.java index 370322db8535..6e150248e48f 100644 --- a/guava/src/com/google/common/base/CharMatcher.java +++ b/guava/src/com/google/common/base/CharMatcher.java @@ -288,188 +288,6 @@ public static CharMatcher singleWidth() { return SingleWidth.INSTANCE; } - // Legacy constants - - /** - * Determines whether a character is whitespace according to the latest Unicode - * standard, as illustrated - * here. - * This is not the same definition used by other Java APIs. (See a - * comparison of several definitions of - * "whitespace".) - * - *

Note: as the Unicode definition evolves, we will modify this constant - * to keep it up to date. - * - * @deprecated Use {@link #whitespace()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher WHITESPACE = whitespace(); - - /** - * Determines whether a character is a breaking whitespace (that is, a whitespace - * which can be interpreted as a break between words for formatting purposes). See - * {@link #whitespace} for a discussion of that term. - * - * @since 2.0 - * @deprecated Use {@link #breakingWhitespace()} instead. This constant is scheduled - * to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher BREAKING_WHITESPACE = breakingWhitespace(); - - /** - * Determines whether a character is ASCII, meaning that its code point is less than - * 128. - * - * @deprecated Use {@link #ascii()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher ASCII = ascii(); - - /** - * Determines whether a character is a digit according to - * - * Unicode. If you only care to match ASCII digits, you can use - * {@code inRange('0', '9')}. - * - * @deprecated Many digits are supplementary characters; see the class - * documentation. If you need to use this, use {@link #digit()} instead. This - * . constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher DIGIT = digit(); - - /** - * Determines whether a character is a digit according to - * {@linkplain Character#isDigit(char) Java's definition}. If you only care to match - * ASCII digits, you can use {@code inRange('0', '9')}. - * - * @deprecated Many digits are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaDigit()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_DIGIT = javaDigit(); - - /** - * Determines whether a character is a letter according to - * {@linkplain Character#isLetter(char) Java's definition}. If you only care to - * match letters of the Latin alphabet, you can use - * {@code inRange('a', 'z').or(inRange('A', 'Z'))}. - * - * @deprecated Most letters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaLetter()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_LETTER = javaLetter(); - - /** - * Determines whether a character is a letter or digit according to - * {@linkplain Character#isLetterOrDigit(char) Java's definition}. - * - * @deprecated Most letters and digits are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaLetterOrDigit()} - * instead. This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_LETTER_OR_DIGIT = javaLetterOrDigit(); - - /** - * Determines whether a character is upper case according to - * {@linkplain Character#isUpperCase(char) Java's definition}. - * - * @deprecated Some uppercase letters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaUpperCase()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_UPPER_CASE = javaUpperCase(); - - /** - * Determines whether a character is lower case according to - * {@linkplain Character#isLowerCase(char) Java's definition}. - * - * @deprecated Some lowercase letters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #javaLowerCase()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_LOWER_CASE = javaLowerCase(); - - /** - * Determines whether a character is an ISO control character as specified by - * {@link Character#isISOControl(char)}. - * - * @deprecated Use {@link #javaIsoControl()} instead. This constant is scheduled to - * be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher JAVA_ISO_CONTROL = javaIsoControl(); - - /** - * Determines whether a character is invisible; that is, if its Unicode category is - * any of SPACE_SEPARATOR, LINE_SEPARATOR, PARAGRAPH_SEPARATOR, CONTROL, FORMAT, - * SURROGATE, and PRIVATE_USE according to ICU4J. - * - * @deprecated Most invisible characters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #invisible()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher INVISIBLE = invisible(); - - /** - * Determines whether a character is single-width (not double-width). When in doubt, - * this matcher errs on the side of returning {@code false} (that is, it tends to - * assume a character is double-width). - * - *

Note: as the reference file evolves, we will modify this constant to - * keep it up to date. - * - * @deprecated Many such characters are supplementary characters; see the class - * documentation. If you need to use this, use {@link #singleWidth()} instead. - * This constant is scheduled to be removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher SINGLE_WIDTH = singleWidth(); - - /** - * Matches any character. - * - * @deprecated Use {@link #any()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher ANY = any(); - - /** - * Matches no characters. - * - * @deprecated Use {@link #none()} instead. This constant is scheduled to be - * removed in June 2018. - */ - @com.google.common.annotations.Beta - @Deprecated - public static final CharMatcher NONE = none(); - // Static factories /** Returns a {@code char} matcher that matches only one specified BMP character. */