org.ojalgo.type
Class CalendarDate

java.lang.Object
  extended by org.ojalgo.type.CalendarDate
All Implemented Interfaces:
Comparable<CalendarDate>

public final class CalendarDate
extends Object
implements Comparable<CalendarDate>

Corresponds to a Calendar AND a Date. It is immutable and interacts with CalendarDateUnit.

Author:
apete

Field Summary
 long millis
           
 
Constructor Summary
CalendarDate()
           
CalendarDate(Calendar aCalendar)
           
CalendarDate(Date aDate)
           
CalendarDate(long timeInMillis)
           
CalendarDate(String anSqlString)
           
 
Method Summary
 int compareTo(CalendarDate ref)
           
 boolean equals(Object obj)
           
 CalendarDate filter(CalendarDateUnit aResolution)
           
 Calendar getCalendar()
           
 Calendar getCalendar(Locale aLocale)
           
 Calendar getCalendar(TimeZone aTimeZone)
           
 Calendar getCalendar(TimeZone aTimeZone, Locale aLocale)
           
 Date getDate()
           
 int hashCode()
           
static CalendarDate make(Calendar aCalendar, CalendarDateUnit aResolution)
           
static CalendarDate make(CalendarDateUnit aResolution)
           
static CalendarDate make(Date aDate, CalendarDateUnit aResolution)
           
static CalendarDate make(long aTimeInMIllis, CalendarDateUnit aResolution)
           
 CalendarDate step(CalendarDateUnit aStepUnit)
           
 CalendarDate step(int aStepCount, CalendarDateUnit aStepUnit)
           
 Date toSqlDate()
           
 Time toSqlTime()
           
 Timestamp toSqlTimestamp()
           
 String toString()
           
 long toTimeInMillis(CalendarDateUnit aResolution)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

millis

public final long millis
Constructor Detail

CalendarDate

public CalendarDate()

CalendarDate

public CalendarDate(Calendar aCalendar)

CalendarDate

public CalendarDate(Date aDate)

CalendarDate

public CalendarDate(long timeInMillis)

CalendarDate

public CalendarDate(String anSqlString)
Method Detail

make

public static CalendarDate make(Calendar aCalendar,
                                CalendarDateUnit aResolution)

make

public static CalendarDate make(CalendarDateUnit aResolution)

make

public static CalendarDate make(Date aDate,
                                CalendarDateUnit aResolution)

make

public static CalendarDate make(long aTimeInMIllis,
                                CalendarDateUnit aResolution)

compareTo

public int compareTo(CalendarDate ref)
Specified by:
compareTo in interface Comparable<CalendarDate>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

filter

public CalendarDate filter(CalendarDateUnit aResolution)

getCalendar

public Calendar getCalendar()

getCalendar

public Calendar getCalendar(Locale aLocale)

getCalendar

public Calendar getCalendar(TimeZone aTimeZone)

getCalendar

public Calendar getCalendar(TimeZone aTimeZone,
                            Locale aLocale)

getDate

public Date getDate()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

step

public CalendarDate step(CalendarDateUnit aStepUnit)

step

public CalendarDate step(int aStepCount,
                         CalendarDateUnit aStepUnit)

toSqlDate

public Date toSqlDate()

toSqlTime

public Time toSqlTime()

toSqlTimestamp

public Timestamp toSqlTimestamp()

toString

public String toString()
Overrides:
toString in class Object

toTimeInMillis

public long toTimeInMillis(CalendarDateUnit aResolution)