|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.configuration.plist.PropertyListConfiguration.DateComponentParser
org.apache.commons.configuration.plist.PropertyListConfiguration.DateFieldParser
private static class PropertyListConfiguration.DateFieldParser
A specialized date component parser implementation that deals with numeric calendar fields. The class is able to extract fields from a string literal and to format a literal from a calendar.
| Field Summary | |
|---|---|
private int |
calendarField
Stores the calendar field to be processed. |
private int |
length
Stores the length of this field. |
private int |
offset
An optional offset to add to the calendar field. |
| Constructor Summary | |
|---|---|
PropertyListConfiguration.DateFieldParser(int calFld,
int len)
Creates a new instance of DateFieldParser. |
|
PropertyListConfiguration.DateFieldParser(int calFld,
int len,
int ofs)
Creates a new instance of DateFieldParser and fully
initializes it. |
|
| Method Summary | |
|---|---|
void |
formatComponent(java.lang.StringBuffer buf,
java.util.Calendar cal)
Formats a date component. |
int |
parseComponent(java.lang.String s,
int index,
java.util.Calendar cal)
Parses a component from the given input string. |
| Methods inherited from class org.apache.commons.configuration.plist.PropertyListConfiguration.DateComponentParser |
|---|
checkLength, padNum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int calendarField
private int length
private int offset
| Constructor Detail |
|---|
public PropertyListConfiguration.DateFieldParser(int calFld,
int len)
DateFieldParser.
calFld - the calendar field codelen - the length of this field
public PropertyListConfiguration.DateFieldParser(int calFld,
int len,
int ofs)
DateFieldParser and fully
initializes it.
calFld - the calendar field codelen - the length of this fieldofs - an offset to add to the calendar field| Method Detail |
|---|
public void formatComponent(java.lang.StringBuffer buf,
java.util.Calendar cal)
PropertyListConfiguration.DateComponentParser
formatComponent in class PropertyListConfiguration.DateComponentParserbuf - the target buffercal - the calendar with the current date
public int parseComponent(java.lang.String s,
int index,
java.util.Calendar cal)
throws ParseException
PropertyListConfiguration.DateComponentParser
parseComponent in class PropertyListConfiguration.DateComponentParsers - the string to be parsedindex - the current parsing positioncal - the calendar where to store the result
ParseException - if the component cannot be extracted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||