KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibm > icu > text > MeasureFormat


1 /*
2 **********************************************************************
3 * Copyright (c) 2004-2006, 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
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      * Return a formatter for CurrencyAmount objects in the given
38      * locale.
39      * @param locale desired locale
40      * @return a formatter object
41      * @stable ICU 3.0
42      */

43     public static MeasureFormat getCurrencyFormat(ULocale locale) {
44         return new CurrencyFormat(locale);
45     }
46
47     /**
48      * Return a formatter for CurrencyAmount objects in the default
49      * locale.
50      * @return a formatter object
51      * @stable ICU 3.0
52      */

53     public static MeasureFormat getCurrencyFormat() {
54         return getCurrencyFormat(ULocale.getDefault());
55     }
56 }
57
Popular Tags