com.twitter.twittertext

## Class Validator

- java.lang.Object
- - com.twitter.twittertext.Validator

-     public class Validator
      extends java.lang.Object

  A class for validating Tweet texts.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MAX_TWEET_LENGTH`
    `protected int` | `shortUrlLength`
    `protected int` | `shortUrlLengthHttps`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Validator()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getShortUrlLength()`
    `int` | `getShortUrlLengthHttps()`
    `int` | `getTweetLength(java.lang.String tweetText)` Deprecated. Use TwitterTextParser
    `static boolean` | `hasInvalidCharacters(java.lang.String text)`
    `boolean` | `isValidTweet(java.lang.String text)` Deprecated. Use TwitterTextParser
    `void` | `setShortUrlLength(int shortUrlLength)`
    `void` | `setShortUrlLengthHttps(int shortUrlLengthHttps)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MAX_TWEET_LENGTH

          public static final int MAX_TWEET_LENGTH

      See Also:
        Constant Field Values

    - #### shortUrlLength

          protected int shortUrlLength

    - #### shortUrlLengthHttps

          protected int shortUrlLengthHttps

  - ### Constructor Detail

    - #### Validator

          public Validator()

  - ### Method Detail

    - #### getTweetLength

          @Deprecated
          public int getTweetLength(java.lang.String tweetText)

      Deprecated. Use TwitterTextParser
      Returns the weighted length of a given tweet text
      Parameters:
        `tweetText` - the source to mark as modified.
      Returns:
        length of a tweet

    - #### isValidTweet

          @Deprecated
          public boolean isValidTweet(java.lang.String text)

      Deprecated. Use TwitterTextParser
      Checks if a given tweet text is valid.

    - #### hasInvalidCharacters

          public static boolean hasInvalidCharacters(java.lang.String text)

    - #### getShortUrlLength

          public int getShortUrlLength()

    - #### setShortUrlLength

          public void setShortUrlLength(int shortUrlLength)

    - #### getShortUrlLengthHttps

          public int getShortUrlLengthHttps()

    - #### setShortUrlLengthHttps

          public void setShortUrlLengthHttps(int shortUrlLengthHttps)