Package com.thingworx.types.primitives
Class Vec4Primitive
java.lang.Object
com.thingworx.types.primitives.Vec4Primitive
- All Implemented Interfaces:
IPrimitiveType<Vec4Primitive,
,Vec4> Serializable
,Cloneable
,Comparable
,Comparator<Vec4Primitive>
@ThingworxExtensionApiClass(since={7,1},
canInstantiate=true)
public final class Vec4Primitive
extends Object
implements IPrimitiveType<Vec4Primitive,Vec4>, Cloneable
Primitive type used to encapsulate a Vec4.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescription
Construct a new Vec4Primitive with a new Vec4 containing default values.Vec4Primitive
(Vec4 vec4)
Construct a new Vec4Primitive with a provided Vec4.Vec4Primitive
(Double x, Double y, Double z, Double w)
Construct a new Vec4Primitive with the provided x, y, z, and w values. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone the current Vec4Primitive instance.int
compare
(Vec4Primitive v1, Vec4Primitive v2) int
static Vec4Primitive
convertFromObject
(Object data)
Convert the incoming data Object to a Vec4Primitive from a String, Vec4, JSONObject, or HashMap.
Get the BaseType associated to this Vec4Primitive.
Get a serialized String representation of this Vec4Primitive instance.getValue()
Get this Vec4Primitive'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
-
Vec4Primitive
Construct a new Vec4Primitive with a new Vec4 containing default values.- See Also:
-
Vec4Primitive
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(Double x, Double y, Double z, 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 Details
-
getBaseType
Get the BaseType associated to this Vec4Primitive.- Specified by:
getBaseType
in interfaceIPrimitiveType<Vec4Primitive,
Vec4>
-
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
Get this Vec4Primitive's instance value.- Specified by:
getValue
in interfaceIPrimitiveType<Vec4Primitive,
Vec4> - Returns:
- This Vec4Primitive's value
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
compare
- Specified by:
compare
in interfaceComparator<Vec4Primitive>
-
toString
-
clone
Clone the current Vec4Primitive instance.- Specified by:
clone
in interfaceIPrimitiveType<Vec4Primitive,
Vec4> - Overrides:
clone
in classObject
-
convertFromObject
@ThingworxExtensionApiMethod(since={7,1}) public static Vec4Primitive convertFromObject(Object data) throws 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:
Exception
- if an error occurs
-
getStringValue
- Specified by:
getStringValue
in interfaceIPrimitiveType<Vec4Primitive,
Vec4>
-
setValue
- Specified by:
setValue
in interfaceIPrimitiveType<Vec4Primitive,
Vec4>
-