|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jidesoft.range.AbstractRange<java.util.Date>
com.jidesoft.range.TimeRange
public class TimeRange
Specifies upper and lower bounds for a range of values along a time line.
| Field Summary | |
|---|---|
protected java.util.Date |
_max
|
protected java.util.Date |
_min
|
| Fields inherited from interface com.jidesoft.range.Range |
|---|
PROPERTY_MAX, PROPERTY_MIN |
| Constructor Summary | |
|---|---|
TimeRange()
Sets a default time range of the whole of today |
|
TimeRange(java.util.Calendar from,
java.util.Calendar to)
|
|
TimeRange(java.util.Date from,
java.util.Date to)
|
|
TimeRange(long from,
long to)
|
|
| Method Summary | |
|---|---|
void |
adjust(java.util.Date lower,
java.util.Date upper)
Adjusts the range. |
boolean |
contains(java.util.Date x)
Determines whether the supplied point lies within this range. |
boolean |
equals(java.lang.Object other)
|
java.util.TimeZone |
getTimeZone()
|
java.util.Date |
lower()
|
double |
maximum()
This may be the numeric representation of upper() or it may be rounded up. |
double |
minimum()
This may be the numeric representation of lower() or it may be rounded down. |
void |
setMax(java.util.Date to)
|
void |
setMax(long to)
|
void |
setMin(java.util.Date from)
|
void |
setMin(long from)
|
void |
setTimeZone(java.util.TimeZone timeZone)
|
double |
size()
Compute the size of the range |
java.lang.String |
toString()
|
static TimeRange |
union(TimeRange r1,
TimeRange r2)
Creates a new TimeRange as the union of two existing TimeRanges. |
java.util.Date |
upper()
|
| Methods inherited from class com.jidesoft.range.AbstractRange |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Date _min
protected java.util.Date _max
| Constructor Detail |
|---|
public TimeRange()
public TimeRange(java.util.Calendar from,
java.util.Calendar to)
public TimeRange(java.util.Date from,
java.util.Date to)
public TimeRange(long from,
long to)
| Method Detail |
|---|
public void setMin(java.util.Date from)
public void setMin(long from)
public void adjust(java.util.Date lower,
java.util.Date upper)
Range
lower - the new smallest value of the rangeupper - the new largest value of the rangepublic void setMax(java.util.Date to)
public void setMax(long to)
public double minimum()
Range
public double maximum()
Range
public double size()
Range
public java.util.Date lower()
public java.util.Date upper()
public boolean contains(java.util.Date x)
Rangecontains() method is more like a set membership test.
public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
public static TimeRange union(TimeRange r1,
TimeRange r2)
r1 - the first TimeRanger2 - the second TimeRange
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||