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