@ThingworxExtensionApiClass(since={7,1}, canInstantiate=true) public class Vec2Primitive extends java.lang.Object implements IPrimitiveType<Vec2Primitive,Vec2>, java.lang.Cloneable
Vec2
,
Serialized FormConstructor and Description |
---|
Vec2Primitive()
Construct a new Vec2Primitive with a new Vec2 containing default values. |
Vec2Primitive(double x,
double y)
Construct a new Vec2Primitive with the provided x and y values. |
Vec2Primitive(Vec2 vec2)
Construct a new Vec2Primitive with a provided Vec2. |
Modifier and Type | Method and Description |
---|---|
Vec2Primitive |
clone()
Clone the current Vec2Primitive instance. |
int |
compare(Vec2Primitive v1,
Vec2Primitive v2) |
int |
compareTo(java.lang.Object value) |
static Vec2Primitive |
convertFromObject(java.lang.Object data)
Convert the incoming data Object to a Vec2Primitive from a String, Vec2, JSONObject, or HashMap. |
BaseTypes |
getBaseType()
Get the BaseType associated to this Vec2Primitive. |
java.lang.Object |
getSerializedValue()
Get a serialized String representation of this Vec2Primitive instance. |
java.lang.String |
getStringValue() |
Vec2 |
getValue()
Get this Vec2Primitive's instance value. |
void |
setValue(Vec2 value) |
java.lang.String |
toString() |
@ThingworxExtensionApiMethod(since={7,1}) public Vec2Primitive()
Vec2
@ThingworxExtensionApiMethod(since={7,1}) public Vec2Primitive(Vec2 vec2)
vec2
- - a Vec2 to be stored in a new Vec2Primitive@ThingworxExtensionApiMethod(since={7,1}) public Vec2Primitive(double x, double y)
x
- - double value to be used for xy
- - double value to be used for y@ThingworxExtensionApiMethod(since={7,1}) public BaseTypes getBaseType()
getBaseType
in interface IPrimitiveType<Vec2Primitive,Vec2>
@ThingworxExtensionApiMethod(since={7,1}) public java.lang.Object getSerializedValue()
getSerializedValue
in interface IPrimitiveType<Vec2Primitive,Vec2>
@ThingworxExtensionApiMethod(since={7,1}) public Vec2 getValue()
getValue
in interface IPrimitiveType<Vec2Primitive,Vec2>
@ThingworxExtensionApiMethod(since={7,1}) public int compareTo(java.lang.Object value)
compareTo
in interface java.lang.Comparable
@ThingworxExtensionApiMethod(since={7,1}) public int compare(Vec2Primitive v1, Vec2Primitive v2)
compare
in interface java.util.Comparator<Vec2Primitive>
@ThingworxExtensionApiMethod(since={7,1}) public java.lang.String toString()
toString
in class java.lang.Object
@ThingworxExtensionApiMethod(since={7,1}) public Vec2Primitive clone()
clone
in interface IPrimitiveType<Vec2Primitive,Vec2>
clone
in class java.lang.Object
@ThingworxExtensionApiMethod(since={7,1}) public static Vec2Primitive convertFromObject(java.lang.Object data) throws java.lang.Exception
data
- - Incoming object to be converted to a Vec2Primitivejava.lang.Exception
- if an error occurs@ThingworxExtensionApiMethod(since={7,1}) public java.lang.String getStringValue()
getStringValue
in interface IPrimitiveType<Vec2Primitive,Vec2>
@ThingworxExtensionApiMethod(since={7,1}) public void setValue(Vec2 value)
setValue
in interface IPrimitiveType<Vec2Primitive,Vec2>