public class TimeSelection extends Object
| Modifier and Type | Field and Description |
|---|---|
static SimpleDateFormat |
DATE_FORMAT |
static String |
DATE_PATTERN |
String |
lowerEdgeString
String that defines time window start.
|
String |
name
Time window name.
|
String |
upperEdgeString
String that defines time window end.
|
| Constructor and Description |
|---|
TimeSelection(String name,
String start,
String end,
boolean persistent) |
| Modifier and Type | Method and Description |
|---|---|
static Comparator<TimeSelection> |
compareByName()
Returns comparator that compares time windows by names.
|
static Comparator |
compareByTime()
Returns comparator that compares time windows by last use times, most recent first.
|
long |
getLastUseTime()
Returns the time in milliseconds when this time window was last selected.
|
long |
getLowerEdge()
Returns the current value of this window start time in milliseconds.
|
long |
getUpperEdge()
Returns the current value of this window end time in milliseconds.
|
boolean |
isPersistent()
Returns true if this time window should be persisted between sessions.
|
static TimeSelection |
parseCompressedString(String s)
Parses string representation of this time window used for saving it in application properties.
|
void |
setPersistent(boolean persistent)
Sets the flag that indicate whether or not this time window should be persisted between sessions.
|
String |
toCompressedString()
Returns string representation of this time window used for saving it in application properties.
|
String |
toString()
Returns user-readable string representation of this time window.
|
void |
touch()
Sets the time when this time window was last selected to the current system time.
|
public static final String DATE_PATTERN
public static final SimpleDateFormat DATE_FORMAT
public String name
public String lowerEdgeString
public String upperEdgeString
public long getLowerEdge()
public long getUpperEdge()
public boolean isPersistent()
public void setPersistent(boolean persistent)
public long getLastUseTime()
public void touch()
public String toString()
public String toCompressedString()
public static TimeSelection parseCompressedString(String s)
public static Comparator<TimeSelection> compareByName()
public static Comparator compareByTime()
Copyright © 2014 LSST. All rights reserved.