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