public class Validator extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_TWEET_LENGTH |
protected int |
shortUrlLength |
protected int |
shortUrlLengthHttps |
| Constructor and Description |
|---|
Validator() |
| Modifier and Type | Method and Description |
|---|---|
int |
getShortUrlLength() |
int |
getShortUrlLengthHttps() |
int |
getTweetLength(String tweetText)
Deprecated.
Use TwitterTextParser
|
static boolean |
hasInvalidCharacters(String text) |
boolean |
isValidHashtag(String text)
Checks if a given text is a valid hashtag.
|
boolean |
isValidTweet(String text)
Deprecated.
Use TwitterTextParser
|
void |
setShortUrlLength(int shortUrlLength) |
void |
setShortUrlLengthHttps(int shortUrlLengthHttps) |
public static final int MAX_TWEET_LENGTH
protected int shortUrlLength
protected int shortUrlLengthHttps
@Deprecated public int getTweetLength(String tweetText)
tweetText - the source to mark as modified.@Deprecated public boolean isValidTweet(String text)
public boolean isValidHashtag(String text)
text - text to validatepublic static boolean hasInvalidCharacters(String text)
public int getShortUrlLength()
public void setShortUrlLength(int shortUrlLength)
public int getShortUrlLengthHttps()
public void setShortUrlLengthHttps(int shortUrlLengthHttps)
Copyright © 2020. All rights reserved.