2 **********************************************************************
3 * Copyright (c) 2004-2011, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
7 * Created: April 20, 2004
9 **********************************************************************
11 package com.ibm.icu.text;
13 import com.ibm.icu.util.ULocale;
14 import com.ibm.icu.util.ULocale.Category;
17 * A formatter for Measure objects. This is an abstract base class.
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.
23 * @see com.ibm.icu.text.UFormat
27 public abstract class MeasureFormat extends UFormat {
28 // Generated by serialver from JDK 1.4.1_01
29 static final long serialVersionUID = -7182021401701778240L;
33 * @deprecated This API is ICU internal only.
35 protected MeasureFormat() {}
38 * Return a formatter for CurrencyAmount objects in the given
40 * @param locale desired locale
41 * @return a formatter object
44 public static MeasureFormat getCurrencyFormat(ULocale locale) {
45 return new CurrencyFormat(locale);
49 * Return a formatter for CurrencyAmount objects in the default
50 * <code>FORMAT</code> locale.
51 * @return a formatter object
52 * @see Category#FORMAT
55 public static MeasureFormat getCurrencyFormat() {
56 return getCurrencyFormat(ULocale.getDefault(Category.FORMAT));