Skip to content

Commit

Permalink
Remove deprecated CharMatcher constants.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cpovirk authored and ronshapiro committed Jul 31, 2018
1 parent 591825f commit f1249c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 364 deletions.
182 changes: 0 additions & 182 deletions android/guava/src/com/google/common/base/CharMatcher.java
Expand Up @@ -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
* <a
// href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bwhitespace%7D">here</a>.
* This is not the same definition used by other Java APIs. (See a
* <a href="https://goo.gl/Y6SLWx">comparison of several definitions of
* "whitespace"</a>.)
*
* <p><b>Note:</b> 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
* <a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bdigit%7D">
* Unicode</a>. 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).
*
* <p><b>Note:</b> 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. */
Expand Down
182 changes: 0 additions & 182 deletions guava/src/com/google/common/base/CharMatcher.java
Expand Up @@ -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
* <a
// href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bwhitespace%7D">here</a>.
* This is not the same definition used by other Java APIs. (See a
* <a href="https://goo.gl/Y6SLWx">comparison of several definitions of
* "whitespace"</a>.)
*
* <p><b>Note:</b> 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
* <a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bdigit%7D">
* Unicode</a>. 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).
*
* <p><b>Note:</b> 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. */
Expand Down

0 comments on commit f1249c4

Please sign in to comment.