hourparser
Class Entry
java.lang.Object
hourparser.Entry
public class Entry
- extends Object
Represents one row in a log file. The format of the log file is like this:
dd.mm.yyyy code hours comment
A row that starts with an alphabet will be used as the name of the person. Rows beginning with # will be concidered
empty lines.
- Author:
- Esko Luontola, http://www.orfjackal.net/
Constructor Summary |
Entry(String row)
Parses a row from a log file. |
state
private Entry.State state
name
private String name
date
private Date date
code
private String code
hours
private double hours
comment
private String comment
Entry
public Entry(String row)
- Parses a row from a log file.
- Parameters:
row
- one row from a log file.
isEmpty
public boolean isEmpty()
- Is this entry an empty line or a comment.
- Returns:
true
if is empty or a comment, otherwise false
.
isName
public boolean isName()
- Is this entry the name of the person.
- Returns:
true
if is a name, otherwise false
.
isRecord
public boolean isRecord()
- Is this entry a record of work.
- Returns:
true
if is a record, otherwise false
.
getName
public String getName()
getDate
public Date getDate()
getCode
public String getCode()
getHours
public double getHours()
getComment
public String getComment()
toString
public String toString()
- Overrides:
toString
in class Object