@Status(stage=PRODUCTION, unitTests=COMPLETE) @Review(by="Kees Schotanus", at="2011-02-17") public enum EmailValidationPattern extends Enum<EmailValidationPattern>
Enum Constant and Description |
---|
BASIC
Basic pattern.
|
RFC2822
RFC2822 pattern.
|
Modifier and Type | Method and Description |
---|---|
Pattern |
getPattern()
Gets the pattern to verify an email address against.
|
boolean |
isValidEmail(String email)
Determines whether the supplied email is valid with respect to this
EmailValidationPattern.
|
static EmailValidationPattern |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EmailValidationPattern[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EmailValidationPattern BASIC
public static final EmailValidationPattern RFC2822
public static EmailValidationPattern[] values()
for (EmailValidationPattern c : EmailValidationPattern.values()) System.out.println(c);
public static EmailValidationPattern valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Pattern getPattern()
public boolean isValidEmail(String email)
email
- The email address to validate.Copyright © 2008–2018. All rights reserved.