|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.encapsulate.range.AbstractRange<T>
it.amattioli.encapsulate.range.ContinousRange<Date>
it.amattioli.encapsulate.dates.ConventionalTimeInterval
it.amattioli.encapsulate.dates.Day
public class Day
An instance of this class represents a time interval corresponding to a day, from 00:00 to 24:00. As the concept of 00:00 and 24:00 is Timezone dependent, the same will be for instances of this class.
| Constructor Summary | |
|---|---|
Day(Date date)
Construct the day that contains the passed time point in the current time zone. |
|
Day(int day,
int month,
int year)
Construct a day given day, month and year in the current time zone |
|
| Method Summary | |
|---|---|
Day |
clone()
|
int |
compareTo(Day d)
|
boolean |
equals(Object o)
|
int |
getDayOfMonth()
The day of the month |
Duration |
getDuration()
Returns the duration of this time interval. |
Date |
getEndTime()
Returns the time point that is the end of this day |
int |
getMonth()
The month |
int |
getYear()
The year |
int |
hashCode()
|
Day |
next()
Returns the day immediately following this. |
Day |
previous()
Returns the day immediately preceding this. |
DiscreteRange<Day> |
through(Day end)
|
static Day |
today()
Costruisce un Day che rappresenta la giornata odierna. |
static Day |
tomorrow()
|
String |
toString()
|
static Day |
yesterday()
|
| Methods inherited from class it.amattioli.encapsulate.dates.ConventionalTimeInterval |
|---|
after, after, before, before, dayIterator, getCalendar, getHigh, getHighDay, getInitTime, getLow, getLowDay, getPhysicalDuration, includes, isHighBounded, isLowBounded, newRange, setCalendar |
| Methods inherited from class it.amattioli.encapsulate.range.ContinousRange |
|---|
abutOn, gap, mergeWith, minus |
| Methods inherited from class it.amattioli.encapsulate.range.AbstractRange |
|---|
contains, hasSameHigh, hasSameLow, intersect, overlaps |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface it.amattioli.encapsulate.range.Range |
|---|
abutOn, contains, gap, hasSameHigh, hasSameLow, intersect, mergeWith, minus, overlaps |
| Constructor Detail |
|---|
public Day(Date date)
date -
public Day(int day,
int month,
int year)
day - month - year - | Method Detail |
|---|
public static Day today()
public static Day yesterday()
public static Day tomorrow()
public int getDayOfMonth()
public int getMonth()
public int getYear()
public Day previous()
previous in interface Discrete<Day>previous in class ConventionalTimeIntervalpublic Day next()
next in interface Discrete<Day>next in class ConventionalTimeIntervalpublic Date getEndTime()
getEndTime in class ConventionalTimeIntervalpublic int compareTo(Day d)
compareTo in interface Comparable<Day>public boolean equals(Object o)
equals in class AbstractRange<Date>public int hashCode()
hashCode in class ConventionalTimeIntervalpublic Day clone()
clone in class Objectpublic String toString()
toString in class AbstractRange<Date>public Duration getDuration()
TimeInterval
getDuration in interface TimeIntervalpublic DiscreteRange<Day> through(Day end)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||