DoubleDVpublic class DoubleDV extends TypeValidator Represent the schema type "double" |
Methods Summary |
---|
public int | compare(java.lang.Object value1, java.lang.Object value2)
return ((XDouble)value1).compareTo((XDouble)value2);
| public java.lang.Object | getActualValue(java.lang.String content, org.apache.xerces.impl.dv.ValidationContext context)
try{
return new XDouble(content);
} catch (NumberFormatException ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "double"});
}
| public short | getAllowedFacets()
return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE | XSSimpleTypeDecl.FACET_MINEXCLUSIVE );
| public boolean | isIdentical(java.lang.Object value1, java.lang.Object value2)
if (value2 instanceof XDouble) {
return ((XDouble)value1).isIdentical((XDouble)value2);
}
return false;
| static boolean | isPossibleFP(java.lang.String val)Returns true if it's possible that the given
string represents a valid floating point value
(excluding NaN, INF and -INF).
final int length = val.length();
for (int i = 0; i < length; ++i) {
char c = val.charAt(i);
if (!(c >= '0" && c <= '9" || c == '." ||
c == '-" || c == '+" || c == 'E" || c == 'e")) {
return false;
}
}
return true;
|
|