Currency Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A class encapsulating a currency, as defined by ISO 4217.
[Android.Runtime.Register("android/icu/util/Currency", ApiSince=24, DoNotGenerateAcw=true)]
public class Currency : Android.Icu.Util.MeasureUnit
[<Android.Runtime.Register("android/icu/util/Currency", ApiSince=24, DoNotGenerateAcw=true)>]
type Currency = class
inherit MeasureUnit
- Inheritance
- Attributes
Remarks
A class encapsulating a currency, as defined by ISO 4217. A Currency
object can be created given a Locale
or given an ISO 4217 code. Once created, the Currency
object can return various data necessary to its proper display:
<ul><li>A display symbol, for a specific locale <li>The number of fraction digits to display <li>A rounding increment </ul>
The DecimalFormat
class uses these data to display currencies.
Note: This class deliberately resembles java.util.Currency
but it has a completely independent implementation, and adds features not present in the JDK.
Java documentation for android.icu.util.Currency
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
Currency(IntPtr, JniHandleOwnership) | |
Currency(String) |
Constructs a currency object for the given ISO 4217 3-letter code. |
Fields
FormalSymbolName |
Obsolete.
Selector for getName() indicating the formal currency symbol. |
LongName |
Obsolete.
Selector for getName() indicating the long name for a currency, such as "US Dollar" for USD. |
NarrowSymbolName |
Obsolete.
Selector for getName() indicating the narrow currency symbol. |
PluralLongName |
Obsolete.
Selector for getName() indicating the plural long name for a currency, such as "US dollar" for USD in "1 US dollar", and "US dollars" for USD in "2 US dollars". |
SymbolName |
Obsolete.
Selector for getName() indicating a symbolic name for a currency, such as "$" for USD. |
VariantSymbolName |
Obsolete.
Selector for getName() indicating the variant currency symbol. |
Properties
AvailableCurrencies |
Returns the set of available currencies. |
Class |
Returns the runtime class of this |
CurrencyCode |
Returns the ISO 4217 3-letter code for this currency object. |
DefaultFractionDigits |
Returns the number of the number of fraction digits that should be displayed for this currency. |
Dimensionality |
Returns the dimensionality (power) of this MeasureUnit. (Inherited from MeasureUnit) |
DisplayName |
Returns the display name for this currency in the default locale. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Identifier |
Get CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35. (Inherited from MeasureUnit) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
NumericCode |
Returns the ISO 4217 numeric code for this currency object. |
PeerReference | (Inherited from Object) |
Prefix | (Inherited from MeasureUnit) |
RoundingIncrement |
Returns the rounding increment for this currency, or 0. |
Subtype |
Get the subType, such as “foot”. (Inherited from MeasureUnit) |
Symbol |
Convenience and compatibility override of getName that
requests the symbol name for the default |
ThresholdClass | |
ThresholdType | |
Type |
Get the type, such as "length". (Inherited from MeasureUnit) |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
FromJavaCurrency(Currency) |
Returns a Currency object based on the currency represented by the given java. |
GetAvailableCurrencyCodes(Locale, Date) |
Returns an array of Strings which contain the currency
identifiers that are valid for the given |
GetAvailableCurrencyCodes(ULocale, Date) |
Returns an array of Strings which contain the currency identifiers that are valid for the given locale on the given date. |
GetAvailableLocales() |
Return an array of the locales for which a currency is defined. |
GetAvailableULocales() |
Return an array of the ulocales for which a currency is defined. |
GetComplexity() | (Inherited from MeasureUnit) |
GetDefaultFractionDigits(Currency+CurrencyUsage) | |
GetDisplayName(Locale) |
Returns the display name for this currency in the given locale. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetInstance(Locale) |
Returns a currency object for the default currency in the given locale. |
GetInstance(String) |
Returns a currency object given an ISO 4217 3-letter code. |
GetInstance(ULocale) |
Returns a currency object for the default currency in the given locale. |
GetKeywordValuesForLocale(String, ULocale, Boolean) |
Given a key and a locale, returns an array of values for the key for which data exists. |
GetName(Locale, CurrencyNameStyle, Boolean[]) |
Returns the display name for the given currency in the given locale. |
GetName(Locale, CurrencyNameStyle, String, Boolean[]) |
Returns the display name for the given currency in the given locale. |
GetName(ULocale, CurrencyNameStyle, Boolean[]) |
Returns the display name for the given currency in the given locale. |
GetName(ULocale, CurrencyNameStyle, String, Boolean[]) |
Returns the display name for the given currency in the given locale. |
GetRoundingIncrement(Currency+CurrencyUsage) | |
GetSymbol(Locale) |
Convenience and compatibility override of getName that requests the symbol name. |
GetSymbol(ULocale) |
Convenience and compatibility override of getName that requests the symbol name. |
IsAvailable(String, Date, Date) |
Queries if the given ISO 4217 3-letter code is available on the specified date range. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
Product(MeasureUnit) |
Computes the product of this unit with another unit. (Inherited from MeasureUnit) |
Reciprocal() |
Computes the reciprocal of this MeasureUnit, with the numerator and denominator flipped. (Inherited from MeasureUnit) |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SplitToSingleUnits() |
Returns the list of SINGLE units contained within a sequence of COMPOUND units. (Inherited from MeasureUnit) |
ToArray<T>() | (Inherited from Object) |
ToJavaCurrency() |
Returns a java. |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
WithDimensionality(Int32) |
Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality (power). (Inherited from MeasureUnit) |
WithPrefix(MeasureUnit+MeasurePrefix) | (Inherited from MeasureUnit) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |