Package com.thingworx.types.primitives
Class TimespanPrimitive
java.lang.Object
com.thingworx.types.primitives.TimespanPrimitive
- All Implemented Interfaces:
IPrimitiveType<TimespanPrimitive,
,Timespan> Serializable
,Cloneable
,Comparable
,Comparator<TimespanPrimitive>
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class TimespanPrimitive
extends Object
implements IPrimitiveType<TimespanPrimitive,Timespan>, Cloneable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
int
static TimespanPrimitive
convertFromObject
(Object data) org.joda.time.DateTime
getEnd()
org.joda.time.DateTime
getStart()
getValue()
void
setEnd
(org.joda.time.DateTime value) void
void
setStart
(org.joda.time.DateTime value) void
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
TimespanPrimitive
-
TimespanPrimitive
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfaceIPrimitiveType<TimespanPrimitive,
Timespan>
-
getBaseType
- Specified by:
getBaseType
in interfaceIPrimitiveType<TimespanPrimitive,
Timespan>
-
setValue
- Specified by:
setValue
in interfaceIPrimitiveType<TimespanPrimitive,
Timespan>
-
getSerializedValue
- Specified by:
getSerializedValue
in interfaceIPrimitiveType<TimespanPrimitive,
Timespan>
-
getStart
-
setStart
-
getEnd
-
setEnd
-
getPeriod
-
setPeriod
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
compare
@ThingworxExtensionApiMethod(since={6,6}) public int compare(TimespanPrimitive v1, TimespanPrimitive v2) - Specified by:
compare
in interfaceComparator<TimespanPrimitive>
-
convertFromObject
@ThingworxExtensionApiMethod(since={6,6}) public static TimespanPrimitive convertFromObject(Object data) throws Exception - Throws:
Exception
- If an error occurs
-
clone
- Specified by:
clone
in interfaceIPrimitiveType<TimespanPrimitive,
Timespan> - Overrides:
clone
in classObject
-
getStringValue
- Specified by:
getStringValue
in interfaceIPrimitiveType<TimespanPrimitive,
Timespan>
-