|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.DateSelection
public class DateSelection
Holds state for constructing time based queries.
| Field Summary | |
|---|---|
boolean |
debug
debug flag |
static String[] |
ENDMODELABELS
Mode for constructing set |
static int |
MAX_COUNT
|
static String[] |
STARTMODELABELS
Mode for constructing set |
static int |
TIMEMODE_CURRENT
The mode for when we use the current time |
static int |
TIMEMODE_DATA
Mode for using the first or last time in the data set. |
static int |
TIMEMODE_FIXED
The mode for when we have an absolute time as a range bounds |
static int |
TIMEMODE_RELATIVE
When one of the ranges is relative to another |
static int[] |
TIMEMODES
Mode for constructing set |
| Constructor Summary | |
|---|---|
DateSelection()
ctor |
|
DateSelection(Date startTime,
Date endTime)
ctor |
|
DateSelection(DateSelection that)
copy ctor |
|
| Method Summary | |
|---|---|
List |
apply(List datedThings)
Apply this date selection query to the list of DatedThing-s |
boolean |
equals(Object o)
equals method |
int |
getCount()
Get the Count property. |
Date |
getEndFixedDate()
get the property |
long |
getEndFixedTime()
Get the EndFixedTime property. |
int |
getEndMode()
Get the EndMode property. |
double |
getEndOffset()
Get the EndOffset property. |
double |
getInterval()
Get the Interval property. |
double[] |
getIntervalTicks()
Generate an array of times for the interval |
int |
getNumTimesInRange()
Get the NumTimesInRange property. |
double |
getPostRange()
Get the PostRange property. |
double |
getPostRangeToUse()
Get the post interval range to use. |
double |
getPreRange()
Get the PreRange property. |
double |
getPreRangeToUse()
Get the pre interval range to use. |
Date[] |
getRange()
Construct and return the start and end time range |
double |
getRoundTo()
Get the RoundTo property. |
int |
getSkip()
Get the Skip property. |
Date |
getStartFixedDate()
get the property |
long |
getStartFixedTime()
Get the StartFixedTime property. |
int |
getStartMode()
Get the StartMode property. |
double |
getStartOffset()
Get the StartOffset property. |
List |
getTimes()
Get the Times property. |
boolean |
hasCount()
Does this date selection have a valid count |
int |
hashCode()
Get the hashcode for this object |
boolean |
hasInterval()
Do we have an interval defined |
boolean |
hasPostRange()
Do we have a post range defined |
boolean |
hasPreRange()
Do we have a pre range defined |
static void |
main(String[] args)
test main |
protected Object |
makeTimeSet()
Create the time set |
static double |
roundTo(double roundTo,
double milliSeconds)
Utility to round the given seconds |
void |
setCount(int value)
Set the Count property. |
void |
setEndFixedTime(Date d)
set property |
void |
setEndFixedTime(long value)
Set the EndFixedTime property. |
void |
setEndMode(int value)
Set the EndMode property. |
void |
setEndOffset(double value)
Set the EndOffset property. |
void |
setInterval(double value)
Set the Interval property. |
void |
setIntervalRange(double value)
A utility method to set the pre and post range symmetrically. |
void |
setNumTimesInRange(int value)
Set the NumTimesInRange property. |
void |
setPostRange(double value)
Set the PostRange property. |
void |
setPreRange(double value)
Set the PreRange property. |
void |
setRoundTo(double value)
Set the RoundTo property. |
void |
setSkip(int value)
Set the Skip property. |
void |
setStartFixedTime(Date d)
set property |
void |
setStartFixedTime(long value)
Set the StartFixedTime property. |
void |
setStartMode(int value)
Set the StartMode property. |
void |
setStartOffset(double value)
Set the StartOffset property. |
void |
setTimes(List value)
Set the Times property. |
String |
toString()
tostring |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean debug
public static final int TIMEMODE_FIXED
public static final int TIMEMODE_CURRENT
public static final int TIMEMODE_RELATIVE
public static final int TIMEMODE_DATA
public static int[] TIMEMODES
public static String[] STARTMODELABELS
public static String[] ENDMODELABELS
public static final int MAX_COUNT
| Constructor Detail |
|---|
public DateSelection()
public DateSelection(Date startTime,
Date endTime)
startTime - start timeendTime - end timepublic DateSelection(DateSelection that)
that - object to copy from| Method Detail |
|---|
public double[] getIntervalTicks()
public List apply(List datedThings)
datedThings - input list of DatedThing-s
public Date[] getRange()
public static double roundTo(double roundTo,
double milliSeconds)
roundTo - round tomilliSeconds - time to round
protected Object makeTimeSet()
public void setStartMode(int value)
value - The new value for StartModepublic int getStartMode()
public void setEndMode(int value)
value - The new value for EndModepublic int getEndMode()
public boolean hasInterval()
public boolean hasPreRange()
public boolean hasPostRange()
public void setInterval(double value)
value - The new value for Intervalpublic double getInterval()
public void setStartOffset(double value)
value - The new value for StartOffsetpublic double getStartOffset()
public void setEndOffset(double value)
value - The new value for EndOffsetpublic double getEndOffset()
public void setRoundTo(double value)
value - The new value for RoundTopublic double getRoundTo()
public void setStartFixedTime(long value)
value - The new value for StartFixedTimepublic void setStartFixedTime(Date d)
d - propertypublic void setEndFixedTime(Date d)
d - propertypublic Date getStartFixedDate()
public Date getEndFixedDate()
public long getStartFixedTime()
public void setEndFixedTime(long value)
value - The new value for EndFixedTimepublic long getEndFixedTime()
public void setIntervalRange(double value)
value - interval rangepublic void setPreRange(double value)
value - The new value for PreRangepublic double getPreRangeToUse()
public double getPostRangeToUse()
public double getPreRange()
public void setPostRange(double value)
value - The new value for PostRangepublic double getPostRange()
public void setCount(int value)
value - The new value for Countpublic boolean hasCount()
public int getCount()
public void setNumTimesInRange(int value)
value - The new value for NumTimesInRangepublic int getNumTimesInRange()
public void setTimes(List value)
value - The new value for Timespublic List getTimes()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objecto - object to check
public void setSkip(int value)
value - The new value for Skippublic int getSkip()
public static void main(String[] args)
args - cmd line argspublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||