Class PropertyListConfiguration.DateSeparatorParser
- java.lang.Object
-
- org.apache.commons.configuration2.plist.PropertyListConfiguration.DateComponentParser
-
- org.apache.commons.configuration2.plist.PropertyListConfiguration.DateSeparatorParser
-
- Enclosing class:
- PropertyListConfiguration
private static final class PropertyListConfiguration.DateSeparatorParser extends PropertyListConfiguration.DateComponentParser
A specialized date component parser implementation that deals with separator characters.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
separator
Stores the separator.
-
Constructor Summary
Constructors Constructor Description DateSeparatorParser(java.lang.String sep)
Creates a new instance ofDateSeparatorParser
and sets the separator string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
formatComponent(java.lang.StringBuilder 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.configuration2.plist.PropertyListConfiguration.DateComponentParser
checkLength, padNum
-
-
-
-
Method Detail
-
formatComponent
public void formatComponent(java.lang.StringBuilder buf, java.util.Calendar cal)
Description copied from class:PropertyListConfiguration.DateComponentParser
Formats a date component. This method is used for converting a date in its internal representation into a string literal.- Specified by:
formatComponent
in classPropertyListConfiguration.DateComponentParser
- Parameters:
buf
- the target buffercal
- the calendar with the current date
-
parseComponent
public int parseComponent(java.lang.String s, int index, java.util.Calendar cal) throws ParseException
Description copied from class:PropertyListConfiguration.DateComponentParser
Parses a component from the given input string.- Specified by:
parseComponent
in classPropertyListConfiguration.DateComponentParser
- Parameters:
s
- the string to be parsedindex
- the current parsing positioncal
- the calendar where to store the result- Returns:
- the length of the processed component
- Throws:
ParseException
- if the component cannot be extracted
-
-