public class TimeUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
RESERVED_MILLIS_FOR_NULL |
| Constructor and Description |
|---|
TimeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
calendarToGMTMillis(Calendar cal)
Convert a calendar object to a long in the form of milliseconds since the epoch of January 1,
1970.
|
static TemporalConstraints |
composeRangeTemporalConstraints(TimeDescriptors timeDescriptors,
TemporalConstraintsSet constraintsSet)
Compose temporal constraints given the constraint set and the descriptors for the index.
|
static Instant |
getInstant(Object timeObject) |
static org.threeten.extra.Interval |
getInterval(Object timeObject) |
static org.threeten.extra.Interval |
getInterval(Object startTimeObject,
Object endTimeObject) |
static org.threeten.extra.Interval |
getInterval(org.opengis.feature.simple.SimpleFeature entry,
String fieldName) |
static Instant |
getIntervalEnd(org.threeten.extra.Interval interval) |
static TemporalConstraints |
getTemporalConstraintsForDescriptors(TimeDescriptors timeDescriptors,
TemporalConstraintsSet timeBoundsSet) |
static long |
getTimeMillis(Object timeObj)
Get the time in millis of this temporal object (either numeric interpreted as millisecond time
in GMT, Date, or Calendar)
|
static Object |
getTimeValue(Class<?> bindingClass,
long longVal)
Instantiates the class type as a new object with the temporal value being the longVal
interpreted as milliseconds since the epoch in GMT
|
static TimeDescriptors |
inferTimeAttributeDescriptor(org.opengis.feature.simple.SimpleFeatureType persistType)
Determine if a time or range descriptor is set.
|
static boolean |
isTemporal(Class<?> bindingClass)
Determine if this class is a supported temporal class.
|
static org.opengis.filter.Filter |
toDuringFilter(long startTimeMillis,
long endTimeMillis,
String singleTimeField) |
static org.opengis.filter.Filter |
toFilter(long startTimeMillis,
long endTimeMillis,
String startTimeField,
String endTimeField) |
public static long calendarToGMTMillis(Calendar cal)
cal - The calendar objectpublic static org.opengis.filter.Filter toDuringFilter(long startTimeMillis,
long endTimeMillis,
String singleTimeField)
startTimeMillis - start time (inclusive)endTimeMillis - end time (exclusive)singleTimeField - public static org.opengis.filter.Filter toFilter(long startTimeMillis,
long endTimeMillis,
String startTimeField,
String endTimeField)
public static long getTimeMillis(Object timeObj)
timeObj - The temporal objectpublic static boolean isTemporal(Class<?> bindingClass)
bindingClass - The binding class of the attributepublic static Object getTimeValue(Class<?> bindingClass, long longVal)
bindingClass - The class to try to instantiate for this time value. Currently
java.util.Calendar, java.util.Date, and java.lang.Long are supported.longVal - A value to be interpreted as milliseconds since the epoch in GMTpublic static TemporalConstraints getTemporalConstraintsForDescriptors(TimeDescriptors timeDescriptors, TemporalConstraintsSet timeBoundsSet)
public static TemporalConstraints composeRangeTemporalConstraints(TimeDescriptors timeDescriptors, TemporalConstraintsSet constraintsSet)
timeDescriptors - constraintsSet - public static org.threeten.extra.Interval getInterval(org.opengis.feature.simple.SimpleFeature entry,
String fieldName)
public static org.threeten.extra.Interval getInterval(Object timeObject)
public static org.threeten.extra.Interval getInterval(Object startTimeObject, Object endTimeObject)
public static Instant getIntervalEnd(org.threeten.extra.Interval interval)
public static final TimeDescriptors inferTimeAttributeDescriptor(org.opengis.feature.simple.SimpleFeatureType persistType)
persistType - - FeatureType that will be scanned for TimeAttributesCopyright © 2013–2021. All rights reserved.