Class PodioCurrency
- java.lang.Object
-
- com.java_podio.code_gen.static_classes.PodioCurrency
-
- All Implemented Interfaces:
PodioField,Serializable
public class PodioCurrency extends Object implements PodioField
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ThreadLocal<NumberFormat>currencyValueFormatter
-
Constructor Summary
Constructors Constructor Description PodioCurrency()Creates Currency using {@link java.util.Locale.getDefault()}.PodioCurrency(Double value)Creates Currency using {@link java.util.Locale.getDefault()}.PodioCurrency(Double value, String currency)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Currencygetcurrency()com.podio.item.FieldValuesUpdategetFieldValuesUpdate(String externalId)Doublegetvalue()inthashCode()static PodioCurrencyparseString(String text)CreatesPodioCurrencywith value from text, using the current locale.
Includes trim operation.voidsetcurrency(Currency currency)voidsetvalue(Double value)StringtoString()static StringtoString(PodioCurrency currency, NumberFormat format)
-
-
-
Field Detail
-
currencyValueFormatter
public static ThreadLocal<NumberFormat> currencyValueFormatter
-
-
Constructor Detail
-
PodioCurrency
public PodioCurrency()
Creates Currency using {@link java.util.Locale.getDefault()}.
-
PodioCurrency
public PodioCurrency(Double value)
Creates Currency using {@link java.util.Locale.getDefault()}.
-
PodioCurrency
public PodioCurrency(Double value, String currency)
- Parameters:
currency- Currency code as defined by ISO 4217 (e.g. "EUR" or "USD") - seeCurrency.getInstance(String)
-
-
Method Detail
-
getcurrency
public Currency getcurrency()
-
setcurrency
public void setcurrency(Currency currency)
-
getvalue
public Double getvalue()
-
setvalue
public void setvalue(Double value)
-
getFieldValuesUpdate
public com.podio.item.FieldValuesUpdate getFieldValuesUpdate(String externalId)
- Specified by:
getFieldValuesUpdatein interfacePodioField
-
parseString
public static PodioCurrency parseString(String text) throws ParseException
CreatesPodioCurrencywith value from text, using the current locale.
Includes trim operation.- Parameters:
text-- Returns:
null, iftext==null || text.length()==0- Throws:
ParseException
-
toString
public static String toString(PodioCurrency currency, NumberFormat format)
- Parameters:
currency-format-- Returns:
- "" for
currency==null || currency.getValue()==null
-
-