com.ptc.core.meta.common
Class DataTypesUtility

java.lang.Object
  extended by com.ptc.core.meta.common.DataTypesUtility

public class DataTypesUtility
extends Object



Supported API: true

Extendable: false


Method Summary
static Object fromExternalForm(String external_form)
          

Supported API: true
static String getDenominator(Ratio value, Locale locale)
          

Supported API: true
static String getLabel(Hyperlink value, Locale locale)
          

Supported API: true
static String getLink(Hyperlink value, Locale locale)
          

Supported API: true
static String getNumerator(Ratio value, Locale locale)
          

Supported API: true
static String getValue(FloatingPointWithUnits value, int displayPrecision, Locale locale)
          

Supported API: true
static String getValue(FloatingPointWithUnits value, Locale locale)
          

Supported API: true
static String getValue(FloatingPointWithUnits value, String unitsString, int displayPrecision, Locale locale)
          

Supported API: true
static String getValue(FloatingPointWithUnits value, String unitsString, Locale locale)
          

Supported API: true
static Boolean toBoolean(String value, Locale locale)
          

Supported API: true
static String toExternalForm(Object obj)
          

Supported API: true
static FloatingPoint toFloatingPoint(String value, Locale locale)
          

Supported API: true
static FloatingPointWithUnits toFloatingPointWithUnits(String value, Locale locale)
          

Supported API: true
static Hyperlink toHyperlink(String value, Locale locale)
          

Supported API: true
static Hyperlink toHyperlink(String label, String link, Locale locale)
          

Supported API: true
static Long toLong(String value, Locale locale)
          

Supported API: true
static Ratio toRatio(String value, Locale locale)
          

Supported API: true
static Ratio toRatio(String numerator, String denominator, Locale locale)
          

Supported API: true
static String toString(Boolean value, Locale locale)
          

Supported API: true
static String toString(FloatingPoint value, int displayPrecision, Locale locale)
          

Supported API: true
static String toString(FloatingPoint value, Locale locale)
          

Supported API: true
static String toString(FloatingPointWithUnits value, int displayPrecision, Locale locale)
          

Supported API: true
static String toString(FloatingPointWithUnits value, Locale locale)
          

Supported API: true
static String toString(FloatingPointWithUnits value, String unitsString, int displayPrecision, Locale locale)
          

Supported API: true
static String toString(FloatingPointWithUnits value, String unitsString, Locale locale)
          

Supported API: true
static String toString(Hyperlink value, Locale locale)
          

Supported API: true
static String toString(Long value, Locale locale)
          

Supported API: true
static String toString(Ratio value, Locale locale)
          

Supported API: true
static String toString(Timestamp value, Locale locale)
          

Supported API: true
static String toString(Timestamp value, String pattern, Locale locale)
          

Supported API: true
static Timestamp toTimestamp(String value, Locale locale)
          

Supported API: true
static Timestamp toTimestamp(String value, String pattern, Locale locale)
          

Supported API: true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toBoolean

public static Boolean toBoolean(String value,
                                Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
Boolean

toString

public static String toString(Boolean value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toFloatingPoint

public static FloatingPoint toFloatingPoint(String value,
                                            Locale locale)
                                     throws ParseException


Supported API: true

Parameters:
value -
locale -
Returns:
FloatingPoint
Throws:
ParseException

toString

public static String toString(FloatingPoint value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toString

public static String toString(FloatingPoint value,
                              int displayPrecision,
                              Locale locale)


Supported API: true

Parameters:
value -
displayPrecision -
locale -
Returns:
String

toFloatingPointWithUnits

public static FloatingPointWithUnits toFloatingPointWithUnits(String value,
                                                              Locale locale)
                                                       throws ParseException,
                                                              wt.units.UnitFormatException


Supported API: true

Parameters:
value -
locale -
Returns:
FloatingPointWithUnits
Throws:
ParseException
wt.units.UnitFormatException

toString

public static String toString(FloatingPointWithUnits value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toString

public static String toString(FloatingPointWithUnits value,
                              int displayPrecision,
                              Locale locale)


Supported API: true

Parameters:
value -
displayPrecision -
locale -
Returns:
String

toString

public static String toString(FloatingPointWithUnits value,
                              String unitsString,
                              Locale locale)
                       throws wt.units.UnitFormatException,
                              wt.units.IncompatibleUnitsException


Supported API: true

Parameters:
value -
unitsString -
locale -
Returns:
String
Throws:
wt.units.UnitFormatException
wt.units.IncompatibleUnitsException

toString

public static String toString(FloatingPointWithUnits value,
                              String unitsString,
                              int displayPrecision,
                              Locale locale)
                       throws wt.units.UnitFormatException,
                              wt.units.IncompatibleUnitsException


Supported API: true

Parameters:
value -
unitsString -
displayPrecision -
locale -
Returns:
String
Throws:
wt.units.UnitFormatException
wt.units.IncompatibleUnitsException

getValue

public static String getValue(FloatingPointWithUnits value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

getValue

public static String getValue(FloatingPointWithUnits value,
                              int displayPrecision,
                              Locale locale)


Supported API: true

Parameters:
value -
displayPrecision -
locale -
Returns:
String

getValue

public static String getValue(FloatingPointWithUnits value,
                              String unitsString,
                              Locale locale)
                       throws wt.units.UnitFormatException,
                              wt.units.IncompatibleUnitsException


Supported API: true

Parameters:
value -
unitsString -
locale -
Returns:
String
Throws:
wt.units.UnitFormatException
wt.units.IncompatibleUnitsException

getValue

public static String getValue(FloatingPointWithUnits value,
                              String unitsString,
                              int displayPrecision,
                              Locale locale)
                       throws wt.units.UnitFormatException,
                              wt.units.IncompatibleUnitsException


Supported API: true

Parameters:
value -
unitsString -
displayPrecision -
locale -
Returns:
String
Throws:
wt.units.UnitFormatException
wt.units.IncompatibleUnitsException

toLong

public static Long toLong(String value,
                          Locale locale)
                   throws ParseException


Supported API: true

Parameters:
value -
locale -
Returns:
Long
Throws:
ParseException

toString

public static String toString(Long value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toTimestamp

public static Timestamp toTimestamp(String value,
                                    Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
Timestamp

toTimestamp

public static Timestamp toTimestamp(String value,
                                    String pattern,
                                    Locale locale)


Supported API: true

Parameters:
value -
pattern -
locale -
Returns:
Timestamp

toString

public static String toString(Timestamp value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toString

public static String toString(Timestamp value,
                              String pattern,
                              Locale locale)


Supported API: true

Parameters:
value -
pattern -
locale -
Returns:
String

toRatio

public static Ratio toRatio(String value,
                            Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
Ratio

toRatio

public static Ratio toRatio(String numerator,
                            String denominator,
                            Locale locale)
                     throws ParseException


Supported API: true

Parameters:
numerator -
denominator -
locale -
Returns:
Ratio
Throws:
ParseException

getNumerator

public static String getNumerator(Ratio value,
                                  Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

getDenominator

public static String getDenominator(Ratio value,
                                    Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toString

public static String toString(Ratio value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toHyperlink

public static Hyperlink toHyperlink(String label,
                                    String link,
                                    Locale locale)


Supported API: true

Parameters:
label -
link -
locale -
Returns:
Hyperlink

toHyperlink

public static Hyperlink toHyperlink(String value,
                                    Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
Hyperlink

toString

public static String toString(Hyperlink value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

getLabel

public static String getLabel(Hyperlink value,
                              Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

getLink

public static String getLink(Hyperlink value,
                             Locale locale)


Supported API: true

Parameters:
value -
locale -
Returns:
String

toExternalForm

public static String toExternalForm(Object obj)


Supported API: true

Parameters:
obj -
Returns:
String

fromExternalForm

public static Object fromExternalForm(String external_form)


Supported API: true

Parameters:
external_form -
Returns:
Object