FileDocCategorySizeDatePackage
TypeValidator.javaAPI DocJava SE 6 API4085Tue Jun 10 00:22:42 BST 2008com.sun.org.apache.xerces.internal.impl.dv.xs

TypeValidator

public abstract class TypeValidator extends Object
All primitive types plus ID/IDREF/ENTITY/INTEGER are derived from this abstract class. It provides extra information XSSimpleTypeDecl requires from each type: allowed facets, converting String to actual value, check equality, comparison, etc.
xerces.internal
author
Neeraj Bajaj, Sun Microsystems, inc.
author
Sandy Gao, IBM
version
$Id: TypeValidator.java,v 1.2.6.1 2005/09/06 11:43:09 neerajbj Exp $

Fields Summary
public static final short
LESS_THAN
public static final short
EQUAL
public static final short
GREATER_THAN
public static final short
INDETERMINATE
Constructors Summary
Methods Summary
public voidcheckExtraRules(java.lang.Object value, com.sun.org.apache.xerces.internal.impl.dv.ValidationContext context)

    
public intcompare(java.lang.Object value1, java.lang.Object value2)

        return -1;
    
public abstract java.lang.ObjectgetActualValue(java.lang.String content, com.sun.org.apache.xerces.internal.impl.dv.ValidationContext context)

public abstract shortgetAllowedFacets()

public intgetDataLength(java.lang.Object value)

        return (value instanceof String) ? ((String)value).length() : -1;
    
public static final intgetDigit(char ch)

        return isDigit(ch) ? ch - '0" : -1;
    
public intgetFractionDigits(java.lang.Object value)

        return -1;
    
public intgetTotalDigits(java.lang.Object value)

        return -1;
    
public static final booleanisDigit(char ch)

        return ch >= '0" && ch <= '9";
    
public booleanisIdentical(java.lang.Object value1, java.lang.Object value2)

    
    // where there is distinction between identity and equality, this method
    // will be overwritten
    // checks whether the two values are identical; for ex, this distinguishes 
    // -0.0 from 0.0 
           
        return value1.equals(value2);