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