it.amattioli.encapsulate.dates
Class Hour

Show UML class diagram
java.lang.Object
  extended by it.amattioli.encapsulate.range.AbstractRange<T>
      extended by it.amattioli.encapsulate.range.ContinousRange<Date>
          extended by it.amattioli.encapsulate.dates.ConventionalTimeInterval
              extended by it.amattioli.encapsulate.dates.Hour
All Implemented Interfaces:
TimeInterval, Discrete<Hour>, Range<Date>, Serializable, Cloneable, Comparable<Hour>

public class Hour
extends ConventionalTimeInterval
implements Discrete<Hour>, Serializable, Cloneable

See Also:
Serialized Form

Constructor Summary
Hour(Date date)
           
 
Method Summary
 Object clone()
           
 int compareTo(Hour o)
           
 boolean equals(Object o)
           
 Duration getDuration()
          Returns the duration of this time interval.
 Date getEndTime()
          Restituisce l'istante di tempo finale di questo intervallo
 int hashCode()
           
 Hour next()
          L'elemento successivo a questo.
static Hour now()
           
 Hour previous()
          L'elemento precedente a questo.
 DiscreteRange<Hour> through(Hour end)
           
 String toString()
           
 
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

Hour

public Hour(Date date)
Method Detail

now

public static Hour now()

compareTo

public int compareTo(Hour o)
Specified by:
compareTo in interface Comparable<Hour>

next

public Hour next()
Description copied from interface: Discrete
L'elemento successivo a questo.

Specified by:
next in interface Discrete<Hour>
Specified by:
next in class ConventionalTimeInterval
Returns:
l'elemento successivo a questo

previous

public Hour previous()
Description copied from interface: Discrete
L'elemento precedente a questo.

Specified by:
previous in interface Discrete<Hour>
Specified by:
previous in class ConventionalTimeInterval
Returns:
l'elemento precedente a questo

getEndTime

public Date getEndTime()
Description copied from class: ConventionalTimeInterval
Restituisce l'istante di tempo finale di questo intervallo

Specified by:
getEndTime in class ConventionalTimeInterval
Returns:
l'istante di tempo finale di questo intervallo

equals

public boolean equals(Object o)
Overrides:
equals in class AbstractRange<Date>

hashCode

public int hashCode()
Overrides:
hashCode in class ConventionalTimeInterval

clone

public Object clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class AbstractRange<Date>

getDuration

public Duration getDuration()
Description copied from interface: TimeInterval
Returns the duration of this time interval. This make sense only for a time interval that has both extremes, otherwise the duration is infinite.

Specified by:
getDuration in interface TimeInterval
Returns:
this time interval duration

through

public DiscreteRange<Hour> through(Hour end)


Copyright © 2011. All Rights Reserved.