Package com.irurueta.commons.validators
Class EmailValidator
- java.lang.Object
-
- com.irurueta.commons.validators.EmailValidator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EMAIL_FORMAT_REGEX
Regular expression to validate email format.private java.util.regex.Pattern
mEmailPattern
Pattern to validate email addresses using regular expression defined in EMAIL_FORMAT_REGEX.private static java.lang.ref.SoftReference<EmailValidator>
mSingleton
Soft reference to the singleton of this class.
-
Constructor Summary
Constructors Modifier Constructor Description private
EmailValidator()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EmailValidator
getInstance()
Creates or obtains the singleton instance of this class.boolean
isValid(java.lang.String email)
Indicates whether provided email has a valid format.
-
-
-
Field Detail
-
EMAIL_FORMAT_REGEX
public static final java.lang.String EMAIL_FORMAT_REGEX
Regular expression to validate email format.- See Also:
- Constant Field Values
-
mSingleton
private static java.lang.ref.SoftReference<EmailValidator> mSingleton
Soft reference to the singleton of this class.
-
mEmailPattern
private final java.util.regex.Pattern mEmailPattern
Pattern to validate email addresses using regular expression defined in EMAIL_FORMAT_REGEX.
-
-
Method Detail
-
getInstance
public static EmailValidator getInstance()
Creates or obtains the singleton instance of this class.- Returns:
- singleton instance of this class.
-
-