public class TemporalUtils extends Object
| Constructor and Description |
|---|
TemporalUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Instant |
add(Instant instant,
int amount,
TemporalUnit unit)
Returns a copy of the given instant with the specified amount added or
subtracted.
|
static void |
assertTemporalRelation(RelativePosition temporalRelation,
TemporalGeometricPrimitive t1,
TemporalGeometricPrimitive t2)
Asserts that the first temporal primitive is related to the second one so
as to satisfy the specified temporal relationship.
|
static List<Period> |
splitInterval(Period period,
int size)
Splits a time period into the specified number of intervals.
|
static Period |
temporalExtent(TreeSet<TemporalGeometricPrimitive> tmSet)
Determines the total temporal extent of a set of temporal primitives.
|
static String |
temporalGeometricPrimitiveToString(TemporalGeometricPrimitive timeObj)
Produces a condensed string representation of the given temporal object.
|
public static void assertTemporalRelation(RelativePosition temporalRelation, TemporalGeometricPrimitive t1, TemporalGeometricPrimitive t2)
temporalRelation - A RelativePosition instance that designates a temporal
relationship.t1 - A temporal geometric primitive (instant or period).t2 - Another temporal geometric primitive.public static String temporalGeometricPrimitiveToString(TemporalGeometricPrimitive timeObj)
timeObj - A temporal geometric primitive (instant or period).public static Period temporalExtent(TreeSet<TemporalGeometricPrimitive> tmSet)
tmSet - An ordered set of TemporalGeometricPrimitive objects (instant
or period); it cannot be empty.public static Instant add(Instant instant, int amount, TemporalUnit unit)
instant - An instantaneous point in time.amount - The amount to add (positive) or subtract (negative).unit - The date-time unit of the amount.public static List<Period> splitInterval(Period period, int size)
period - A temporal interval.size - The number of sub-intervals.Copyright © 2020 Open Geospatial Consortium. All rights reserved.