ICU-2202 added getLocale API placeholders
X-SVN-Rev: 13735
This commit is contained in:
parent
8ad2aed362
commit
559a173afc
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/BreakIterator.java,v $
|
||||
* $Date: 2003/06/04 20:24:14 $
|
||||
* $Revision: 1.23 $
|
||||
* $Date: 2003/11/14 23:45:01 $
|
||||
* $Revision: 1.24 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -16,6 +16,7 @@ import java.lang.ref.SoftReference;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
import java.util.Locale;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
|
||||
/**
|
||||
@ -409,6 +410,15 @@ public abstract class BreakIterator implements Cloneable
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public abstract void setText(CharacterIterator newText);
|
||||
|
||||
/** Get the locale for this break iterator object. You can choose between valid and actual locale.
|
||||
* @param type type of the locale we're looking for (valid or actual)
|
||||
* @return the locale
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public ULocale getLocale(ULocale.ULocaleDataType type) {
|
||||
return new ULocale("");
|
||||
}
|
||||
|
||||
/** @draft ICU 2.4 */
|
||||
public static final int KIND_CHARACTER = 0;
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Collator.java,v $
|
||||
* $Date: 2003/09/22 06:24:18 $
|
||||
* $Revision: 1.34 $
|
||||
* $Date: 2003/11/14 23:45:01 $
|
||||
* $Revision: 1.35 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -18,6 +18,7 @@ import java.util.Set;
|
||||
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* <p>Collator performs locale-sensitive string comparison. A concrete
|
||||
@ -726,6 +727,14 @@ public abstract class Collator implements Comparator, Cloneable
|
||||
*/
|
||||
public abstract void setVariableTop(int varTop);
|
||||
|
||||
/** Get the locale for this collator object. You can choose between valid and actual locale.
|
||||
* @param type type of the locale we're looking for (valid or actual)
|
||||
* @return the locale
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public ULocale getLocale(ULocale.ULocaleDataType type) {
|
||||
return new ULocale("");
|
||||
}
|
||||
// protected constructor -------------------------------------------------
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,10 @@ package com.ibm.icu.text;
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.text.UFormat;
|
||||
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
@ -104,7 +105,7 @@ import java.util.MissingResourceException;
|
||||
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public abstract class DateFormat extends Format {
|
||||
public abstract class DateFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* The calendar that <code>DateFormat</code> uses to produce the time field
|
||||
@ -729,6 +730,15 @@ public abstract class DateFormat extends Format {
|
||||
return calendar.isLenient();
|
||||
}
|
||||
|
||||
/** Get the locale for this date format object. You can choose between valid and actual locale.
|
||||
* @param type type of the locale we're looking for (valid or actual)
|
||||
* @return the locale
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public ULocale getLocale(ULocale.ULocaleDataType type) {
|
||||
return new ULocale("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides hashCode
|
||||
* @stable ICU 2.0
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/NumberFormat.java,v $
|
||||
* $Date: 2003/09/18 21:03:14 $
|
||||
* $Revision: 1.30 $
|
||||
* $Date: 2003/11/14 23:45:01 $
|
||||
* $Revision: 1.31 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -18,7 +18,6 @@ import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Collections;
|
||||
@ -29,6 +28,8 @@ import java.util.Set;
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.text.UFormat;
|
||||
|
||||
/**
|
||||
* <code>NumberFormat</code> is the abstract base class for all number
|
||||
@ -155,7 +156,7 @@ import com.ibm.icu.util.Currency;
|
||||
* @author Alan Liu
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public abstract class NumberFormat extends Format {
|
||||
public abstract class NumberFormat extends UFormat {
|
||||
|
||||
// Constants used by factory methods to specify a style of format.
|
||||
private static final int NUMBERSTYLE = 0;
|
||||
@ -916,6 +917,15 @@ public abstract class NumberFormat extends Format {
|
||||
return currency;
|
||||
}
|
||||
|
||||
/** Get the locale for this date format object. You can choose between valid and actual locale.
|
||||
* @param type type of the locale we're looking for (valid or actual)
|
||||
* @return the locale
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public ULocale getLocale(ULocale.ULocaleDataType type) {
|
||||
return new ULocale("");
|
||||
}
|
||||
|
||||
// =======================privates===============================
|
||||
|
||||
// Hook for service
|
||||
|
22
icu4j/src/com/ibm/icu/text/UFormat.java
Normal file
22
icu4j/src/com/ibm/icu/text/UFormat.java
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Created on Nov 11, 2003
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - Java - Code Generation - Code and Comments
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.text.Format;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* @author weiv
|
||||
*
|
||||
* To change the template for this generated type comment go to
|
||||
* Window - Preferences - Java - Code Generation - Code and Comments
|
||||
*/
|
||||
public abstract class UFormat extends Format {
|
||||
|
||||
public abstract ULocale getLocale(ULocale.ULocaleDataType type);
|
||||
|
||||
}
|
@ -3597,6 +3597,15 @@ public abstract class Calendar implements Serializable, Cloneable {
|
||||
// End of weekend support
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** Get the locale for this calendar object. You can choose between valid and actual locale.
|
||||
* @param type type of the locale we're looking for (valid or actual)
|
||||
* @return the locale
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public ULocale getLocale(ULocale.ULocaleDataType type) {
|
||||
return new ULocale("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides Cloneable
|
||||
* @stable ICU 2.0
|
||||
|
50
icu4j/src/com/ibm/icu/util/ULocale.java
Normal file
50
icu4j/src/com/ibm/icu/util/ULocale.java
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Created on Nov 11, 2003
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - Java - Code Generation - Code and Comments
|
||||
*/
|
||||
package com.ibm.icu.util;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @author weiv
|
||||
*
|
||||
* To change the template for this generated type comment go to
|
||||
* Window - Preferences - Java - Code Generation - Code and Comments
|
||||
*/
|
||||
public class ULocale {
|
||||
public static final class ULocaleDataType{
|
||||
/**
|
||||
* Actual locale where data is coming from
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public static final ULocaleDataType ACTUAL_LOCALE = new ULocaleDataType(0);
|
||||
|
||||
/**
|
||||
* Valid locale for an object
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public static final ULocaleDataType VALID_LOCALE = new ULocaleDataType(1);
|
||||
|
||||
private int localeType;
|
||||
private ULocaleDataType(int id){
|
||||
localeType = id;
|
||||
}
|
||||
private boolean equals(int id){
|
||||
return localeType == id;
|
||||
}
|
||||
}
|
||||
|
||||
private Locale locale;
|
||||
public Locale toLocale() {
|
||||
return locale;
|
||||
}
|
||||
public ULocale(Locale loc) {
|
||||
locale = loc;
|
||||
}
|
||||
public ULocale(String locName) {
|
||||
locale = new Locale(locName);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user