1 // 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html#License 3 /* 4 ******************************************************************************* 5 * Copyright (C) 2003-2012, International Business Machines Corporation and * 6 * others. All Rights Reserved. * 7 ******************************************************************************* 8 */ 9 package com.ibm.icu.text; 10 11 import java.text.Format; 12 13 /** 14 * An abstract class that extends {@link java.text.Format} to provide 15 * additional ICU protocol, specifically, the <tt>getLocale()</tt> 16 * API. All ICU format classes are subclasses of this class. 17 * 18 * @see com.ibm.icu.util.ULocale 19 * @author weiv 20 * @author Alan Liu 21 * @draft ICU 2.8 (retain) 22 * @provisional This API might change or be removed in a future release. 23 */ 24 public abstract class UFormat extends Format { 25 private static final long serialVersionUID = 1L; 26 27 /** 28 * @draft ICU 2.8 (retain) 29 * @provisional This API might change or be removed in a future release. 30 */ 31 public UFormat() {} 32 33 // /** 34 // * Return the locale that was used to create this object, or null. 35 // * This may may differ from the locale requested at the time of 36 // * this object's creation. For example, if an object is created 37 // * for locale <tt>en_US_CALIFORNIA</tt>, the actual data may be 38 // * drawn from <tt>en</tt> (the <i>actual</i> locale), and 39 // * <tt>en_US</tt> may be the most specific locale that exists (the 40 // * <i>valid</i> locale). 41 // * 42 // * <p>Note: This method will be implemented in ICU 3.0; ICU 2.8 43 // * contains a partial preview implementation. The <i>actual</i> 44 // * locale is returned correctly, but the <i>valid</i> locale is 45 // * not, in most cases. 46 // * @param type type of information requested, either {@link 47 // * com.ibm.icu.util.ULocale#VALID_LOCALE} or {@link 48 // * com.ibm.icu.util.ULocale#ACTUAL_LOCALE}. 49 // * @return the information specified by <i>type</i>, or null if 50 // * this object was not constructed from locale data. 51 // * @see com.ibm.icu.util.ULocale 52 // * @see com.ibm.icu.util.ULocale#VALID_LOCALE 53 // * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE 54 // * @draft ICU 2.8 (retain) 55 // * @provisional This API might change or be removed in a future release. 56 // */ 57 // public final ULocale getLocale(ULocale.Type type) { 58 // throw new UnsupportedOperationException("Method not supported by com.ibm.icu.base"); 59 // } 60 61 // /** 62 // * Set information about the locales that were used to create this 63 // * object. If the object was not constructed from locale data, 64 // * both arguments should be set to null. Otherwise, neither 65 // * should be null. The actual locale must be at the same level or 66 // * less specific than the valid locale. This method is intended 67 // * for use by factories or other entities that create objects of 68 // * this class. 69 // * @param valid the most specific locale containing any resource 70 // * data, or null 71 // * @param actual the locale containing data used to construct this 72 // * object, or null 73 // * @see com.ibm.icu.util.ULocale 74 // * @see com.ibm.icu.util.ULocale#VALID_LOCALE 75 // * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE 76 // */ 77 // final void setLocale(ULocale valid, ULocale actual) { 78 // throw new UnsupportedOperationException("Method not supported by com.ibm.icu.base"); 79 // } 80 } 81