01: /*
02: **********************************************************************
03: * Copyright (c) 2004-2006, International Business Machines
04: * Corporation and others. All Rights Reserved.
05: **********************************************************************
06: * Author: Alan Liu
07: * Created: April 20, 2004
08: * Since: ICU 3.0
09: **********************************************************************
10: */
11: package com.ibm.icu.text;
12:
13: import com.ibm.icu.util.ULocale;
14:
15: /**
16: * A formatter for Measure objects. This is an abstract base class.
17: *
18: * <p>To format or parse a Measure object, first create a formatter
19: * object using a MeasureFormat factory method. Then use that
20: * object's format and parse methods.
21: *
22: * @see com.ibm.icu.text.UFormat
23: * @author Alan Liu
24: * @stable ICU 3.0
25: */
26: public abstract class MeasureFormat extends UFormat {
27: // Generated by serialver from JDK 1.4.1_01
28: static final long serialVersionUID = -7182021401701778240L;
29:
30: /**
31: * @internal
32: * @deprecated This API is ICU internal only.
33: */
34: protected MeasureFormat() {
35: };
36:
37: /**
38: * Return a formatter for CurrencyAmount objects in the given
39: * locale.
40: * @param locale desired locale
41: * @return a formatter object
42: * @stable ICU 3.0
43: */
44: public static MeasureFormat getCurrencyFormat(ULocale locale) {
45: return new CurrencyFormat(locale);
46: }
47:
48: /**
49: * Return a formatter for CurrencyAmount objects in the default
50: * locale.
51: * @return a formatter object
52: * @stable ICU 3.0
53: */
54: public static MeasureFormat getCurrencyFormat() {
55: return getCurrencyFormat(ULocale.getDefault());
56: }
57: }
|