|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qriterium.dogma.DogmaTime
public class DogmaTime
DogmaTime
is a class for timestamps and time management used in Dogma.
Constructor Summary | |
---|---|
DogmaTime()
Creates a new DogmaTime instance. |
|
DogmaTime(java.util.Date date)
Creates a new DogmaTime from given java.util.Date |
|
DogmaTime(int year,
int month,
int date,
int hour,
int min,
int sec)
Creates a new DogmaTime instance with given values for time. |
|
DogmaTime(java.lang.String time)
Creates a new DogmaTime-instance based on the given time. |
Method Summary | |
---|---|
int |
compareTo(DogmaTime t)
Compares the time in current object with the given one. |
static java.lang.String |
getCurrentTime()
Returns the current time as a String |
java.util.Date |
getDate()
|
static java.lang.String |
getFormattedString(java.lang.String time)
|
boolean |
isBetween(DogmaTime s,
DogmaTime e)
Returns true if the current DogmaTime is between the given DogmaTimes. |
void |
now()
Resets the time to current time. |
static java.lang.String |
parseDate(java.lang.String date)
Makes a conversion from String towards DogmaTime-format |
java.lang.String |
toString()
Returns the time in String-format. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DogmaTime()
public DogmaTime(int year, int month, int date, int hour, int min, int sec)
year
- Current year, for example 2007.month
- Current month, for example 1 for january.date
- Current date.hour
- Current hour.min
- Current Minute.sec
- Current Second.public DogmaTime(java.lang.String time)
time
- Input string should be in format YYYYMMDDhhmmsspublic DogmaTime(java.util.Date date)
date
- Method Detail |
---|
public int compareTo(DogmaTime t)
t
- the time with which the current object should be compared with is given in DogmaTime-format.
public boolean isBetween(DogmaTime s, DogmaTime e)
s
- Starting DogmaTimee
- Ending DogmaTime
public void now()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getCurrentTime()
public static java.lang.String getFormattedString(java.lang.String time)
time
-
public static java.lang.String parseDate(java.lang.String date)
date
- is assumed to be in format YYYY MM-DD hh-mm-ss, or format that is substring of previous
starting from index 0. For example 1982 05-12 is valid, it will be converted to String
19820512000000. 1982 5-12 is not valid form.
public java.util.Date getDate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |