|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.range.AbstractRange<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 Date |
_max
|
protected 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(Calendar from,
Calendar to)
|
|
TimeRange(Date from,
Date to)
|
|
TimeRange(long from,
long to)
|
|
TimeRange(TimeRange timeRange)
Constructs a copy of the supplied time range |
Method Summary | |
---|---|
void |
adjust(Date lower,
Date upper)
Adjusts the range. |
boolean |
contains(Date x)
Determines whether the supplied point lies within this range. |
Range<Date> |
copy()
|
Range<Date> |
createIntermediate(Range<Date> target,
double position)
|
boolean |
equals(Object other)
|
TimeZone |
getTimeZone()
|
int |
hashCode()
|
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(Date to)
|
void |
setMax(long to)
|
void |
setMin(Date from)
|
void |
setMin(long from)
|
void |
setTimeZone(TimeZone timeZone)
|
double |
size()
Compute the size of the range |
String |
toString()
|
static TimeRange |
union(TimeRange r1,
TimeRange r2)
Creates a new TimeRange as the union of two existing TimeRanges. |
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, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Date _min
protected Date _max
Constructor Detail |
---|
public TimeRange()
public TimeRange(Calendar from, Calendar to)
public TimeRange(Date from, Date to)
public TimeRange(long from, long to)
public TimeRange(TimeRange timeRange)
timeRange
- the timeRange to copyMethod Detail |
---|
public Range<Date> copy()
copy
in class AbstractRange<Date>
public void setMin(Date from)
public void setMin(long from)
public void adjust(Date lower, Date upper)
Range
lower
- the new smallest value of the rangeupper
- the new largest value of the rangepublic void setMax(Date to)
public void setMax(long to)
public double minimum()
Range
public double maximum()
Range
public double size()
Range
public Date lower()
public Date upper()
public boolean contains(Date x)
Range
contains()
method is more like a set membership test.
public TimeZone getTimeZone()
public void setTimeZone(TimeZone timeZone)
public Range<Date> createIntermediate(Range<Date> target, double position)
createIntermediate
in class AbstractRange<Date>
public static TimeRange union(TimeRange r1, TimeRange r2)
r1
- the first TimeRanger2
- the second TimeRange
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |