public class EmailDomain extends AbstractStringDomain
AbstractStringDomain.PatternResolver
Constructor and Description |
---|
EmailDomain()
Creates a new EmailDomain instance.
|
EmailDomain(Characters chars)
Creates a new EmailDomain instance.
|
EmailDomain(int maxLength)
Creates a new EmailDomain instance.
|
EmailDomain(int maxLength,
Characters chars)
Creates a new EmailDomain instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String value)
Returns true if the given value belongs to this domain.
|
protected DataValue<String> |
dataValueOf(String value)
Returns a
DataValue for the given value in this domain. |
String |
getFormat()
Returns the format for values that belong to this domain.
|
protected void |
initLengthRange()
Defines the initial length range for values in this domain.
|
static boolean |
isEmail(String value)
Returns true if the given value is a valid email address
|
protected String |
newValue(ResolverContext context,
int length)
Returns a new random string of the given length for this domain.
|
void |
setFormat(String format)
Changes the format for values that belong to this domain.
|
candidates, generateMatchingValues, getCharacters, getLength, getMatching, getNotMatching, matchesPatterns, matchingCandidates, matchingValues, newValues, setExcludedStrings, setMatching, setMatching, setNotMatching, setNotMatching
getExcluded, getLengthRange, getMaxLength, getTypes, isNotExcluded, setExcluded, setLengthRange, setLengthRange, setLengthRange, setLengthRange, toString, values, valuesEqual
withFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
arrayOf, arrayOf, arrayOf, contains, containsObject, getType, select, selectValue
public EmailDomain()
public EmailDomain(int maxLength)
public EmailDomain(Characters chars)
public EmailDomain(int maxLength, Characters chars)
protected void initLengthRange()
initLengthRange
in class SequenceDomain<String>
public void setFormat(String format)
setFormat
in class AbstractValueDomain<String>
public String getFormat()
getFormat
in interface ValueDomain<String>
getFormat
in class AbstractValueDomain<String>
protected DataValue<String> dataValueOf(String value)
DataValue
for the given value in this domain.dataValueOf
in class AbstractStringDomain
public boolean contains(String value)
contains
in interface ValueDomain<String>
contains
in class AbstractStringDomain
public static boolean isEmail(String value)
protected String newValue(ResolverContext context, int length)
newValue
in class AbstractStringDomain
Copyright © 2024 The Cornutum Project. All rights reserved.