|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.types.DateTimeParser
class DateTimeParser
This class provides a simple regular expression parser for standard format dates, times, and timestamps
Field Summary | |
---|---|
private char |
currentSeparator
|
private int |
fieldStart
|
private int |
len
|
private java.lang.String |
str
|
private java.lang.String |
trimmedString
|
Constructor Summary | |
---|---|
DateTimeParser(java.lang.String str)
|
Method Summary | |
---|---|
(package private) java.lang.String |
checkEnd()
Check that we are at the end of the string: that the rest of the characters, if any, are blanks. |
(package private) char |
getCurrentSeparator()
|
(package private) java.lang.String |
getTrimmedString()
Get the parsed string with trailing blanks removed. |
(package private) char |
nextSeparator()
|
(package private) int |
parseChoice(java.lang.String[] choices)
Determine if the next characters are one of a choice of strings. |
(package private) int |
parseInt(int maxDigits,
boolean truncationAllowed,
char[] separator,
boolean isFraction)
Parse the next integer. |
private void |
updateCurrentSeparator()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String str
private java.lang.String trimmedString
private int len
private int fieldStart
private char currentSeparator
Constructor Detail |
---|
DateTimeParser(java.lang.String str)
Method Detail |
---|
int parseInt(int maxDigits, boolean truncationAllowed, char[] separator, boolean isFraction) throws StandardException
maxDigits
- the maximum number of digitstruncationAllowed
- If true then leading zeroes may be ommitted. If false then the integer must be
exactly ndigits long.separator
- The separator at the end of the integer. If zero then the integer must be at the end of the string
but may be followed by spaces.isFraction
- If true then the returned integer will be multiplied by 10**(maxDigits - actualDigitCount)
StandardException
- invalid syntax.int parseChoice(java.lang.String[] choices) throws StandardException
choices
- An array of strings.
StandardException
- if the next characters are not in choices.private void updateCurrentSeparator()
java.lang.String checkEnd() throws StandardException
StandardException
- if there are more non-blank characters.java.lang.String getTrimmedString()
char nextSeparator()
char getCurrentSeparator()
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |