Package org.rrd4j.core.timespec
Class TimeParser
- java.lang.Object
-
- org.rrd4j.core.timespec.TimeParser
-
public class TimeParser extends Object
Class which parses at-style time specification (described in detail on the rrdfetch man page), used in all RRDTool commands. This code is in most parts just a java port of Tobi's parsetime.c code. For years written with two digits, any year before 38 will be post 2000.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
op
(package private) int
prev_multiplier
(package private) TimeScanner
scanner
(package private) TimeSpec
spec
(package private) TimeToken
token
-
Constructor Summary
Constructors Constructor Description TimeParser(String dateString)
Constructs TimeParser instance from the given input string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeSpec
parse()
Parses the input string specified in the constructor.
-
-
-
Field Detail
-
token
TimeToken token
-
scanner
TimeScanner scanner
-
spec
TimeSpec spec
-
op
int op
-
prev_multiplier
int prev_multiplier
-
-
Constructor Detail
-
TimeParser
public TimeParser(String dateString)
Constructs TimeParser instance from the given input string.- Parameters:
dateString
- at-style time specification (read rrdfetch man page for the complete explanation)
-
-
Method Detail
-
parse
public TimeSpec parse()
Parses the input string specified in the constructor.- Returns:
- Object representing parsed date/time.
-
-