org.whattf.datatype
Class Pattern
java.lang.Object
org.whattf.datatype.AbstractDatatype
org.whattf.datatype.Pattern
- All Implemented Interfaces:
- Datatype
public final class Pattern
- extends AbstractDatatype
This datatype shall accept the strings that are allowed as the value of the Web Forms 2.0
pattern
attribute.
- Version:
- $Id: Pattern.java,v 1.5 2006/11/18 11:51:44 hsivonen Exp $
- Author:
- hsivonen
Constructor Summary |
private |
Pattern()
Package-private constructor |
Method Summary |
void |
checkValid(CharSequence literal)
Checks that the value compiles as an anchored JavaScript regular expression. |
Methods inherited from class org.whattf.datatype.AbstractDatatype |
checkValid, createStreamingValidator, createValue, getIdType, isContextDependent, isValid, isWhitespace, sameValue, toAsciiLowerCase, toAsciiLowerCase, valueHashCode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THE_INSTANCE
public static final Pattern THE_INSTANCE
- The singleton instance.
Pattern
private Pattern()
- Package-private constructor
checkValid
public void checkValid(CharSequence literal)
throws DatatypeException
- Checks that the value compiles as an anchored JavaScript regular expression.
- Specified by:
checkValid
in class AbstractDatatype
- Parameters:
literal
- the valuecontext
- ignored
- Throws:
DatatypeException
- if the value isn't valid- See Also:
Datatype.checkValid(java.lang.String, org.relaxng.datatype.ValidationContext)