]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java
Clean up imports.
[Dictionary.git] / jars / icu4j-52_1 / main / classes / core / src / com / ibm / icu / text / MeasureFormat.java
1 /*
2 **********************************************************************
3 * Copyright (c) 2004-2011, International Business Machines
4 * Corporation and others.  All Rights Reserved.
5 **********************************************************************
6 * Author: Alan Liu
7 * Created: April 20, 2004
8 * Since: ICU 3.0
9 **********************************************************************
10 */
11 package com.ibm.icu.text;
12
13 import com.ibm.icu.util.ULocale;
14 import com.ibm.icu.util.ULocale.Category;
15
16 /**
17  * A formatter for Measure objects.  This is an abstract base class.
18  *
19  * <p>To format or parse a Measure object, first create a formatter
20  * object using a MeasureFormat factory method.  Then use that
21  * object's format and parse methods.
22  *
23  * @see com.ibm.icu.text.UFormat
24  * @author Alan Liu
25  * @stable ICU 3.0
26  */
27 public abstract class MeasureFormat extends UFormat {
28     // Generated by serialver from JDK 1.4.1_01
29     static final long serialVersionUID = -7182021401701778240L;
30
31     /**
32      * @internal
33      * @deprecated This API is ICU internal only.
34      */
35     protected MeasureFormat() {}
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      * <code>FORMAT</code> locale.
51      * @return a formatter object
52      * @see Category#FORMAT
53      * @stable ICU 3.0
54      */
55     public static MeasureFormat getCurrencyFormat() {
56         return getCurrencyFormat(ULocale.getDefault(Category.FORMAT));
57     }
58 }