org.whattf.datatype
Class Ratio
java.lang.Object
org.whattf.datatype.AbstractDatatype
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
|
Constructor Summary |
private |
Ratio()
|
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 |
THE_INSTANCE
public static final Ratio THE_INSTANCE
- The singleton instance.
ZS
private static final com.ibm.icu.text.UnicodeSet ZS
Ratio
private Ratio()
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