}
private void checkContent( String content )throws InvalidDatatypeValueException {
if ( (fFacetsDefined & DatatypeValidator.FACET_PATTERN ) != 0 ) {
if ( fRegex == null || fRegex.matches( content) == false )
throw new InvalidDatatypeValueException("Value'"+content+
"does not match regular expression facet" + fPattern );
}
float f = 0;
try {
//System.out.println("content = " + content );
f = Float.valueOf(content).floatValue();
//System.out.println("f = " + f );
} catch (NumberFormatException nfe) {
if( content.equals("INF") ){
f=Float.POSITIVE_INFINITY;
} else if( content.equals("-INF") ){
f=Float.NEGATIVE_INFINITY;
} else if( content.equals("NaN" ) ) {
f=Float.NaN;
} else {
throw new InvalidDatatypeValueException(
getErrorString(DatatypeMessageProvider.NotFloat,
DatatypeMessageProvider.MSG_NONE,
new Object [] { content}));
}
}