Package com.thingworx.types.primitives
Class Vec3Primitive
- java.lang.Object
-
- com.thingworx.types.primitives.Vec3Primitive
-
- All Implemented Interfaces:
IPrimitiveType<Vec3Primitive,Vec3>
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
,java.util.Comparator<Vec3Primitive>
@ThingworxExtensionApiClass(since={7,1}, canInstantiate=true) public final class Vec3Primitive extends java.lang.Object implements IPrimitiveType<Vec3Primitive,Vec3>, java.lang.Cloneable
Primitive type used to encapsulate a Vec3.- See Also:
Vec3
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Vec3Primitive()
Construct a new Vec3Primitive with a new Vec3 containing default values.Vec3Primitive(Vec3 vec3)
Construct a new Vec3Primitive with a provided Vec3.Vec3Primitive(java.lang.Double x, java.lang.Double y, java.lang.Double z)
Construct a new Vec3Primitive with the provided x, y, and z values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vec3Primitive
clone()
Clone the current Vec3Primitive instance.int
compare(Vec3Primitive v1, Vec3Primitive v2)
int
compareTo(java.lang.Object value)
static Vec3Primitive
convertFromObject(java.lang.Object data)
Convert the incoming data Object to a Vec3Primitive from a String, Vec3, JSONObject, or HashMap.BaseTypes
getBaseType()
Get the BaseType associated to this Vec3Primitive.java.lang.Object
getSerializedValue()
Get a serialized String representation of this Vec3Primitive instance.java.lang.String
getStringValue()
Vec3
getValue()
Get this Vec3Primitive's instance value.void
setValue(Vec3 value)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Vec3Primitive
@ThingworxExtensionApiMethod(since={7,1}) public Vec3Primitive()
Construct a new Vec3Primitive with a new Vec3 containing default values.- See Also:
Vec3
-
Vec3Primitive
@ThingworxExtensionApiMethod(since={7,1}) public Vec3Primitive(Vec3 vec3)
Construct a new Vec3Primitive with a provided Vec3.- Parameters:
vec3
- - a Vec3 to be stored in a new Vec3Primitive
-
Vec3Primitive
@ThingworxExtensionApiMethod(since={7,1}) public Vec3Primitive(java.lang.Double x, java.lang.Double y, java.lang.Double z)
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 Detail
-
getBaseType
@ThingworxExtensionApiMethod(since={7,1}) public BaseTypes getBaseType()
Get the BaseType associated to this Vec3Primitive.- Specified by:
getBaseType
in interfaceIPrimitiveType<Vec3Primitive,Vec3>
-
getSerializedValue
@ThingworxExtensionApiMethod(since={7,1}) public java.lang.Object 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
@ThingworxExtensionApiMethod(since={7,1}) public Vec3 getValue()
Get this Vec3Primitive's instance value.- Specified by:
getValue
in interfaceIPrimitiveType<Vec3Primitive,Vec3>
- Returns:
- This Vec3Primitive's value
-
compareTo
@ThingworxExtensionApiMethod(since={7,1}) public int compareTo(java.lang.Object value)
- Specified by:
compareTo
in interfacejava.lang.Comparable
-
compare
@ThingworxExtensionApiMethod(since={7,1}) public int compare(Vec3Primitive v1, Vec3Primitive v2)
- Specified by:
compare
in interfacejava.util.Comparator<Vec3Primitive>
-
toString
@ThingworxExtensionApiMethod(since={7,1}) public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
clone
@ThingworxExtensionApiMethod(since={7,1}) public Vec3Primitive clone()
Clone the current Vec3Primitive instance.- Specified by:
clone
in interfaceIPrimitiveType<Vec3Primitive,Vec3>
- Overrides:
clone
in classjava.lang.Object
-
convertFromObject
@ThingworxExtensionApiMethod(since={7,1}) public static Vec3Primitive convertFromObject(java.lang.Object data) throws java.lang.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:
java.lang.Exception
- if an error occurs
-
getStringValue
@ThingworxExtensionApiMethod(since={7,1}) public java.lang.String getStringValue()
- Specified by:
getStringValue
in interfaceIPrimitiveType<Vec3Primitive,Vec3>
-
setValue
@ThingworxExtensionApiMethod(since={7,1}) public void setValue(Vec3 value)
- Specified by:
setValue
in interfaceIPrimitiveType<Vec3Primitive,Vec3>
-
-