Class NumberToStringConverter
java.lang.Object
org.eclipse.core.databinding.conversion.Converter<Object,String>
org.eclipse.core.internal.databinding.conversion.AbstractNumberToStringConverter
org.eclipse.core.databinding.conversion.NumberToStringConverter
- All Implemented Interfaces:
IConverter<Object,String>
@Deprecated(forRemoval=true)
public class NumberToStringConverter
extends org.eclipse.core.internal.databinding.conversion.AbstractNumberToStringConverter
Deprecated, for removal: This API element is subject to removal in a future version.
Converts a Number to a String using
NumberFormat.format(...).
This class is thread safe.
The first type parameter of Converter is set to Object to
preserve backwards compatibility, but the argument is meant to always be a
Number.- Since:
- 1.0
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be referenced by clients.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Converts the providedfromObjectto aString.static NumberToStringConverterDeprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromBigDecimal(com.ibm.icu.text.NumberFormat numberFormat) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterDeprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromBigInteger(com.ibm.icu.text.NumberFormat numberFormat) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromByte(boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromByte(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromDouble(boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromDouble(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromFloat(boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromFloat(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromInteger(boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromInteger(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromLong(boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromLong(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromShort(boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.static NumberToStringConverterfromShort(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.eclipse.core.databinding.conversion.Converter
getFromType, getToType
-
Method Details
-
convert
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:org.eclipse.core.internal.databinding.conversion.AbstractNumberToStringConverterConverts the providedfromObjectto aString. If the converter was constructed for an object type, non primitive, afromObjectofnullwill be converted to an empty string.- Specified by:
convertin interfaceIConverter<Object,String> - Overrides:
convertin classorg.eclipse.core.internal.databinding.conversion.AbstractNumberToStringConverter- Parameters:
fromObject- value to convert. May benullif the converter was constructed for a non primitive type.- Returns:
- the converted object, of type
IConverter.getToType() - See Also:
- Implementation Note:
- Overridden to avoid API tooling problem.
-
fromDouble
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
primitive-trueif the type is a double- Returns:
- Double converter for the default locale
-
fromDouble
public static NumberToStringConverter fromDouble(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converterprimitive-trueif the type is a double- Returns:
- Double converter with the provided numberFormat
-
fromLong
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
primitive-trueif the type is a long- Returns:
- Long converter for the default locale
-
fromLong
public static NumberToStringConverter fromLong(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converterprimitive-trueif the type is a long- Returns:
- Long convert with the provided numberFormat
-
fromFloat
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
primitive-trueif the type is a float- Returns:
- Float converter for the default locale
-
fromFloat
public static NumberToStringConverter fromFloat(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converterprimitive-trueif the type is a float- Returns:
- Float converter with the provided numberFormat
-
fromInteger
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
primitive-trueif the type is a int- Returns:
- Integer converter for the default locale
-
fromInteger
public static NumberToStringConverter fromInteger(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converterprimitive-trueif the type is a int- Returns:
- Integer converter with the provided numberFormat
-
fromBigInteger
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- BigInteger convert for the default locale
-
fromBigInteger
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converter- Returns:
- BigInteger converter with the provided numberFormat
-
fromBigDecimal
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- BigDecimal convert for the default locale
- Since:
- 1.2
-
fromBigDecimal
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converter- Returns:
- BigDecimal converter with the provided numberFormat
- Since:
- 1.2
-
fromShort
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
primitive-trueif the type is a short- Returns:
- Short converter for the default locale
- Since:
- 1.2
-
fromShort
public static NumberToStringConverter fromShort(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converterprimitive-trueif the type is a short- Returns:
- Short converter with the provided numberFormat
- Since:
- 1.2
-
fromByte
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
primitive-trueif the type is a byte- Returns:
- Byte converter for the default locale
- Since:
- 1.2
-
fromByte
public static NumberToStringConverter fromByte(com.ibm.icu.text.NumberFormat numberFormat, boolean primitive) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
numberFormat- number format used by the converterprimitive-trueif the type is a byte- Returns:
- Byte converter with the provided numberFormat
- Since:
- 1.2
-
NumberToStringConverterinstead, which does not usecom.ibm.icuas that package is planned to be removed in the future from platform.