er.chronic.utils
Class Span
java.lang.Object
er.chronic.utils.Range
er.chronic.utils.Span
public class Span
- extends Range
A Span represents a range of time. Since this class extends
Range, you can use #begin and #end to get the beginning and
ending times of the span (they will be of class Time)
Constructor Summary |
Span(java.util.Calendar begin,
java.util.Calendar end)
|
Span(java.util.Calendar begin,
int field,
float amount)
|
Span(long begin,
long end)
|
Method Summary |
Span |
add(float seconds)
Add a number of seconds to this span, returning the
resulting Span |
Span |
add(long seconds)
Add a number of seconds to this span, returning the
resulting Span |
java.util.Calendar |
getBeginCalendar()
|
java.util.Calendar |
getEndCalendar()
|
Span |
subtract(long seconds)
Subtract a number of seconds to this span, returning the
resulting Span |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Span
public Span(java.util.Calendar begin,
int field,
float amount)
Span
public Span(java.util.Calendar begin,
java.util.Calendar end)
Span
public Span(long begin,
long end)
getBeginCalendar
public java.util.Calendar getBeginCalendar()
getEndCalendar
public java.util.Calendar getEndCalendar()
add
public Span add(long seconds)
- Add a number of seconds to this span, returning the
resulting Span
add
public Span add(float seconds)
- Add a number of seconds to this span, returning the
resulting Span
subtract
public Span subtract(long seconds)
- Subtract a number of seconds to this span, returning the
resulting Span
toString
public java.lang.String toString()
- Overrides:
toString
in class Range
Copyright © 2002 – 2007 Project Wonder.