|
||||||||||
| 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
public abstract class ConventionalTimeInterval
Rappresenta un intervallo di tempo stabilito convenzionalmente come un giorno, una settimana o un mese.
Essendo un intervallo convenzionale questo dipenderà dalla locale in cui ci si trova. Ad esempio lo stesso giorno potrĂ avere inizio e fine diversi in nazioni diversi a causa del fuso orario.
L'insieme degli intervalli convenzionali dello steso tipo forma generalmente un insieme discreto per cui è possibile implementare i metodi dell'interfaccia @see(Discrete). Ad esempio l'insieme di tutti i giorni è un insieme discreto per il quale è possibile stabilire qual'è il giorno precedente e il giorno successivo
| Constructor Summary | |
|---|---|
ConventionalTimeInterval()
|
|
| Method Summary | |
|---|---|
boolean |
after(Date date)
|
boolean |
after(TimeInterval other)
Verifica se un altro intervallo segue completamente questo. |
boolean |
before(Date date)
|
boolean |
before(TimeInterval other)
Verifica se un altro intervallo precede completamente questo. |
DayIterator |
dayIterator()
|
protected Calendar |
getCalendar()
Restituisce il calendario utilizzato per stabilire l'istante iniziale e finale di questo intervallo di tempo |
abstract Date |
getEndTime()
Restituisce l'istante di tempo finale di questo intervallo |
Date |
getHigh()
Ritorna l'estremo inferiore dell'intervallo. |
Day |
getHighDay()
|
Date |
getInitTime()
Restituisce l'istante di tempo iniziale di questo intervallo |
Date |
getLow()
Ritorna l'estremo inferiore dell'intervallo. |
Day |
getLowDay()
|
PhysicalDuration |
getPhysicalDuration()
|
int |
hashCode()
|
boolean |
includes(Date time)
Controlla se un valore e' compreso nell'intervallo. |
boolean |
isHighBounded()
Indica se l'intervallo e' limitato superiormente. |
boolean |
isLowBounded()
Indica se l'intervallo e' limitato inferiormente. |
protected GenericTimeInterval |
newRange(Date low,
Date high)
Crea un nuovo range compatibile con questo. |
abstract ConventionalTimeInterval |
next()
|
abstract ConventionalTimeInterval |
previous()
|
protected void |
setCalendar(Calendar cal)
Imposta il calendario utilizzato per stabilire l'istante iniziale e finale di questo intervallo di tempo |
| Methods inherited from class it.amattioli.encapsulate.range.ContinousRange |
|---|
abutOn, gap, mergeWith, minus |
| Methods inherited from class it.amattioli.encapsulate.range.AbstractRange |
|---|
contains, equals, hasSameHigh, hasSameLow, intersect, overlaps, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface it.amattioli.encapsulate.dates.TimeInterval |
|---|
getDuration |
| Methods inherited from interface it.amattioli.encapsulate.range.Range |
|---|
abutOn, contains, gap, hasSameHigh, hasSameLow, intersect, mergeWith, minus, overlaps |
| Constructor Detail |
|---|
public ConventionalTimeInterval()
| Method Detail |
|---|
protected Calendar getCalendar()
protected void setCalendar(Calendar cal)
cal - il nuovo calendario da utilizzarepublic abstract ConventionalTimeInterval previous()
public abstract ConventionalTimeInterval next()
public boolean includes(Date time)
Range
includes in interface TimeIntervalincludes in interface Range<Date>includes in class AbstractRange<Date>time - il valore da testare se e' incluso nell'intervallo
public Date getInitTime()
public abstract Date getEndTime()
public boolean before(TimeInterval other)
before in interface TimeIntervalother - l'intervallo di tempo da confrontare con questo
NullPointerException - se il parametro è nullpublic boolean after(TimeInterval other)
after in interface TimeIntervalother - l'intervallo di tempo da confrontare con questo
NullPointerException - se il parametro è nullpublic boolean before(Date date)
public boolean after(Date date)
public int hashCode()
hashCode in class AbstractRange<Date>public Date getLow()
Range
getLow in interface Range<Date>public Date getHigh()
Range
getHigh in interface Range<Date>public boolean isLowBounded()
Range
isLowBounded in interface Range<Date>public boolean isHighBounded()
Range
isHighBounded in interface Range<Date>
protected GenericTimeInterval newRange(Date low,
Date high)
AbstractRange
newRange in class AbstractRange<Date>public PhysicalDuration getPhysicalDuration()
getPhysicalDuration in interface TimeIntervalpublic Day getLowDay()
getLowDay in interface TimeIntervalpublic Day getHighDay()
getHighDay in interface TimeIntervalpublic DayIterator dayIterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||