org.whattf.datatype
Class Ratio

java.lang.Object
  extended by org.whattf.datatype.AbstractDatatype
      extended by org.whattf.datatype.Ratio
All Implemented Interfaces:
Datatype

public final class Ratio
extends AbstractDatatype


Field Summary
static Ratio THE_INSTANCE
          The singleton instance.
private static com.ibm.icu.text.UnicodeSet ZS
           
 
Fields inherited from interface org.relaxng.datatype.Datatype
ID_TYPE_ID, ID_TYPE_IDREF, ID_TYPE_IDREFS, ID_TYPE_NULL
 
Constructor Summary
private Ratio()
           
 
Method Summary
 void checkValid(CharSequence literal)
           
private  int findANumber(CharSequence literal, int pos)
           
private  boolean isDenominator(char c)
           
private  int skipZs(CharSequence literal, int pos)
           
 
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 Ratio THE_INSTANCE
The singleton instance.


ZS

private static final com.ibm.icu.text.UnicodeSet ZS
Constructor Detail

Ratio

private Ratio()
Method Detail

checkValid

public void checkValid(CharSequence literal)
                throws DatatypeException
Specified by:
checkValid in class AbstractDatatype
Throws:
DatatypeException

isDenominator

private boolean isDenominator(char c)

skipZs

private int skipZs(CharSequence literal,
                   int pos)
            throws DatatypeException
Throws:
DatatypeException

findANumber

private int findANumber(CharSequence literal,
                        int pos)
                 throws DatatypeException
Throws:
DatatypeException