org.whattf.datatype
Class Pattern

java.lang.Object
  extended by org.whattf.datatype.AbstractDatatype
      extended by 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

Field Summary
static Pattern THE_INSTANCE
          The singleton instance.
 
Fields inherited from interface org.relaxng.datatype.Datatype
ID_TYPE_ID, ID_TYPE_IDREF, ID_TYPE_IDREFS, ID_TYPE_NULL
 
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
 

Field Detail

THE_INSTANCE

public static final Pattern THE_INSTANCE
The singleton instance.

Constructor Detail

Pattern

private Pattern()
Package-private constructor

Method Detail

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 value
context - ignored
Throws:
DatatypeException - if the value isn't valid
See Also:
Datatype.checkValid(java.lang.String, org.relaxng.datatype.ValidationContext)