Package com.thingworx.types.primitives
Class Vec3Primitive
java.lang.Object
com.thingworx.types.primitives.Vec3Primitive
- All Implemented Interfaces:
IPrimitiveType<Vec3Primitive,
,Vec3> Serializable
,Cloneable
,Comparable
,Comparator<Vec3Primitive>
@ThingworxExtensionApiClass(since={7,1},
canInstantiate=true)
public final class Vec3Primitive
extends Object
implements IPrimitiveType<Vec3Primitive,Vec3>, Cloneable
Primitive type used to encapsulate a Vec3.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescription
Construct a new Vec3Primitive with a new Vec3 containing default values.Vec3Primitive
(Vec3 vec3)
Construct a new Vec3Primitive with a provided Vec3.Vec3Primitive
(Double x, Double y, Double z)
Construct a new Vec3Primitive with the provided x, y, and z values. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone the current Vec3Primitive instance.int
compare
(Vec3Primitive v1, Vec3Primitive v2) int
static Vec3Primitive
convertFromObject
(Object data)
Convert the incoming data Object to a Vec3Primitive from a String, Vec3, JSONObject, or HashMap.
Get the BaseType associated to this Vec3Primitive.
Get a serialized String representation of this Vec3Primitive instance.getValue()
Get this Vec3Primitive's instance value.void
toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
Vec3Primitive
Construct a new Vec3Primitive with a new Vec3 containing default values.- See Also:
-
Vec3Primitive
Construct a new Vec3Primitive with a provided Vec3.- Parameters:
vec3
- - a Vec3 to be stored in a new Vec3Primitive
-
Vec3Primitive
Construct a new Vec3Primitive with the provided x, y, and z values.- Parameters:
x
- - double value to be used for xy
- - double value to be used for yz
- - double value to be used for z
-
-
Method Details
-
getBaseType
Get the BaseType associated to this Vec3Primitive.- Specified by:
getBaseType
in interfaceIPrimitiveType<Vec3Primitive,
Vec3>
-
getSerializedValue
Get a serialized String representation of this Vec3Primitive instance. Will return null if this Vec3Primitive's Vec3 is null.- Specified by:
getSerializedValue
in interfaceIPrimitiveType<Vec3Primitive,
Vec3>
-
getValue
Get this Vec3Primitive's instance value.- Specified by:
getValue
in interfaceIPrimitiveType<Vec3Primitive,
Vec3> - Returns:
- This Vec3Primitive's value
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
compare
- Specified by:
compare
in interfaceComparator<Vec3Primitive>
-
toString
-
clone
Clone the current Vec3Primitive instance.- Specified by:
clone
in interfaceIPrimitiveType<Vec3Primitive,
Vec3> - Overrides:
clone
in classObject
-
convertFromObject
@ThingworxExtensionApiMethod(since={7,1}) public static Vec3Primitive convertFromObject(Object data) throws Exception
Convert the incoming data Object to a Vec3Primitive from a String, Vec3, JSONObject, or HashMap.- Parameters:
data
- -Incoming object to be converted to a Vec3Primitive- Returns:
- A new Vec3Primitive
- Throws:
Exception
- if an error occurs
-
getStringValue
- Specified by:
getStringValue
in interfaceIPrimitiveType<Vec3Primitive,
Vec3>
-
setValue
- Specified by:
setValue
in interfaceIPrimitiveType<Vec3Primitive,
Vec3>
-