Class DataUtils
java.lang.Object
com.inductiveautomation.snap.data.DataUtils
Utility methods for RMProperty.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
convertValue
(Object aValue, Property.Type aType) Converts a given value to a given type.static Object
convertValue
(Object aValue, Property.Type aType, Property.NumberType aNumberType) Converts a given value to a given type.static Property.Type
getPropertyType
(Object anObj) Returns a property type for a given object/class.static String
toString
(Number aNumber, Property.NumberType aNumberType) Returns a string for a number according to given NumberType.static String
toString
(Date aDate, Property.DateType aDateType) Returns a string for a date according to given DateType.
-
Constructor Details
-
DataUtils
public DataUtils()
-
-
Method Details
-
convertValue
Converts a given value to a given type. -
convertValue
public static Object convertValue(Object aValue, Property.Type aType, Property.NumberType aNumberType) Converts a given value to a given type. -
toString
Returns a string for a number according to given NumberType. -
toString
Returns a string for a date according to given DateType. -
getPropertyType
Returns a property type for a given object/class.
-