public class Date extends java.lang.Object implements ResourceSelector
Constructor and Description |
---|
Date() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDatetime()
Get the date & time in String format.
|
long |
getGranularity()
Get the timestamp granularity used by this ResourceSelector.
|
long |
getMillis()
Get the date/time in ms.
|
java.lang.String |
getPattern()
Get the pattern for use with the datetime attribute.
|
TimeComparison |
getWhen()
Get the comparison mode.
|
boolean |
isSelected(Resource r)
Return true if this Resource is selected.
|
void |
setDateTime(java.lang.String s)
Set the date and time as a String.
|
void |
setGranularity(long g)
Set the granularity to use for this ResourceSelector.
|
void |
setMillis(long m)
Set the date/time in milliseconds since 1970.
|
void |
setPattern(java.lang.String p)
Set the optional pattern to use with the datetime attribute.
|
void |
setWhen(TimeComparison c)
Set the comparison mode.
|
public void setMillis(long m)
m
- the number of millis.public long getMillis()
public void setDateTime(java.lang.String s)
s
- the date & time to use.public java.lang.String getDatetime()
public void setGranularity(long g)
g
- the timestamp granularity.public long getGranularity()
public void setPattern(java.lang.String p)
p
- the SimpleDateFormat-compatible pattern string.public java.lang.String getPattern()
public void setWhen(TimeComparison c)
c
- a TimeComparison object.public TimeComparison getWhen()
public boolean isSelected(Resource r)
isSelected
in interface ResourceSelector
r
- the Resource to check.