fleXplorer.Types
Class DateType

java.lang.Object
  extended by fleXplorer.Types.FacetsType
      extended by fleXplorer.Types.DateType

public class DateType
extends FacetsType


Constructor Summary
DateType(java.util.Date date)
          Construct a Date from a specific date.
DateType(int year, int month, int day, int hours, int minutes, int seconds)
          Constructs a Date with specified year,month and day.
DateType(long epoch)
          Constructs a date from time stamp.
 
Method Summary
 int getDay()
          Returns the date's day.
 int getHours()
          Returns the date's hour.
 int getMinutes()
          Returns the date's minute.
 int getMonth()
          Returns the date's month.
 int getSeconds()
          Returns the date's second.
 java.lang.Object getValue()
          Returns the date as object.
 java.lang.String getValueAsString()
          Returns the String representation of the date.
 int getYear()
          Returns the date's year.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateType

public DateType(int year,
                int month,
                int day,
                int hours,
                int minutes,
                int seconds)
Constructs a Date with specified year,month and day.
Preconditions: The arguments must be correct(Calendar).
Postconditions: Creates a Date object using GregorianCalendar.

Parameters:
year - the year of Date.
month - the month of Date.
day - the day of Date.

DateType

public DateType(long epoch)
Constructs a date from time stamp.

Parameters:
epoch -

DateType

public DateType(java.util.Date date)
Construct a Date from a specific date.

Parameters:
date - the date.
Method Detail

getValue

public java.lang.Object getValue()
Returns the date as object.

Specified by:
getValue in class FacetsType
Returns:
the date as object.

getValueAsString

public java.lang.String getValueAsString()
Returns the String representation of the date.

Specified by:
getValueAsString in class FacetsType
Returns:
the String representation of the date.

getYear

public int getYear()
Returns the date's year.

Returns:
the date's year.

getMonth

public int getMonth()
Returns the date's month.

Returns:
the date's month.

getDay

public int getDay()
Returns the date's day.

Returns:
the date's day.

getHours

public int getHours()
Returns the date's hour.

Returns:
the date's hour.

getMinutes

public int getMinutes()
Returns the date's minute.

Returns:
the date's minute.

getSeconds

public int getSeconds()
Returns the date's second.

Returns:
the date's second.