public final class TelephoneNumberSyntaxChecker extends SyntaxChecker
A valid Telephone number respects more or less this syntax :
" *[+]? *((\([0-9- ,;/#*]+\))|[0-9- ,;/#*]+)+"If needed, and to allow more syntaxes, a list of regexps has been added which can be initialized to other values
| Modifier and Type | Class and Description |
|---|---|
static class |
TelephoneNumberSyntaxChecker.Builder
A static Builder for this class
|
SyntaxChecker.SCBuilder<SC>| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFAULT_REGEXP
The default pattern used to check a TelephoneNumber
|
private Pattern |
defaultPattern
The compiled default pattern
|
private String |
defaultRegexp
The default pattern
|
static TelephoneNumberSyntaxChecker |
INSTANCE
A static instance of TelephoneNumberSyntaxChecker
|
LOG, serialVersionUIDdescription, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification| Modifier | Constructor and Description |
|---|---|
private |
TelephoneNumberSyntaxChecker(String oid)
Creates a new instance of a child of this class, with an OID.
|
private |
TelephoneNumberSyntaxChecker(String oid,
String defaultRegexp,
Pattern defaultPattern)
Creates a new instance of a child of this class, with an OID.
|
| Modifier and Type | Method and Description |
|---|---|
static TelephoneNumberSyntaxChecker.Builder |
builder() |
String |
getRegexp()
Get the default regexp (either the original one, or the one that has been set)
|
boolean |
isValidSyntax(Object value)
Determines if the attribute's value conforms to the attribute syntax.
|
equals, setSchemaManager, toStringcopy, getBytecode, getFqcn, hashCode, isValid, setBytecode, setFqcnaddExtension, addExtension, addName, clear, compareOid, computeHashCode, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlockprivate static final String DEFAULT_REGEXP
private final String defaultRegexp
private final Pattern defaultPattern
public static final TelephoneNumberSyntaxChecker INSTANCE
private TelephoneNumberSyntaxChecker(String oid)
oid - the child's OIDprivate TelephoneNumberSyntaxChecker(String oid, String defaultRegexp, Pattern defaultPattern)
oid - the child's OIDdefaultRegexp - The regexp to usedefaultPattern - The compiled version of the regexppublic static TelephoneNumberSyntaxChecker.Builder builder()
public String getRegexp()
public boolean isValidSyntax(Object value)
isValidSyntax in class SyntaxCheckervalue - the value of some attribute with the syntaxCopyright © 2003–2019 The Apache Software Foundation. All rights reserved.