|
||||||||||
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 java.lang.String[] |
ENDMODELABELS
Mode for constructing set |
static int |
MAX_COUNT
maximum count |
static java.lang.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(boolean doAll)
ctor |
|
DateSelection(boolean doLatest,
int count)
ctor |
|
DateSelection(java.util.Date startTime,
java.util.Date endTime)
ctor |
|
DateSelection(DateSelection that)
copy ctor |
|
DateSelection(int startMode,
double startOffset,
int endMode,
double endOffset)
Construct a DateSelection |
Method Summary | |
---|---|
java.util.List |
apply(java.util.List datedThings)
Apply this date selection query to the list of DatedThing-s |
boolean |
equals(java.lang.Object o)
equals method |
int |
getCount()
Get the Count property. |
boolean |
getDoAll()
Get the DoAll property. |
boolean |
getDoLatest()
Get the DoLatest property. |
java.util.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 |
java.util.Date |
getNowTime()
Get the NowTime property. |
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. |
java.util.Date[] |
getRange()
Construct and return the start and end time range |
double |
getRoundTo()
Get the RoundTo property. |
int |
getSkip()
Get the Skip property. |
java.util.Date |
getStartFixedDate()
get the property |
long |
getStartFixedTime()
Get the StartFixedTime property. |
int |
getStartMode()
Get the StartMode property. |
double |
getStartOffset()
Get the StartOffset property. |
java.util.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 |
boolean |
isAll()
Select all things |
boolean |
isLatest()
Select the most recent thing |
static void |
main(java.lang.String[] args)
test main |
static double |
roundTo(double roundTo,
double milliSeconds)
Utility to round the given seconds |
void |
setCount(int value)
Set the Count property. |
void |
setDoAll(boolean value)
Set the DoAll property. |
void |
setDoLatest(boolean value)
Set the DoLatest property. |
void |
setEndFixedTime(java.util.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 |
setNowTime(java.util.Date value)
Set the NowTime property. |
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(java.util.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(java.util.List value)
Set the Times property. |
java.lang.String |
toString()
tostring |
Methods inherited from class java.lang.Object |
---|
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 java.lang.String[] STARTMODELABELS
public static java.lang.String[] ENDMODELABELS
public static final int MAX_COUNT
Constructor Detail |
---|
public DateSelection()
public DateSelection(boolean doLatest, int count)
doLatest
- Do the count latest onescount
- the countpublic DateSelection(boolean doAll)
doAll
- Get all available.public DateSelection(int startMode, double startOffset, int endMode, double endOffset)
startMode
- starting time modestartOffset
- offset from start timeendMode
- end time modeendOffset
- offset from end timepublic DateSelection(java.util.Date startTime, java.util.Date endTime)
startTime
- start timeendTime
- end timepublic DateSelection(DateSelection that)
that
- object to copy fromMethod Detail |
---|
public double[] getIntervalTicks()
public java.util.List apply(java.util.List datedThings)
datedThings
- input list of DatedThing-s
public java.util.Date[] getRange()
public static double roundTo(double roundTo, double milliSeconds)
roundTo
- round tomilliSeconds
- time to round
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(java.util.Date d)
d
- propertypublic void setEndFixedTime(java.util.Date d)
d
- propertypublic java.util.Date getStartFixedDate()
public java.util.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(java.util.List value)
value
- The new value for Timespublic java.util.List getTimes()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to check
public void setSkip(int value)
value
- The new value for Skippublic int getSkip()
public void setDoLatest(boolean value)
value
- The new value for DoLatestpublic boolean isLatest()
public boolean getDoLatest()
public void setDoAll(boolean value)
value
- The new value for DoAllpublic boolean isAll()
public boolean getDoAll()
public void setNowTime(java.util.Date value)
value
- The new value for NowTimepublic java.util.Date getNowTime()
public static void main(java.lang.String[] args)
args
- cmd line argspublic 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 |