butler.ext.time
Class DateInterval

java.lang.Object
  extended by butler.ext.interval.Interval
      extended by butler.ext.time.DateInterval

public class DateInterval
extends Interval

Author:
Fredrik Bertilsson

Constructor Summary
DateInterval()
           
DateInterval(java.util.Date day)
           
DateInterval(java.util.Date start, java.util.Date end)
           
DateInterval(java.util.Date day, int type)
           
DateInterval(java.util.Date day, int type, int count)
           
DateInterval(java.util.Date start, long duration)
           
DateInterval(Interval interval)
           
 
Method Summary
 long getDuration()
           
 java.util.Date getEndDate()
           
 java.util.Date getStartDate()
           
 DateInterval intersection(DateInterval interval)
           
 void setDuration(long duration)
           
 void setEndDate(java.util.Date end)
           
 void setStartDate(java.util.Date start)
           
 
Methods inherited from class butler.ext.interval.Interval
contains, contains, equals, getEnd, getStart, intersection, isIncludeEnd, isIncludeStart, overlap, setEnd, setIncludeEnd, setIncludeStart, setStart, toString, union
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateInterval

public DateInterval(Interval interval)
             throws java.lang.Exception
Throws:
java.lang.Exception

DateInterval

public DateInterval()

DateInterval

public DateInterval(java.util.Date start,
                    java.util.Date end)
             throws java.lang.Exception
Throws:
java.lang.Exception

DateInterval

public DateInterval(java.util.Date day)
             throws java.lang.Exception
Throws:
java.lang.Exception

DateInterval

public DateInterval(java.util.Date day,
                    int type)
             throws java.lang.Exception
Throws:
java.lang.Exception

DateInterval

public DateInterval(java.util.Date day,
                    int type,
                    int count)
             throws java.lang.Exception
Throws:
java.lang.Exception

DateInterval

public DateInterval(java.util.Date start,
                    long duration)
             throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getStartDate

public java.util.Date getStartDate()
                            throws java.lang.Exception
Throws:
java.lang.Exception

setStartDate

public void setStartDate(java.util.Date start)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getEndDate

public java.util.Date getEndDate()
                          throws java.lang.Exception
Throws:
java.lang.Exception

setEndDate

public void setEndDate(java.util.Date end)
                throws java.lang.Exception
Throws:
java.lang.Exception

setDuration

public void setDuration(long duration)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getDuration

public long getDuration()

intersection

public DateInterval intersection(DateInterval interval)
                          throws java.lang.Exception
Throws:
java.lang.Exception