ICU-6787 Updated API status comments for 4.2. Misc doc changes.
X-SVN-Rev: 25590
This commit is contained in:
parent
3dc8afe743
commit
9dad40f1d6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -376,7 +376,6 @@ icu4j/src/com/ibm/icu/dev/tool/tzu/icu.gif -text
|
||||
icu4j/src/com/ibm/icu/impl/PVecToTrieCompactHandler.java -text
|
||||
icu4j/src/com/ibm/icu/impl/PropsVectors.java -text
|
||||
icu4j/src/com/ibm/icu/impl/data/icudata.jar -text
|
||||
icu4j/src/com/ibm/icu/text/CurrencyPluralInfo.java -text
|
||||
icu4j/src/com/ibm/icu/text/NumberingSystem.java -text
|
||||
icu4j/src/com/ibm/richtext/textapps/resources/unicode.arabic.red -text
|
||||
icu4j/src/com/ibm/richtext/textapps/resources/unicode.hebrew.red -text
|
||||
|
@ -29,73 +29,61 @@ import java.nio.charset.CoderResult;
|
||||
* In the future we will provide set methods on CharsetEncoder and CharsetDecoder
|
||||
* that will accept CharsetCallback fields.
|
||||
*
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
|
||||
public class CharsetCallback {
|
||||
/**
|
||||
/*
|
||||
* FROM_U, TO_U context options for sub callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String SUB_STOP_ON_ILLEGAL = "i";
|
||||
private static final String SUB_STOP_ON_ILLEGAL = "i";
|
||||
|
||||
/**
|
||||
* FROM_U, TO_U context options for skip callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String SKIP_STOP_ON_ILLEGAL = "i";
|
||||
// /*
|
||||
// * FROM_U, TO_U context options for skip callback
|
||||
// */
|
||||
// private static final String SKIP_STOP_ON_ILLEGAL = "i";
|
||||
|
||||
/**
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to ICU (%UXXXX)
|
||||
* @draft ICU 3.6
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_ICU = null;
|
||||
/**
|
||||
// /*
|
||||
// * FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to ICU (%UXXXX)
|
||||
// */
|
||||
// private static final String ESCAPE_ICU = null;
|
||||
|
||||
/*
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to JAVA (\\uXXXX)
|
||||
* @draft ICU 3.6
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_JAVA = "J";
|
||||
/**
|
||||
private static final String ESCAPE_JAVA = "J";
|
||||
|
||||
/*
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to C (\\uXXXX \\UXXXXXXXX)
|
||||
* TO_U_CALLBACK_ESCAPE option to escape the character value accoding to C (\\xXXXX)
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_C = "C";
|
||||
/**
|
||||
private static final String ESCAPE_C = "C";
|
||||
|
||||
/*
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to XML Decimal escape \htmlonly(&#DDDD;)\endhtmlonly
|
||||
* TO_U_CALLBACK_ESCAPE context option to escape the character value accoding to XML Decimal escape \htmlonly(&#DDDD;)\endhtmlonly
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_XML_DEC = "D";
|
||||
/**
|
||||
private static final String ESCAPE_XML_DEC = "D";
|
||||
|
||||
/*
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to XML Hex escape \htmlonly(&#xXXXX;)\endhtmlonly
|
||||
* TO_U_CALLBACK_ESCAPE context option to escape the character value according to XML Hex escape \htmlonly(&#xXXXX;)\endhtmlonly
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_XML_HEX = "X";
|
||||
/**
|
||||
private static final String ESCAPE_XML_HEX = "X";
|
||||
|
||||
/*
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to Unicode (U+XXXXX)
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_UNICODE = "U";
|
||||
/**
|
||||
private static final String ESCAPE_UNICODE = "U";
|
||||
|
||||
/*
|
||||
* FROM_U_CALLBACK_ESCAPE context option to escape the code unit according to Unicode (U+XXXXX)
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
/*public*/ static final String ESCAPE_CSS2 = "S";
|
||||
private static final String ESCAPE_CSS2 = "S";
|
||||
|
||||
/**
|
||||
* Decoder Callback interface
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public interface Decoder {
|
||||
/**
|
||||
@ -104,8 +92,7 @@ public class CharsetCallback {
|
||||
*
|
||||
* @return Result of decoding action. This returned object is set to an error
|
||||
* if this function could not handle the conversion.
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public CoderResult call(CharsetDecoderICU decoder, Object context,
|
||||
ByteBuffer source, CharBuffer target, IntBuffer offsets,
|
||||
@ -113,8 +100,7 @@ public class CharsetCallback {
|
||||
}
|
||||
/**
|
||||
* Encoder Callback interface
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public interface Encoder {
|
||||
/**
|
||||
@ -122,8 +108,7 @@ public class CharsetCallback {
|
||||
* and this function is meant to handle or fix the error if possible.
|
||||
* @return Result of decoding action. This returned object is set to an error
|
||||
* if this function could not handle the conversion.
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public CoderResult call(CharsetEncoderICU encoder, Object context,
|
||||
CharBuffer source, ByteBuffer target, IntBuffer offsets,
|
||||
@ -131,8 +116,7 @@ public class CharsetCallback {
|
||||
}
|
||||
/**
|
||||
* Skip callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public static final Encoder FROM_U_CALLBACK_SKIP = new Encoder() {
|
||||
public CoderResult call(CharsetEncoderICU encoder, Object context,
|
||||
@ -152,8 +136,7 @@ public class CharsetCallback {
|
||||
};
|
||||
/**
|
||||
* Skip callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public static final Decoder TO_U_CALLBACK_SKIP = new Decoder() {
|
||||
public CoderResult call(CharsetDecoderICU decoder, Object context,
|
||||
@ -173,8 +156,7 @@ public class CharsetCallback {
|
||||
};
|
||||
/**
|
||||
* Write substitute callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public static final Encoder FROM_U_CALLBACK_SUBSTITUTE = new Encoder(){
|
||||
public CoderResult call(CharsetEncoderICU encoder, Object context,
|
||||
@ -196,8 +178,7 @@ public class CharsetCallback {
|
||||
private static final char[] kSubstituteChar = new char[] {0xFFFD};
|
||||
/**
|
||||
* Write substitute callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public static final Decoder TO_U_CALLBACK_SUBSTITUTE = new Decoder() {
|
||||
public CoderResult call(CharsetDecoderICU decoder, Object context,
|
||||
@ -215,8 +196,7 @@ public class CharsetCallback {
|
||||
};
|
||||
/**
|
||||
* Stop callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public static final Encoder FROM_U_CALLBACK_STOP = new Encoder() {
|
||||
public CoderResult call(CharsetEncoderICU encoder, Object context,
|
||||
@ -227,8 +207,7 @@ public class CharsetCallback {
|
||||
};
|
||||
/**
|
||||
* Stop callback
|
||||
* @draft ICU 3.6
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.6
|
||||
*/
|
||||
public static final Decoder TO_U_CALLBACK_STOP = new Decoder() {
|
||||
public CoderResult call(CharsetDecoderICU decoder, Object context,
|
||||
@ -253,8 +232,7 @@ public class CharsetCallback {
|
||||
private static final char UNICODE_SPACE_CODEPOINT = 0x0020;
|
||||
/**
|
||||
* Write escape callback
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final Encoder FROM_U_CALLBACK_ESCAPE = new Encoder() {
|
||||
public CoderResult call(CharsetEncoderICU encoder, Object context,
|
||||
@ -339,8 +317,7 @@ public class CharsetCallback {
|
||||
};
|
||||
/**
|
||||
* Write escape callback
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final Decoder TO_U_CALLBACK_ESCAPE = new Decoder() {
|
||||
public CoderResult call(CharsetDecoderICU decoder, Object context,
|
||||
@ -397,8 +374,6 @@ public class CharsetCallback {
|
||||
* Java port of uprv_itou() in ICU4C used by TO_U_CALLBACK_ESCAPE and FROM_U_CALLBACK_ESCAPE.
|
||||
* Fills in a char string with the radix-based representation of a number padded with zeroes
|
||||
* to minwidth.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
private static final int itou(char[] buffer, int sourceIndex, int i, int radix, int minwidth) {
|
||||
int length = 0;
|
||||
|
@ -153,8 +153,7 @@ public abstract class CharsetDecoderICU extends CharsetDecoder{
|
||||
* @param err CoderResult
|
||||
* @param newCallback CharsetCallback.Encoder
|
||||
* @param newContext Object
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final void setToUCallback(CoderResult err, CharsetCallback.Decoder newCallback, Object newContext) {
|
||||
if (err.isMalformed()) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 2006-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
@ -160,15 +160,14 @@ public abstract class CharsetEncoderICU extends CharsetEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the callback encoder method and context to be used if an illegal sequence is encounterd.
|
||||
* Sets the callback encoder method and context to be used if an illegal sequence is encountered.
|
||||
* You would normally call this twice to set both the malform and unmappable error. In this case,
|
||||
* newContext should remain the same since using a different newContext each time will negate the last
|
||||
* one used.
|
||||
* @param err CoderResult
|
||||
* @param newCallback CharsetCallback.Encoder
|
||||
* @param newContext Object
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final void setFromUCallback(CoderResult err, CharsetCallback.Encoder newCallback, Object newContext) {
|
||||
if (err.isMalformed()) {
|
||||
@ -189,8 +188,7 @@ public abstract class CharsetEncoderICU extends CharsetEncoder {
|
||||
*
|
||||
* @param newContext Object
|
||||
* @exception IllegalArgumentException
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final void setFromUContext(Object newContext) {
|
||||
fromUContext = newContext;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 2006-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
@ -62,8 +62,7 @@ public abstract class CharsetICU extends Charset{
|
||||
// typedef enum UConverterUnicodeSet {
|
||||
/**
|
||||
* Parameter that select the set of roundtrippable Unicode code points.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int ROUNDTRIP_SET=0;
|
||||
/**
|
||||
@ -348,8 +347,7 @@ public abstract class CharsetICU extends Charset{
|
||||
* the converter's specific set is filled in.
|
||||
* @param which A selector; currently ROUNDTRIP_SET is the only supported value.
|
||||
* @throws IllegalArgumentException if the parameters does not match.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public void getUnicodeSet(UnicodeSet setFillIn, int which){
|
||||
if( setFillIn == null || which != ROUNDTRIP_SET ){
|
||||
|
@ -36,6 +36,7 @@ import com.ibm.icu.text.UnicodeSet;
|
||||
* convert the CharSequence.
|
||||
*
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public final class CharsetSelector {
|
||||
private IntTrie trie;
|
||||
@ -161,6 +162,7 @@ public final class CharsetSelector {
|
||||
* If no support for the named charset is available in this
|
||||
* instance of the Java virtual machine.
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public CharsetSelector(List charsetList, UnicodeSet excludedCodePoints,
|
||||
int mappingTypes) {
|
||||
@ -199,6 +201,7 @@ public final class CharsetSelector {
|
||||
* supplied when building the selector.
|
||||
*
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public List selectForString(CharSequence unicodeText) {
|
||||
int columns = (encodings.length + 31) / 32;
|
||||
|
@ -847,104 +847,87 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
public static final int COUNTING_ROD_NUMERALS_ID = 154; /*[1D360]*/
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int SUNDANESE_ID = 155; /* [1B80] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int LEPCHA_ID = 156; /* [1C00] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int OL_CHIKI_ID = 157; /* [1C50] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int CYRILLIC_EXTENDED_A_ID = 158; /* [2DE0] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int VAI_ID = 159; /* [A500] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int CYRILLIC_EXTENDED_B_ID = 160; /* [A640] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int SAURASHTRA_ID = 161; /* [A880] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int KAYAH_LI_ID = 162; /* [A900] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int REJANG_ID = 163; /* [A930] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int CHAM_ID = 164; /* [AA00] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int ANCIENT_SYMBOLS_ID = 165; /* [10190] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int PHAISTOS_DISC_ID = 166; /* [101D0] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int LYCIAN_ID = 167; /* [10280] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int CARIAN_ID = 168; /* [102A0] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int LYDIAN_ID = 169; /* [10920] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int MAHJONG_TILES_ID = 170; /* [1F000] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int DOMINO_TILES_ID = 171; /* [1F030] */
|
||||
|
||||
@ -1760,104 +1743,87 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
public static final UnicodeBlock COUNTING_ROD_NUMERALS = new UnicodeBlock("COUNTING_ROD_NUMERALS", COUNTING_ROD_NUMERALS_ID); /*[1D360]*/
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock SUNDANESE = new UnicodeBlock("SUNDANESE", SUNDANESE_ID); /* [1B80] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock LEPCHA = new UnicodeBlock("LEPCHA", LEPCHA_ID); /* [1C00] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock OL_CHIKI = new UnicodeBlock("OL_CHIKI", OL_CHIKI_ID); /* [1C50] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock CYRILLIC_EXTENDED_A = new UnicodeBlock("CYRILLIC_EXTENDED_A", CYRILLIC_EXTENDED_A_ID); /* [2DE0] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock VAI = new UnicodeBlock("VAI", VAI_ID); /* [A500] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock CYRILLIC_EXTENDED_B = new UnicodeBlock("CYRILLIC_EXTENDED_B", CYRILLIC_EXTENDED_B_ID); /* [A640] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock SAURASHTRA = new UnicodeBlock("SAURASHTRA", SAURASHTRA_ID); /* [A880] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock KAYAH_LI = new UnicodeBlock("KAYAH_LI", KAYAH_LI_ID); /* [A900] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock REJANG = new UnicodeBlock("REJANG", REJANG_ID); /* [A930] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock CHAM = new UnicodeBlock("CHAM", CHAM_ID); /* [AA00] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock ANCIENT_SYMBOLS = new UnicodeBlock("ANCIENT_SYMBOLS", ANCIENT_SYMBOLS_ID); /* [10190] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock PHAISTOS_DISC = new UnicodeBlock("PHAISTOS_DISC", PHAISTOS_DISC_ID); /* [101D0] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock LYCIAN = new UnicodeBlock("LYCIAN", LYCIAN_ID); /* [10280] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock CARIAN = new UnicodeBlock("CARIAN", CARIAN_ID); /* [102A0] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock LYDIAN = new UnicodeBlock("LYDIAN", LYDIAN_ID); /* [10920] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock MAHJONG_TILES = new UnicodeBlock("MAHJONG_TILES", MAHJONG_TILES_ID); /* [1F000] */
|
||||
|
||||
/**
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final UnicodeBlock DOMINO_TILES = new UnicodeBlock("DOMINO_TILES", DOMINO_TILES_ID); /* [1F030] */
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2008 International Business Machines Corporation and *
|
||||
* Copyright (C) 2001-2009 International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -637,99 +637,85 @@ public final class UScript {
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int IMPERIAL_ARAMAIC = 116;/* Armi */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int AVESTAN = 117;/* Avst */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int CHAKMA = 118;/* Cakm */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int KOREAN = 119;/* Kore */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int KAITHI = 120;/* Kthi */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int MANICHAEAN = 121;/* Mani */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int INSCRIPTIONAL_PAHLAVI = 122;/* Phli */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int PSALTER_PAHLAVI = 123;/* Phlp */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int BOOK_PAHLAVI = 124;/* Phlv */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int INSCRIPTIONAL_PARTHIAN = 125;/* Prti */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int SAMARITAN = 126;/* Samr */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int TAI_VIET = 127;/* Tavt */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int MATHEMATICAL_NOTATION = 128;/* Zmth */
|
||||
|
||||
/**
|
||||
* ISO 15924 script code
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int SYMBOLS = 129;/* Zsym */
|
||||
/**
|
||||
|
@ -156,8 +156,7 @@ import com.ibm.icu.lang.UCharacterDirection;
|
||||
*
|
||||
*
|
||||
* @author Simon Montagu, Matitiahu Allouche (ported from C code written by Markus W. Scherer)
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*
|
||||
*
|
||||
* <h4> Sample code for the ICU Bidi API </h4>
|
||||
@ -470,8 +469,7 @@ public class Bidi {
|
||||
* the original source text).
|
||||
* @see #REORDER_INVERSE_LIKE_DIRECT
|
||||
* @see #REORDER_INVERSE_FOR_NUMBERS_SPECIAL
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte LEVEL_DEFAULT_LTR = (byte)0x7e;
|
||||
|
||||
@ -498,24 +496,21 @@ public class Bidi {
|
||||
* the original source text).
|
||||
* @see #REORDER_INVERSE_LIKE_DIRECT
|
||||
* @see #REORDER_INVERSE_FOR_NUMBERS_SPECIAL
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte LEVEL_DEFAULT_RTL = (byte)0x7f;
|
||||
|
||||
/**
|
||||
* Maximum explicit embedding level.
|
||||
* (The maximum resolved level can be up to <code>MAX_EXPLICIT_LEVEL+1</code>).
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte MAX_EXPLICIT_LEVEL = 61;
|
||||
|
||||
/**
|
||||
* Bit flag for level input.
|
||||
* Overrides directional properties.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte LEVEL_OVERRIDE = (byte)0x80;
|
||||
|
||||
@ -533,27 +528,25 @@ public class Bidi {
|
||||
* @see #getLogicalMap
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #OPTION_REMOVE_CONTROLS
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int MAP_NOWHERE = -1;
|
||||
|
||||
/**
|
||||
* All left-to-right text.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte LTR = 0;
|
||||
|
||||
/**
|
||||
* All right-to-left text.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte RTL = 1;
|
||||
|
||||
/**
|
||||
* Mixed-directional text.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final byte MIXED = 2;
|
||||
|
||||
@ -562,8 +555,7 @@ public class Bidi {
|
||||
* keep combining characters after their base characters in RTL runs
|
||||
*
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short KEEP_BASE_COMBINING = 1;
|
||||
|
||||
@ -573,8 +565,7 @@ public class Bidi {
|
||||
* by their mirror-image mappings
|
||||
*
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short DO_MIRRORING = 2;
|
||||
|
||||
@ -588,8 +579,7 @@ public class Bidi {
|
||||
*
|
||||
* @see #setInverse
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short INSERT_LRM_FOR_NUMERIC = 4;
|
||||
|
||||
@ -603,8 +593,7 @@ public class Bidi {
|
||||
*
|
||||
* @see #writeReordered
|
||||
* @see #INSERT_LRM_FOR_NUMERIC
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REMOVE_BIDI_CONTROLS = 8;
|
||||
|
||||
@ -620,31 +609,27 @@ public class Bidi {
|
||||
* is designed for RTL scripts and stores text in reverse order.</p>
|
||||
*
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short OUTPUT_REVERSE = 16;
|
||||
|
||||
/** Reordering mode: Regular Logical to Visual Bidi algorithm according to Unicode.
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_DEFAULT = 0;
|
||||
|
||||
/** Reordering mode: Logical to Visual algorithm which handles numbers in
|
||||
* a way which mimicks the behavior of Windows XP.
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_NUMBERS_SPECIAL = 1;
|
||||
|
||||
/** Reordering mode: Logical to Visual algorithm grouping numbers with
|
||||
* adjacent R characters (reversible algorithm).
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_GROUP_NUMBERS_WITH_R = 2;
|
||||
|
||||
@ -656,8 +641,7 @@ public class Bidi {
|
||||
* minimum combination which has the required display.
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_RUNS_ONLY = 3;
|
||||
|
||||
@ -665,24 +649,21 @@ public class Bidi {
|
||||
* like L (same algorithm as selected by <code>setInverse(true)</code>.
|
||||
* @see #setInverse
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_INVERSE_NUMBERS_AS_L = 4;
|
||||
|
||||
/** Reordering mode: Visual to Logical algorithm equivalent to the regular
|
||||
* Logical to Visual algorithm.
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_INVERSE_LIKE_DIRECT = 5;
|
||||
|
||||
/** Reordering mode: Inverse Bidi (Visual to Logical) algorithm for the
|
||||
* <code>REORDER_NUMBERS_SPECIAL</code> Bidi algorithm.
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final short REORDER_INVERSE_FOR_NUMBERS_SPECIAL = 6;
|
||||
|
||||
@ -699,8 +680,7 @@ public class Bidi {
|
||||
* Option value for <code>setReorderingOptions</code>:
|
||||
* disable all the options which can be set with this method
|
||||
* @see #setReorderingOptions
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int OPTION_DEFAULT = 0;
|
||||
|
||||
@ -754,8 +734,7 @@ public class Bidi {
|
||||
* @see #REORDER_INVERSE_NUMBERS_AS_L
|
||||
* @see #REORDER_INVERSE_LIKE_DIRECT
|
||||
* @see #REORDER_INVERSE_FOR_NUMBERS_SPECIAL
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int OPTION_INSERT_MARKS = 1;
|
||||
|
||||
@ -777,8 +756,7 @@ public class Bidi {
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #INSERT_LRM_FOR_NUMERIC
|
||||
* @see #REMOVE_BIDI_CONTROLS
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int OPTION_REMOVE_CONTROLS = 2;
|
||||
|
||||
@ -827,8 +805,7 @@ public class Bidi {
|
||||
* @see #setReorderingOptions
|
||||
* @see #getProcessedLength
|
||||
* @see #orderParagraphsLTR
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int OPTION_STREAMING = 4;
|
||||
|
||||
@ -863,8 +840,7 @@ public class Bidi {
|
||||
* Value returned by <code>BidiClassifier</code> when there is no need to
|
||||
* override the standard Bidi class for a given code point.
|
||||
* @see BidiClassifier
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int CLASS_DEFAULT = UCharacterDirection
|
||||
.CHAR_DIRECTION_COUNT;
|
||||
@ -1128,8 +1104,7 @@ public class Bidi {
|
||||
* <code>setPara()</code> and <code>setLine()</code> will allocate
|
||||
* additional memory for internal structures as necessary.
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi()
|
||||
{
|
||||
@ -1164,8 +1139,7 @@ public class Bidi {
|
||||
* 1 and <code>maxLength</code>. It is typically small.
|
||||
*
|
||||
* @throws IllegalArgumentException if maxLength or maxRunCount is less than 0
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi(int maxLength, int maxRunCount)
|
||||
{
|
||||
@ -1352,8 +1326,7 @@ public class Bidi {
|
||||
* @see #setReorderingMode
|
||||
* @see #REORDER_INVERSE_NUMBERS_AS_L
|
||||
* @see #REORDER_DEFAULT
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setInverse(boolean isInverse) {
|
||||
this.isInverse = (isInverse);
|
||||
@ -1376,8 +1349,7 @@ public class Bidi {
|
||||
* @see #setInverse
|
||||
* @see #setReorderingMode
|
||||
* @see #REORDER_INVERSE_NUMBERS_AS_L
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isInverse() {
|
||||
return isInverse;
|
||||
@ -1543,8 +1515,7 @@ public class Bidi {
|
||||
* @see #REORDER_INVERSE_NUMBERS_AS_L
|
||||
* @see #REORDER_INVERSE_LIKE_DIRECT
|
||||
* @see #REORDER_INVERSE_FOR_NUMBERS_SPECIAL
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setReorderingMode(int reorderingMode) {
|
||||
if ((reorderingMode < REORDER_DEFAULT) ||
|
||||
@ -1561,8 +1532,7 @@ public class Bidi {
|
||||
* @return the current reordering mode of the Bidi object
|
||||
*
|
||||
* @see #setReorderingMode
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getReorderingMode() {
|
||||
return this.reorderingMode;
|
||||
@ -1582,8 +1552,7 @@ public class Bidi {
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #OPTION_REMOVE_CONTROLS
|
||||
* @see #OPTION_STREAMING
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setReorderingOptions(int options) {
|
||||
if ((options & OPTION_REMOVE_CONTROLS) != 0) {
|
||||
@ -1599,8 +1568,7 @@ public class Bidi {
|
||||
* @return the current reordering options of the Bidi object
|
||||
*
|
||||
* @see #setReorderingOptions
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getReorderingOptions() {
|
||||
return this.reorderingOptions;
|
||||
@ -2980,8 +2948,7 @@ public class Bidi {
|
||||
* @see #LEVEL_DEFAULT_RTL
|
||||
* @see #LEVEL_OVERRIDE
|
||||
* @see #MAX_EXPLICIT_LEVEL
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setPara(String text, byte paraLevel, byte[] embeddingLevels)
|
||||
{
|
||||
@ -3065,8 +3032,7 @@ public class Bidi {
|
||||
* @see #LEVEL_DEFAULT_RTL
|
||||
* @see #LEVEL_OVERRIDE
|
||||
* @see #MAX_EXPLICIT_LEVEL
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setPara(char[] chars, byte paraLevel, byte[] embeddingLevels)
|
||||
{
|
||||
@ -3386,8 +3352,7 @@ public class Bidi {
|
||||
*
|
||||
* @param paragraph a paragraph of text with optional character and
|
||||
* paragraph attribute information
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setPara(AttributedCharacterIterator paragraph)
|
||||
{
|
||||
@ -3452,8 +3417,7 @@ public class Bidi {
|
||||
* receive level 0, so that successive paragraphs progress from left to right.
|
||||
*
|
||||
* @see #setPara
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void orderParagraphsLTR(boolean ordarParaLTR) {
|
||||
orderParagraphsLTR = ordarParaLTR;
|
||||
@ -3467,8 +3431,7 @@ public class Bidi {
|
||||
* allocate level 0 to block separators.
|
||||
*
|
||||
* @see #orderParagraphsLTR
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isOrderParagraphsLTR() {
|
||||
return orderParagraphsLTR;
|
||||
@ -3488,8 +3451,7 @@ public class Bidi {
|
||||
* @see #LTR
|
||||
* @see #RTL
|
||||
* @see #MIXED
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public byte getDirection()
|
||||
{
|
||||
@ -3508,8 +3470,7 @@ public class Bidi {
|
||||
*
|
||||
* @see #setPara
|
||||
* @see #setLine
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public String getTextAsString()
|
||||
{
|
||||
@ -3528,8 +3489,7 @@ public class Bidi {
|
||||
*
|
||||
* @see #setPara
|
||||
* @see #setLine
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public char[] getText()
|
||||
{
|
||||
@ -3545,8 +3505,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getLength()
|
||||
{
|
||||
@ -3592,8 +3551,7 @@ public class Bidi {
|
||||
*
|
||||
* @see #setPara
|
||||
* @see #OPTION_STREAMING
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getProcessedLength() {
|
||||
verifyValidParaOrLine();
|
||||
@ -3627,8 +3585,7 @@ public class Bidi {
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #OPTION_REMOVE_CONTROLS
|
||||
* @see #REORDER_INVERSE_NUMBERS_AS_L
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getResultLength() {
|
||||
verifyValidParaOrLine();
|
||||
@ -3652,8 +3609,7 @@ public class Bidi {
|
||||
* @see #LEVEL_DEFAULT_RTL
|
||||
* @see #getParagraph
|
||||
* @see #getParagraphByIndex
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public byte getParaLevel()
|
||||
{
|
||||
@ -3668,8 +3624,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int countParagraphs()
|
||||
{
|
||||
@ -3697,8 +3652,7 @@ public class Bidi {
|
||||
* <code>[0..countParagraphs()-1]</code>
|
||||
*
|
||||
* @see com.ibm.icu.text.BidiRun
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public BidiRun getParagraphByIndex(int paraIndex)
|
||||
{
|
||||
@ -3741,8 +3695,7 @@ public class Bidi {
|
||||
* @see com.ibm.icu.text.BidiRun
|
||||
* @see #getParagraphByIndex
|
||||
* @see #getProcessedLength
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public BidiRun getParagraph(int charIndex)
|
||||
{
|
||||
@ -3770,8 +3723,7 @@ public class Bidi {
|
||||
*
|
||||
* @see com.ibm.icu.text.BidiRun
|
||||
* @see #getProcessedLength
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getParagraphIndex(int charIndex)
|
||||
{
|
||||
@ -3791,8 +3743,7 @@ public class Bidi {
|
||||
* @param classifier A new custom classifier. This can be null.
|
||||
*
|
||||
* @see #getCustomClassifier
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setCustomClassifier(BidiClassifier classifier) {
|
||||
this.customClassifier = classifier;
|
||||
@ -3805,8 +3756,7 @@ public class Bidi {
|
||||
* @return An instance of class <code>BidiClassifier</code>
|
||||
*
|
||||
* @see #setCustomClassifier
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public BidiClassifier getCustomClassifier() {
|
||||
return this.customClassifier;
|
||||
@ -3824,8 +3774,7 @@ public class Bidi {
|
||||
* for this <code>Bidi</code> instance.
|
||||
*
|
||||
* @see BidiClassifier
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getCustomizedClass(int c) {
|
||||
int dir;
|
||||
@ -3875,8 +3824,7 @@ public class Bidi {
|
||||
*
|
||||
* @see #setPara
|
||||
* @see #getProcessedLength
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi setLine(int start, int limit)
|
||||
{
|
||||
@ -3903,8 +3851,7 @@ public class Bidi {
|
||||
* <code>0<=charIndex<getProcessedLength()</code>
|
||||
*
|
||||
* @see #getProcessedLength
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public byte getLevelAt(int charIndex)
|
||||
{
|
||||
@ -3924,8 +3871,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public byte[] getLevels()
|
||||
{
|
||||
@ -3959,8 +3905,7 @@ public class Bidi {
|
||||
* @see com.ibm.icu.text.BidiRun#getLimit()
|
||||
* @see com.ibm.icu.text.BidiRun#getEmbeddingLevel()
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public BidiRun getLogicalRun(int logicalPosition)
|
||||
{
|
||||
@ -3981,8 +3926,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int countRuns()
|
||||
{
|
||||
@ -4053,8 +3997,7 @@ public class Bidi {
|
||||
* @see com.ibm.icu.text.BidiRun#getStart()
|
||||
* @see com.ibm.icu.text.BidiRun#getLength()
|
||||
* @see com.ibm.icu.text.BidiRun#getEmbeddingLevel()
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public BidiRun getVisualRun(int runIndex)
|
||||
{
|
||||
@ -4104,8 +4047,7 @@ public class Bidi {
|
||||
* @see #MAP_NOWHERE
|
||||
* @see #OPTION_REMOVE_CONTROLS
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getVisualIndex(int logicalIndex)
|
||||
{
|
||||
@ -4150,8 +4092,7 @@ public class Bidi {
|
||||
* @see #MAP_NOWHERE
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getLogicalIndex(int visualIndex)
|
||||
{
|
||||
@ -4207,8 +4148,7 @@ public class Bidi {
|
||||
* @see #MAP_NOWHERE
|
||||
* @see #OPTION_REMOVE_CONTROLS
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int[] getLogicalMap()
|
||||
{
|
||||
@ -4250,8 +4190,7 @@ public class Bidi {
|
||||
* @see #MAP_NOWHERE
|
||||
* @see #OPTION_INSERT_MARKS
|
||||
* @see #writeReordered
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int[] getVisualMap()
|
||||
{
|
||||
@ -4279,8 +4218,7 @@ public class Bidi {
|
||||
* <code>indexMap[logicalIndex]==visualIndex</code>, where
|
||||
* <code>indexMap</code> represents the returned array.
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static int[] reorderLogical(byte[] levels)
|
||||
{
|
||||
@ -4303,8 +4241,7 @@ public class Bidi {
|
||||
* <code>indexMap[visualIndex]==logicalIndex</code>, where
|
||||
* <code>indexMap</code> represents the returned array.
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static int[] reorderVisual(byte[] levels)
|
||||
{
|
||||
@ -4343,8 +4280,7 @@ public class Bidi {
|
||||
* inverse map will have a value equal to <code>MAP_NOWHERE</code>.
|
||||
*
|
||||
* @see #MAP_NOWHERE
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static int[] invertMap(int[] srcMap)
|
||||
{
|
||||
@ -4361,15 +4297,13 @@ public class Bidi {
|
||||
|
||||
/**
|
||||
* Constant indicating base direction is left-to-right.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int DIRECTION_LEFT_TO_RIGHT = LTR;
|
||||
|
||||
/**
|
||||
* Constant indicating base direction is right-to-left.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int DIRECTION_RIGHT_TO_LEFT = RTL;
|
||||
|
||||
@ -4378,8 +4312,7 @@ public class Bidi {
|
||||
* directional character in the text according to the Unicode Bidirectional
|
||||
* Algorithm. If no strong directional character is present, the base
|
||||
* direction is left-to-right.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT = LEVEL_DEFAULT_LTR;
|
||||
|
||||
@ -4388,8 +4321,7 @@ public class Bidi {
|
||||
* directional character in the text according to the Unicode Bidirectional
|
||||
* Algorithm. If no strong directional character is present, the base
|
||||
* direction is right-to-left.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = LEVEL_DEFAULT_RTL;
|
||||
|
||||
@ -4405,8 +4337,7 @@ public class Bidi {
|
||||
* @see #DIRECTION_RIGHT_TO_LEFT
|
||||
* @see #DIRECTION_DEFAULT_LEFT_TO_RIGHT
|
||||
* @see #DIRECTION_DEFAULT_RIGHT_TO_LEFT
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi(String paragraph, int flags)
|
||||
{
|
||||
@ -4439,8 +4370,7 @@ public class Bidi {
|
||||
*
|
||||
* @param paragraph a paragraph of text with optional character and
|
||||
* paragraph attribute information
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi(AttributedCharacterIterator paragraph)
|
||||
{
|
||||
@ -4481,8 +4411,7 @@ public class Bidi {
|
||||
* @see #DIRECTION_RIGHT_TO_LEFT
|
||||
* @see #DIRECTION_DEFAULT_LEFT_TO_RIGHT
|
||||
* @see #DIRECTION_DEFAULT_RIGHT_TO_LEFT
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi(char[] text,
|
||||
int textStart,
|
||||
@ -4551,8 +4480,7 @@ public class Bidi {
|
||||
* @throws IllegalArgumentException if lineStart and lineLimit are not in the range
|
||||
* <code>0<=lineStart<lineLimit<=getProcessedLength()</code>,
|
||||
* or if the specified line crosses a paragraph boundary
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Bidi createLineBidi(int lineStart, int lineLimit)
|
||||
{
|
||||
@ -4568,8 +4496,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isMixed()
|
||||
{
|
||||
@ -4585,8 +4512,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isLeftToRight()
|
||||
{
|
||||
@ -4602,8 +4528,7 @@ public class Bidi {
|
||||
*
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isRightToLeft()
|
||||
{
|
||||
@ -4618,8 +4543,7 @@ public class Bidi {
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean baseIsLeftToRight()
|
||||
{
|
||||
@ -4634,8 +4558,7 @@ public class Bidi {
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getBaseLevel()
|
||||
{
|
||||
@ -4650,8 +4573,7 @@ public class Bidi {
|
||||
* @throws IllegalStateException if this call is not preceded by a successful
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getRunCount()
|
||||
{
|
||||
@ -4695,8 +4617,7 @@ public class Bidi {
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @throws IllegalArgumentException if <code>run</code> is not in
|
||||
* the range <code>0<=run<countRuns()</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getRunLevel(int run)
|
||||
{
|
||||
@ -4719,8 +4640,7 @@ public class Bidi {
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @throws IllegalArgumentException if <code>run</code> is not in
|
||||
* the range <code>0<=run<countRuns()</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getRunStart(int run)
|
||||
{
|
||||
@ -4744,8 +4664,7 @@ public class Bidi {
|
||||
* call to <code>setPara</code> or <code>setLine</code>
|
||||
* @throws IllegalArgumentException if <code>run</code> is not in
|
||||
* the range <code>0<=run<countRuns()</code>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getRunLimit(int run)
|
||||
{
|
||||
@ -4772,8 +4691,7 @@ public class Bidi {
|
||||
*
|
||||
* @return true if the range of characters requires bidi analysis
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static boolean requiresBidi(char[] text,
|
||||
int start,
|
||||
@ -4808,8 +4726,7 @@ public class Bidi {
|
||||
* @param objects the array of objects to be reordered into visual order
|
||||
* @param objectStart the start position in the objects array
|
||||
* @param count the number of objects to reorder
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static void reorderVisually(byte[] levels,
|
||||
int levelStart,
|
||||
@ -4883,8 +4800,7 @@ public class Bidi {
|
||||
* @see #REMOVE_BIDI_CONTROLS
|
||||
* @see #OPTION_STREAMING
|
||||
* @see #getProcessedLength
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public String writeReordered(int options)
|
||||
{
|
||||
@ -4932,8 +4848,7 @@ public class Bidi {
|
||||
* <code>src.length()</code>.
|
||||
*
|
||||
* @throws IllegalArgumentException if <code>src</code> is null.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static String writeReverse(String src, int options)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2000-2007, International Business Machines Corporation and *
|
||||
* Copyright (C) 2000-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -32,8 +32,7 @@ package com.ibm.icu.text;
|
||||
* to be determined.</p>
|
||||
*
|
||||
* @see Bidi#setCustomClassifier
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
|
||||
public /*abstract*/ class BidiClassifier {
|
||||
@ -45,16 +44,14 @@ public /*abstract*/ class BidiClassifier {
|
||||
* For instance, this object can be used to save a reference to
|
||||
* a previous custom BidiClassifier while setting a new one, so as to
|
||||
* allow chaining between them.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
protected Object context;
|
||||
|
||||
/**
|
||||
* @param context Context for this classifier instance.
|
||||
* May be null.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public BidiClassifier(Object context) {
|
||||
this.context = context;
|
||||
@ -66,8 +63,7 @@ public /*abstract*/ class BidiClassifier {
|
||||
*
|
||||
* @param context Context for this classifier instance.
|
||||
* May be null.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setContext(Object context) {
|
||||
this.context = context;
|
||||
@ -75,8 +71,7 @@ public /*abstract*/ class BidiClassifier {
|
||||
|
||||
/**
|
||||
* Returns the current classifier context.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Object getContext() {
|
||||
return this.context;
|
||||
@ -93,8 +88,7 @@ public /*abstract*/ class BidiClassifier {
|
||||
* that there is no need to override the standard Bidi class for
|
||||
* the given code point.
|
||||
* @see Bidi#CLASS_DEFAULT
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int classify(int c) {
|
||||
return Bidi.CLASS_DEFAULT;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2007, International Business Machines
|
||||
* Copyright (C) 2001-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -25,7 +25,7 @@ package com.ibm.icu.text;
|
||||
* modified by users.
|
||||
*
|
||||
* @see com.ibm.icu.text.Bidi
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public class BidiRun {
|
||||
|
||||
@ -35,7 +35,7 @@ public class BidiRun {
|
||||
if <0, count of bidi controls within run */
|
||||
byte level;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Default constructor
|
||||
*
|
||||
* Note that members start and limit of a run instance have different
|
||||
@ -48,17 +48,14 @@ public class BidiRun {
|
||||
* For a reference returned by getLogicalRun() or getVisualRun(),
|
||||
* - start is the first logical position of the run in the source text.
|
||||
* - limit is one after the last logical position of the run.
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
*/
|
||||
BidiRun()
|
||||
{
|
||||
this(0, 0, (byte)0);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Constructor
|
||||
* @draft ICU 3.8
|
||||
*/
|
||||
BidiRun(int start, int limit, byte embeddingLevel)
|
||||
{
|
||||
@ -67,9 +64,8 @@ public class BidiRun {
|
||||
this.level = embeddingLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Copy the content of a BidiRun instance
|
||||
* @draft ICU 3.8
|
||||
*/
|
||||
void copyFrom(BidiRun run)
|
||||
{
|
||||
@ -81,7 +77,7 @@ public class BidiRun {
|
||||
|
||||
/**
|
||||
* Get the first logical position of the run in the source text
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getStart()
|
||||
{
|
||||
@ -90,7 +86,7 @@ public class BidiRun {
|
||||
|
||||
/**
|
||||
* Get position of one character after the end of the run in the source text
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getLimit()
|
||||
{
|
||||
@ -99,7 +95,7 @@ public class BidiRun {
|
||||
|
||||
/**
|
||||
* Get length of run
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int getLength()
|
||||
{
|
||||
@ -108,7 +104,7 @@ public class BidiRun {
|
||||
|
||||
/**
|
||||
* Get level of run
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public byte getEmbeddingLevel()
|
||||
{
|
||||
@ -119,7 +115,7 @@ public class BidiRun {
|
||||
* Check if run level is odd
|
||||
* @return true if the embedding level of this run is odd, i.e. it is a
|
||||
* right-to-left run.
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isOddRun()
|
||||
{
|
||||
@ -130,7 +126,7 @@ public class BidiRun {
|
||||
* Check if run level is even
|
||||
* @return true if the embedding level of this run is even, i.e. it is a
|
||||
* left-to-right run.
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean isEvenRun()
|
||||
{
|
||||
@ -139,7 +135,7 @@ public class BidiRun {
|
||||
|
||||
/**
|
||||
* Get direction of run
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public byte getDirection()
|
||||
{
|
||||
@ -148,7 +144,7 @@ public class BidiRun {
|
||||
|
||||
/**
|
||||
* String to display run
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
|
@ -194,8 +194,7 @@ public class ChineseDateFormat extends SimpleDateFormat {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
protected DateFormat.Field patternCharToDateFormatField(char ch) {
|
||||
if (ch == 'l') {
|
||||
|
@ -643,43 +643,37 @@ public abstract class DateFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Constant for relative style mask.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int RELATIVE = (1 << 7);
|
||||
|
||||
/**
|
||||
* Constant for relative full style pattern.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int RELATIVE_FULL = RELATIVE | FULL;
|
||||
|
||||
/**
|
||||
* Constant for relative style pattern.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int RELATIVE_LONG = RELATIVE | LONG;
|
||||
|
||||
/**
|
||||
* Constant for relative style pattern.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int RELATIVE_MEDIUM = RELATIVE | MEDIUM;
|
||||
|
||||
/**
|
||||
* Constant for relative style pattern.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int RELATIVE_SHORT = RELATIVE | SHORT;
|
||||
|
||||
/**
|
||||
* Constant for relative default style pattern.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final int RELATIVE_DEFAULT = RELATIVE | DEFAULT;
|
||||
|
||||
@ -708,59 +702,50 @@ public abstract class DateFormat extends UFormat {
|
||||
*/
|
||||
/**
|
||||
* Constant for date pattern with minute and second.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String MINUTE_SECOND = "ms";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour and minute in 24-hour presentation.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR24_MINUTE = "Hm";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour, minute, and second in
|
||||
* 24-hour presentation.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR24_MINUTE_SECOND = "Hms";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour, minute, and second.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR_MINUTE_SECOND = "hms";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with standalone month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String STANDALONE_MONTH = "LLLL";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with standalone abbreviated month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String ABBR_STANDALONE_MONTH = "LLL";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year and quarter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_QUARTER = "yQQQ";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year and abbreviated quarter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_ABBR_QUARTER = "yQ";
|
||||
|
||||
@ -770,185 +755,158 @@ public abstract class DateFormat extends UFormat {
|
||||
*/
|
||||
/**
|
||||
* Constant for date pattern with hour and minute.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR_MINUTE = "hm";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR = "y";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String DAY = "d";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with numeric month, weekday, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String NUM_MONTH_WEEKDAY_DAY = "MEd";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year and numeric month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_NUM_MONTH = "yM";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with numeric month and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String NUM_MONTH_DAY = "Md";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year, numeric month, weekday, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_NUM_MONTH_WEEKDAY_DAY = "yMEd";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with abbreviated month, weekday, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String ABBR_MONTH_WEEKDAY_DAY = "MMMEd";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year and month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_MONTH = "yMMMM";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year and abbreviated month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_ABBR_MONTH = "yMMM";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern having month and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String MONTH_DAY = "MMMMd";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with abbreviated month and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String ABBR_MONTH_DAY = "MMMd";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with month, weekday, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String MONTH_WEEKDAY_DAY = "MMMMEEEEd";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year, abbreviated month, weekday,
|
||||
* and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_ABBR_MONTH_WEEKDAY_DAY = "yMMMEd";
|
||||
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year, month, weekday, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_MONTH_WEEKDAY_DAY = "yMMMMEEEEd";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year, month, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_MONTH_DAY = "yMMMMd";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year, abbreviated month, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_ABBR_MONTH_DAY = "yMMMd";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with year, numeric month, and day.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String YEAR_NUM_MONTH_DAY = "yMd";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with numeric month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String NUM_MONTH = "M";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with abbreviated month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String ABBR_MONTH = "MMM";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with month.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String MONTH = "MMMM";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour, minute, and generic timezone.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR_MINUTE_GENERIC_TZ = "hmv";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour, minute, and timezone.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR_MINUTE_TZ = "hmz";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR = "h";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour and generic timezone.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR_GENERIC_TZ = "hv";
|
||||
|
||||
/**
|
||||
* Constant for date pattern with hour and timezone.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final String HOUR_TZ = "hz";
|
||||
|
||||
@ -1509,17 +1467,15 @@ public abstract class DateFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Convenience overload
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final static DateFormat getPatternInstance(String pattern) {
|
||||
return getPatternInstance(pattern, ULocale.getDefault());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convenience overload
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final static DateFormat getPatternInstance(String pattern, Locale locale) {
|
||||
return getPatternInstance(pattern, ULocale.forLocale(locale));
|
||||
@ -1539,8 +1495,7 @@ public abstract class DateFormat extends UFormat {
|
||||
*
|
||||
* @param locale The locale for which the date/time format is desired.
|
||||
*
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final static DateFormat getPatternInstance(String pattern, ULocale locale) {
|
||||
DateTimePatternGenerator generator = DateTimePatternGenerator.getInstance(locale);
|
||||
@ -1550,8 +1505,7 @@ public abstract class DateFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Convenience overload
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final static DateFormat getPatternInstance(Calendar cal, String pattern, Locale locale) {
|
||||
return getPatternInstance(cal, pattern, ULocale.forLocale(locale));
|
||||
@ -1573,8 +1527,7 @@ public abstract class DateFormat extends UFormat {
|
||||
*
|
||||
* @param locale The locale for which the date/time format is desired.
|
||||
*
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final static DateFormat getPatternInstance(Calendar cal, String pattern, ULocale locale) {
|
||||
DateTimePatternGenerator generator = DateTimePatternGenerator.getInstance(locale);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -208,8 +208,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
||||
*
|
||||
* @param locale the locale.
|
||||
* @return A DateFormatSymbols instance.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static DateFormatSymbols getInstance(ULocale locale) {
|
||||
return new DateFormatSymbols(locale);
|
||||
@ -241,11 +240,11 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
||||
* or its equivalent implementation for now.
|
||||
*
|
||||
* @return An array of <code>ULocale</code>s for which localized <code>DateFormatSymbols</code> instances are available.
|
||||
* @draft ICU 3.8
|
||||
* @draft ICU 3.8 (retain)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static ULocale[] getAvailableULocales() {
|
||||
return ICUResourceBundle.getAvailableULocales(ICUResourceBundle.ICU_BASE_NAME);
|
||||
return ICUResourceBundle.getAvailableULocales(ICUResourceBundle.ICU_BASE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,8 +243,7 @@ import com.ibm.icu.text.SimpleDateFormat;
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
|
||||
public class DateIntervalFormat extends UFormat {
|
||||
@ -358,8 +357,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
*
|
||||
* @param skeleton the skeleton on which interval format based.
|
||||
* @return a date time interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final DateIntervalFormat
|
||||
getInstance(String skeleton)
|
||||
@ -378,8 +376,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @param skeleton the skeleton on which interval format based.
|
||||
* @param locale the given locale
|
||||
* @return a date time interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final DateIntervalFormat
|
||||
getInstance(String skeleton, Locale locale)
|
||||
@ -415,8 +412,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @param skeleton the skeleton on which interval format based.
|
||||
* @param locale the given locale
|
||||
* @return a date time interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final DateIntervalFormat
|
||||
getInstance(String skeleton, ULocale locale)
|
||||
@ -438,8 +434,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @param skeleton the skeleton on which interval format based.
|
||||
* @param dtitvinf the DateIntervalInfo object to be adopted.
|
||||
* @return a date time interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final DateIntervalFormat getInstance(String skeleton,
|
||||
DateIntervalInfo dtitvinf)
|
||||
@ -460,8 +455,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @param locale the given locale
|
||||
* @param dtitvinf the DateIntervalInfo object to be adopted.
|
||||
* @return a date time interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final DateIntervalFormat getInstance(String skeleton,
|
||||
Locale locale,
|
||||
@ -506,8 +500,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @param locale the given locale
|
||||
* @param dtitvinf the DateIntervalInfo object to be adopted.
|
||||
* @return a date time interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final DateIntervalFormat getInstance(String skeleton,
|
||||
ULocale locale,
|
||||
@ -524,8 +517,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
/**
|
||||
* Clone this Format object polymorphically.
|
||||
* @return A copy of the object.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public Object clone()
|
||||
{
|
||||
@ -555,8 +547,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @return Reference to 'appendTo' parameter.
|
||||
* @throws IllegalArgumentException if the formatted object is not
|
||||
* DateInterval object
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final StringBuffer
|
||||
format(Object obj, StringBuffer appendTo, FieldPosition fieldPosition)
|
||||
@ -578,8 +569,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* @param fieldPosition On input: an alignment field, if desired.
|
||||
* On output: the offsets of the alignment field.
|
||||
* @return Reference to 'appendTo' parameter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final StringBuffer format(DateInterval dtInterval,
|
||||
StringBuffer appendTo,
|
||||
@ -604,8 +594,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* On output: the offsets of the alignment field.
|
||||
* @return Reference to 'appendTo' parameter.
|
||||
* @throws IllegalArgumentException if the two calendars are not equivalent, or the calendars are not Gregorian calendar.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final StringBuffer format(Calendar fromCalendar,
|
||||
Calendar toCalendar,
|
||||
@ -794,8 +783,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* Gets the date time interval patterns.
|
||||
* @return a copy of the date time interval patterns associated with
|
||||
* this date interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public DateIntervalInfo getDateIntervalInfo()
|
||||
{
|
||||
@ -806,8 +794,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
/**
|
||||
* Set the date time interval patterns.
|
||||
* @param newItvPattern the given interval patterns to copy.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public void setDateIntervalInfo(DateIntervalInfo newItvPattern)
|
||||
{
|
||||
@ -826,8 +813,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
* Gets the date formatter
|
||||
* @return a copy of the date formatter associated with
|
||||
* this date interval formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public DateFormat getDateFormat()
|
||||
{
|
||||
|
@ -1,7 +1,9 @@
|
||||
/*
|
||||
* Copyright (C) 2008, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*/
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
@ -139,9 +141,8 @@ import com.ibm.icu.util.UResourceBundle;
|
||||
* Data for a calendar is loaded out of resource bundles.
|
||||
* To ICU 4.0, date interval patterns are only supported in Gregorian calendar.
|
||||
*
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
**/
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
|
||||
public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
/* Save the interval pattern information.
|
||||
@ -158,8 +159,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
/**
|
||||
* PatternInfo class saves the first and second part of interval pattern,
|
||||
* and whether the interval pattern is earlier date first.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final class PatternInfo implements Cloneable, Serializable {
|
||||
static final int currentSerialVersion = 1;
|
||||
@ -183,8 +183,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public PatternInfo(String firstPart, String secondPart,
|
||||
boolean firstDateInPtnIsLaterDate) {
|
||||
@ -195,8 +194,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* accessor
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String getFirstPart() {
|
||||
return fIntervalPatternFirstPart;
|
||||
@ -204,8 +202,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* accessor
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String getSecondPart() {
|
||||
return fIntervalPatternSecondPart;
|
||||
@ -213,8 +210,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* accessor
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public boolean firstDateInPtnIsLaterDate() {
|
||||
return fFirstDateInPtnIsLaterDate;
|
||||
@ -222,8 +218,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Override equals
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public boolean equals(Object a) {
|
||||
if ( a instanceof PatternInfo ) {
|
||||
@ -237,8 +232,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Override hashcode
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public int hashCode() {
|
||||
int hash = fIntervalPatternFirstPart != null ? fIntervalPatternFirstPart.hashCode() : 0;
|
||||
@ -313,8 +307,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
* Construct DateIntervalInfo for the given locale,
|
||||
* @param locale the interval patterns are loaded from the Gregorian
|
||||
* calendar data in this locale.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public DateIntervalInfo(ULocale locale)
|
||||
{
|
||||
@ -535,8 +528,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
* a calendar field that is smaller
|
||||
* than the MINIMUM_SUPPORTED_CALENDAR_FIELD
|
||||
* @throws UnsupportedOperationException if the object is frozen
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public void setIntervalPattern(String skeleton,
|
||||
int lrgDiffCalUnit,
|
||||
@ -657,8 +649,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
* @throws IllegalArgumentException if getting interval pattern on
|
||||
* a calendar field that is smaller
|
||||
* than the MINIMUM_SUPPORTED_CALENDAR_FIELD
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public PatternInfo getIntervalPattern(String skeleton, int field)
|
||||
{
|
||||
@ -681,8 +672,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
/**
|
||||
* Get the fallback interval pattern.
|
||||
* @return fallback interval pattern
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String getFallbackIntervalPattern()
|
||||
{
|
||||
@ -704,8 +694,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
* @throws IllegalArgumentException if there is no pattern {0} or
|
||||
* pattern {1} in fallbakckPattern
|
||||
*
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public void setFallbackIntervalPattern(String fallbackPattern)
|
||||
{
|
||||
@ -730,8 +719,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
*
|
||||
* return default date ordering in interval pattern. TRUE if the first date
|
||||
* in pattern is later date, FALSE otherwise.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public boolean getDefaultOrder()
|
||||
{
|
||||
@ -742,8 +730,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
/**
|
||||
* Boilerplate. Clone this object.
|
||||
* @return a copy of the object
|
||||
* @draft ICU4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU4.0
|
||||
*/
|
||||
public Object clone()
|
||||
{
|
||||
@ -788,8 +775,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Boilerplate for Freezable
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public boolean isFrozen() {
|
||||
return frozen;
|
||||
@ -797,8 +783,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Boilerplate for Freezable
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public Object freeze() {
|
||||
frozen = true;
|
||||
@ -807,8 +792,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Boilerplate for Freezable
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public Object cloneAsThawed() {
|
||||
DateIntervalInfo result = (DateIntervalInfo) (this.cloneUnfrozenDII());
|
||||
@ -945,8 +929,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Override equals
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public boolean equals(Object a) {
|
||||
if ( a instanceof DateIntervalInfo ) {
|
||||
@ -958,8 +941,7 @@ public class DateIntervalInfo implements Cloneable, Freezable, Serializable {
|
||||
|
||||
/**
|
||||
* Override hashcode
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public int hashCode() {
|
||||
return fIntervalPatterns.hashCode();
|
||||
|
@ -109,8 +109,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
||||
*
|
||||
* @param locale the locale.
|
||||
* @return A DecimalFormatSymbols instance.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static DecimalFormatSymbols getInstance(ULocale locale) {
|
||||
return new DecimalFormatSymbols(locale);
|
||||
@ -142,11 +141,11 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
||||
* or its equivalent implementation for now.
|
||||
*
|
||||
* @return An array of <code>ULocale</code>s for which localized <code>DecimalFormatSymbols</code> instances are available.
|
||||
* @draft ICU 3.8
|
||||
* @stable ICU 3.8 (retain)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static ULocale[] getAvailableULocales() {
|
||||
return ICUResourceBundle.getAvailableULocales(ICUResourceBundle.ICU_BASE_NAME);
|
||||
return ICUResourceBundle.getAvailableULocales(ICUResourceBundle.ICU_BASE_NAME);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 2007-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -16,8 +16,8 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* This class implements a formatter over a duration in time
|
||||
* such as "2 days from now" or "3 hours ago".
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public abstract class DurationFormat extends UFormat {
|
||||
|
||||
@ -25,8 +25,7 @@ public abstract class DurationFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Construct a duration format for the specified locale
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static DurationFormat getInstance(ULocale locale) {
|
||||
return (DurationFormat)BasicDurationFormat.getInstance(locale);
|
||||
@ -57,16 +56,14 @@ public abstract class DurationFormat extends UFormat {
|
||||
* @param toAppend the buffer to append to
|
||||
* @param pos the field position, may contain additional error messages.
|
||||
* @return the toAppend buffer
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public abstract StringBuffer format(Object object, StringBuffer toAppend,
|
||||
FieldPosition pos);
|
||||
|
||||
/**
|
||||
* DurationFormat cannot parse, by default. This method will throw an UnsupportedOperationException.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Object parseObject(String source, ParsePosition pos) {
|
||||
throw new UnsupportedOperationException();
|
||||
@ -82,8 +79,7 @@ public abstract class DurationFormat extends UFormat {
|
||||
*
|
||||
* @param targetDate the ending date
|
||||
* @return the formatted time
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public abstract String formatDurationFromNowTo(Date targetDate);
|
||||
|
||||
@ -95,8 +91,7 @@ public abstract class DurationFormat extends UFormat {
|
||||
*
|
||||
* @param duration the duration in milliseconds
|
||||
* @return the formatted time
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public abstract String formatDurationFromNow(long duration);
|
||||
|
||||
@ -113,10 +108,7 @@ public abstract class DurationFormat extends UFormat {
|
||||
* @param duration the duration in milliseconds
|
||||
* @param referenceDate the date from which to compute the duration
|
||||
* @return the formatted time
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public abstract String formatDurationFrom(long duration, long referenceDate);
|
||||
|
||||
|
||||
}
|
||||
|
@ -1243,8 +1243,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
* @return A rounding mode, between <code>BigDecimal.ROUND_UP</code>
|
||||
* and <code>BigDecimal.ROUND_UNNECESSARY</code>.
|
||||
* @see #setRoundingMode(int)
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public int getRoundingMode() {
|
||||
throw new UnsupportedOperationException("getRoundingMode must be implemented by the subclass implementation.");
|
||||
@ -1257,8 +1256,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
* <code>BigDecimal.ROUND_UP</code> and
|
||||
* <code>BigDecimal.ROUND_UNNECESSARY</code>.
|
||||
* @see #getRoundingMode()
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public void setRoundingMode(int roundingMode) {
|
||||
throw new UnsupportedOperationException("setRoundingMode must be implemented by the subclass implementation.");
|
||||
|
@ -26,10 +26,8 @@ import com.ibm.icu.text.UCharacterIterator;
|
||||
* as Hebrew numbering or Chinese numbering.
|
||||
*
|
||||
* @author John Emmons
|
||||
* @draft ICU 4.2
|
||||
*/
|
||||
|
||||
public class NumberingSystem {
|
||||
class NumberingSystem {
|
||||
|
||||
public NumberingSystem() {
|
||||
radix = 10;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 2007-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -145,36 +145,35 @@ import java.util.Set;
|
||||
* </p>
|
||||
*
|
||||
* @author tschumann (Tim Schumann)
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public class PluralFormat extends UFormat {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The locale used for standard number formatting and getting the predefined
|
||||
* plural rules (if they were not defined explicitely).
|
||||
*/
|
||||
private ULocale ulocale = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The plural rules used for plural selection.
|
||||
*/
|
||||
private PluralRules pluralRules = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The applied pattern string.
|
||||
*/
|
||||
private String pattern = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The format messages for each plural case. It is a mapping:
|
||||
* <code>String</code>(plural case keyword) --> <code>String</code>
|
||||
* (message for this plural case).
|
||||
*/
|
||||
private Map parsedValues = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This <code>NumberFormat</code> is used for the standard formatting of
|
||||
* the number inserted into the message.
|
||||
*/
|
||||
@ -184,8 +183,7 @@ public class PluralFormat extends UFormat {
|
||||
* Creates a new <code>PluralFormat</code> for the default locale.
|
||||
* This locale will be used to get the set of plural rules and for standard
|
||||
* number formatting.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat() {
|
||||
init(null, ULocale.getDefault());
|
||||
@ -196,8 +194,7 @@ public class PluralFormat extends UFormat {
|
||||
* @param ulocale the <code>PluralFormat</code> will be configured with
|
||||
* rules for this locale. This locale will also be used for standard
|
||||
* number formatting.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(ULocale ulocale) {
|
||||
init(null, ulocale);
|
||||
@ -208,8 +205,7 @@ public class PluralFormat extends UFormat {
|
||||
* The standard number formatting will be done using the default locale.
|
||||
* @param rules defines the behavior of the <code>PluralFormat</code>
|
||||
* object.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(PluralRules rules) {
|
||||
init(rules, ULocale.getDefault());
|
||||
@ -222,8 +218,7 @@ public class PluralFormat extends UFormat {
|
||||
* locale.
|
||||
* @param rules defines the behavior of the <code>PluralFormat</code>
|
||||
* object.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(ULocale ulocale, PluralRules rules) {
|
||||
init(rules, ulocale);
|
||||
@ -235,8 +230,7 @@ public class PluralFormat extends UFormat {
|
||||
* standard number formatting.
|
||||
* @param pattern the pattern for this <code>PluralFormat</code>.
|
||||
* @throws IllegalArgumentException if the pattern is invalid.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(String pattern) {
|
||||
init(null, ULocale.getDefault());
|
||||
@ -253,8 +247,7 @@ public class PluralFormat extends UFormat {
|
||||
* number formatting.
|
||||
* @param pattern the pattern for this <code>PluralFormat</code>.
|
||||
* @throws IllegalArgumentException if the pattern is invalid.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(ULocale ulocale, String pattern) {
|
||||
init(null, ulocale);
|
||||
@ -269,8 +262,7 @@ public class PluralFormat extends UFormat {
|
||||
* object.
|
||||
* @param pattern the pattern for this <code>PluralFormat</code>.
|
||||
* @throws IllegalArgumentException if the pattern is invalid.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(PluralRules rules, String pattern) {
|
||||
init(rules, ULocale.getDefault());
|
||||
@ -287,15 +279,14 @@ public class PluralFormat extends UFormat {
|
||||
* object.
|
||||
* @param pattern the pattern for this <code>PluralFormat</code>.
|
||||
* @throws IllegalArgumentException if the pattern is invalid.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public PluralFormat(ULocale ulocale, PluralRules rules, String pattern) {
|
||||
init(rules, ulocale);
|
||||
applyPattern(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Initializes the <code>PluralRules</code> object.
|
||||
* Postcondition:<br/>
|
||||
* <code>ulocale</code> : is <code>locale</code><br/>
|
||||
@ -325,8 +316,7 @@ public class PluralFormat extends UFormat {
|
||||
*
|
||||
* @param pttrn the pattern for this plural format.
|
||||
* @throws IllegalArgumentException if the pattern is invalid.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void applyPattern(String pttrn) {
|
||||
pttrn = pttrn.trim();
|
||||
@ -434,8 +424,7 @@ public class PluralFormat extends UFormat {
|
||||
* <code>PluralFormat</code> object yet, the formatted number will
|
||||
* be returned.
|
||||
* @return the string containing the formatted plural message.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final String format(double number) {
|
||||
// If no pattern was applied, return the formatted number.
|
||||
@ -471,8 +460,7 @@ public class PluralFormat extends UFormat {
|
||||
* @return the string buffer passed in as toAppendTo, with formatted text
|
||||
* appended.
|
||||
* @throws IllegalArgumentException if number is not an instance of Number
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public StringBuffer format(Object number, StringBuffer toAppendTo,
|
||||
FieldPosition pos) {
|
||||
@ -493,8 +481,7 @@ public class PluralFormat extends UFormat {
|
||||
* @return nothing because this method is not yet implemented.
|
||||
* @throws UnsupportedOperationException
|
||||
* will always be thrown by this method.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Number parse(String text, ParsePosition parsePosition) {
|
||||
throw new UnsupportedOperationException();
|
||||
@ -509,8 +496,7 @@ public class PluralFormat extends UFormat {
|
||||
* @return nothing because this method is not yet implemented.
|
||||
* @throws UnsupportedOperationException
|
||||
* will always be thrown by this method.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Object parseObject(String source, ParsePosition pos) {
|
||||
throw new UnsupportedOperationException();
|
||||
@ -526,8 +512,7 @@ public class PluralFormat extends UFormat {
|
||||
* @param ulocale the <code>ULocale</code> used to configure the
|
||||
* formatter. If <code>ulocale</code> is <code>null</code>, the
|
||||
* default locale will be used.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setLocale(ULocale ulocale) {
|
||||
if (ulocale == null) {
|
||||
@ -541,14 +526,13 @@ public class PluralFormat extends UFormat {
|
||||
* call this if you want a different number format than the default
|
||||
* formatter for the locale.
|
||||
* @param format the number format to use.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public void setNumberFormat(NumberFormat format) {
|
||||
numberFormat = format;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Checks if the applied pattern provided enough information,
|
||||
* i.e., if the attribute <code>parsedValues</code> stores enough
|
||||
* information for plural formatting.
|
||||
@ -565,7 +549,7 @@ public class PluralFormat extends UFormat {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Helper method that resets the <code>PluralFormat</code> object and throws
|
||||
* an <code>IllegalArgumentException</code> with a given error text.
|
||||
* @param errorText the error text of the exception message.
|
||||
@ -577,7 +561,7 @@ public class PluralFormat extends UFormat {
|
||||
throw new IllegalArgumentException(errorText);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Helper method that is called during formatting.
|
||||
* It replaces the character '#' by the number used for plural selection in
|
||||
* a message text. Only '#' are replaced, that are not written inside curly
|
||||
@ -621,8 +605,7 @@ public class PluralFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean equals(Object rhs) {
|
||||
return rhs instanceof PluralFormat && equals((PluralFormat) rhs);
|
||||
@ -632,8 +615,7 @@ public class PluralFormat extends UFormat {
|
||||
* Returns true if this equals the provided PluralFormat.
|
||||
* @param rhs the PluralFormat to compare against
|
||||
* @return true if this equals rhs
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean equals(PluralFormat rhs) {
|
||||
return pluralRules.equals(rhs.pluralRules) &&
|
||||
@ -643,8 +625,7 @@ public class PluralFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int hashCode() {
|
||||
return pluralRules.hashCode() ^ parsedValues.hashCode();
|
||||
@ -653,8 +634,7 @@ public class PluralFormat extends UFormat {
|
||||
/**
|
||||
* For debugging purposes only
|
||||
* @return a text representation of the format data.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 2007-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -71,8 +71,7 @@ import java.util.Set;
|
||||
* <p>
|
||||
* The difference between 'in' and 'within' is that 'in' only includes
|
||||
* integers in the specified range, while 'within' includes all values.</p>
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public class PluralRules implements Serializable {
|
||||
private static final long serialVersionUID = 1;
|
||||
@ -85,36 +84,31 @@ public class PluralRules implements Serializable {
|
||||
|
||||
/**
|
||||
* Common name for the 'zero' plural form.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final String KEYWORD_ZERO = "zero";
|
||||
|
||||
/**
|
||||
* Common name for the 'singular' plural form.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final String KEYWORD_ONE = "one";
|
||||
|
||||
/**
|
||||
* Common name for the 'dual' plural form.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final String KEYWORD_TWO = "two";
|
||||
|
||||
/**
|
||||
* Common name for the 'paucal' or other special plural form.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final String KEYWORD_FEW = "few";
|
||||
|
||||
/**
|
||||
* Common name for the arabic (11 to 99) plural form.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final String KEYWORD_MANY = "many";
|
||||
|
||||
@ -122,25 +116,24 @@ public class PluralRules implements Serializable {
|
||||
* Common name for the default plural form. This name is returned
|
||||
* for values to which no other form in the rule applies. It
|
||||
* can additionally be assigned rules of its own.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final String KEYWORD_OTHER = "other";
|
||||
|
||||
/**
|
||||
/*
|
||||
* The set of all characters a valid keyword can start with.
|
||||
*/
|
||||
private static final UnicodeSet START_CHARS =
|
||||
new UnicodeSet("[[:ID_Start:][_]]");
|
||||
|
||||
/**
|
||||
/*
|
||||
* The set of all characters a valid keyword can contain after
|
||||
* the first character.
|
||||
*/
|
||||
private static final UnicodeSet CONT_CHARS =
|
||||
new UnicodeSet("[:ID_Continue:]");
|
||||
|
||||
/**
|
||||
/*
|
||||
* The default constraint that is always satisfied.
|
||||
*/
|
||||
private static final Constraint NO_CONSTRAINT = new Constraint() {
|
||||
@ -158,7 +151,7 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* The default rule that always returns "other".
|
||||
*/
|
||||
private static final Rule DEFAULT_RULE = new Rule() {
|
||||
@ -179,14 +172,13 @@ public class PluralRules implements Serializable {
|
||||
public int updateRepeatLimit(int limit) {
|
||||
return limit;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The default rules that accept any number and return
|
||||
* {@link #KEYWORD_OTHER}.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static final PluralRules DEFAULT =
|
||||
new PluralRules(new RuleChain(DEFAULT_RULE));
|
||||
@ -196,8 +188,7 @@ public class PluralRules implements Serializable {
|
||||
* @param description the rule description.
|
||||
* @throws ParseException if the description cannot be parsed.
|
||||
* The exception index is typically not set, it will be -1.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static PluralRules parseDescription(String description)
|
||||
throws ParseException {
|
||||
@ -215,8 +206,7 @@ public class PluralRules implements Serializable {
|
||||
* otherwise returns null.
|
||||
* @param description the rule description.
|
||||
* @return the PluralRules
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static PluralRules createRules(String description) {
|
||||
try {
|
||||
@ -226,17 +216,17 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A constraint on a number.
|
||||
*/
|
||||
private interface Constraint extends Serializable {
|
||||
/**
|
||||
/*
|
||||
* Returns true if the number fulfills the constraint.
|
||||
* @param n the number to test, >= 0.
|
||||
*/
|
||||
boolean isFulfilled(double n);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the larger of limit or the limit of this constraint.
|
||||
* If the constraint is a simple range test, this is the higher
|
||||
* end of the range; if it is a modulo test, this is the modulus.
|
||||
@ -247,33 +237,33 @@ public class PluralRules implements Serializable {
|
||||
int updateRepeatLimit(int limit);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A pluralization rule. .
|
||||
*/
|
||||
private interface Rule extends Serializable {
|
||||
/** Returns the keyword that names this rule. */
|
||||
/* Returns the keyword that names this rule. */
|
||||
String getKeyword();
|
||||
/** Returns true if the rule applies to the number. */
|
||||
/* Returns true if the rule applies to the number. */
|
||||
boolean appliesTo(double n);
|
||||
/** Returns the larger of limit and this rule's limit. */
|
||||
/* Returns the larger of limit and this rule's limit. */
|
||||
int updateRepeatLimit(int limit);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A list of rules to apply in order.
|
||||
*/
|
||||
private interface RuleList extends Serializable {
|
||||
/** Returns the keyword of the first rule that applies to the number. */
|
||||
/* Returns the keyword of the first rule that applies to the number. */
|
||||
String select(double n);
|
||||
|
||||
/** Returns the set of defined keywords. */
|
||||
/* Returns the set of defined keywords. */
|
||||
Set getKeywords();
|
||||
|
||||
/** Return the value at which this rulelist starts repeating. */
|
||||
/* Return the value at which this rulelist starts repeating. */
|
||||
int getRepeatLimit();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* syntax:
|
||||
* condition : or_condition
|
||||
* and_condition
|
||||
@ -391,13 +381,13 @@ public class PluralRules implements Serializable {
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Returns a parse exception wrapping the token and context strings. */
|
||||
/* Returns a parse exception wrapping the token and context strings. */
|
||||
private static ParseException unexpected(String token, String context) {
|
||||
return new ParseException("unexpected token '" + token +
|
||||
"' in '" + context + "'", -1);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the token at x if available, else throws a parse exception.
|
||||
*/
|
||||
private static String nextToken(String[] tokens, int x, String context)
|
||||
@ -408,7 +398,7 @@ public class PluralRules implements Serializable {
|
||||
throw new ParseException("missing token at end of '" + context + "'", -1);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Syntax:
|
||||
* rule : keyword ':' condition
|
||||
* keyword: <identifier>
|
||||
@ -436,7 +426,7 @@ public class PluralRules implements Serializable {
|
||||
return rule;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Syntax:
|
||||
* rules : rule
|
||||
* rule ';' rules
|
||||
@ -457,7 +447,7 @@ public class PluralRules implements Serializable {
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* An implementation of Constraint representing a modulus,
|
||||
* a range of values, and include/exclude. Provides lots of
|
||||
* convenience factory methods.
|
||||
@ -502,7 +492,7 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/** Convenience base class for and/or constraints. */
|
||||
/* Convenience base class for and/or constraints. */
|
||||
private static abstract class BinaryConstraint implements Constraint,
|
||||
Serializable {
|
||||
private static final long serialVersionUID = 1;
|
||||
@ -525,7 +515,7 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/** A constraint representing the logical and of two constraints. */
|
||||
/* A constraint representing the logical and of two constraints. */
|
||||
private static class AndConstraint extends BinaryConstraint {
|
||||
private static final long serialVersionUID = 7766999779862263523L;
|
||||
|
||||
@ -538,7 +528,7 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/** A constraint representing the logical or of two constraints. */
|
||||
/* A constraint representing the logical or of two constraints. */
|
||||
private static class OrConstraint extends BinaryConstraint {
|
||||
private static final long serialVersionUID = 1405488568664762222L;
|
||||
|
||||
@ -551,7 +541,7 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Implementation of Rule that uses a constraint.
|
||||
* Provides 'and' and 'or' to combine constraints. Immutable.
|
||||
*/
|
||||
@ -590,7 +580,7 @@ public class PluralRules implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Implementation of RuleList that is itself a node in a linked list.
|
||||
* Immutable, but supports chaining with 'addRule'.
|
||||
*/
|
||||
@ -677,14 +667,13 @@ public class PluralRules implements Serializable {
|
||||
* for the closest parent in the locale hierarchy that has one will
|
||||
* be returned. The final fallback always returns the default
|
||||
* rules.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public static PluralRules forLocale(ULocale locale) {
|
||||
return PluralRulesLoader.loader.forLocale(locale);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Checks whether a token is a valid keyword.
|
||||
*
|
||||
* @param token the token to be checked
|
||||
@ -702,7 +691,7 @@ public class PluralRules implements Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Creates a new <code>PluralRules</code> object. Immutable.
|
||||
*/
|
||||
private PluralRules(RuleList rules) {
|
||||
@ -716,8 +705,7 @@ public class PluralRules implements Serializable {
|
||||
*
|
||||
* @param number The number for which the rule has to be determined.
|
||||
* @return The keyword of the selected rule.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String select(double number) {
|
||||
return rules.select(number);
|
||||
@ -728,8 +716,7 @@ public class PluralRules implements Serializable {
|
||||
* object. The rule "other" is always present by default.
|
||||
*
|
||||
* @return The set of keywords.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public Set getKeywords() {
|
||||
return keywords;
|
||||
@ -768,8 +755,7 @@ public class PluralRules implements Serializable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public String toString() {
|
||||
return "keywords: " + keywords + " rules: " + rules.toString() +
|
||||
@ -778,8 +764,7 @@ public class PluralRules implements Serializable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public int hashCode() {
|
||||
return keywords.hashCode();
|
||||
@ -787,8 +772,7 @@ public class PluralRules implements Serializable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean equals(Object rhs) {
|
||||
return rhs instanceof PluralRules && equals((PluralRules)rhs);
|
||||
@ -798,8 +782,7 @@ public class PluralRules implements Serializable {
|
||||
* Return tif rhs is equal to this.
|
||||
* @param rhs the PluralRules to compare to.
|
||||
* @return true if this and rhs are equal.
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
public boolean equals(PluralRules rhs) {
|
||||
if (rhs == null) {
|
||||
|
@ -512,6 +512,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
/**
|
||||
* Selector code that tells the constructor to create a numbering system formatter
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int NUMBERING_SYSTEM = 4;
|
||||
|
||||
|
@ -414,6 +414,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
/**
|
||||
* Construct a SimpleDateFormat using the given pattern , override and locale.
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public SimpleDateFormat(String pattern, String override, ULocale loc)
|
||||
{
|
||||
@ -772,8 +773,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
* @param ch The pattern character
|
||||
* @return DateFormat.Field associated with the pattern character
|
||||
*
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
protected DateFormat.Field patternCharToDateFormatField(char ch) {
|
||||
int patternCharIndex = -1;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008, Google, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
**************************************************************************
|
||||
* Copyright (C) 2008-2009, Google, International Business Machines
|
||||
* Corporationand others. All Rights Reserved.
|
||||
**************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
@ -53,8 +53,7 @@ import com.ibm.icu.util.UResourceBundle;
|
||||
* @see TimeUnitAmount
|
||||
* @see TimeUnitFormat
|
||||
* @author markdavis
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public class TimeUnitFormat extends MeasureFormat {
|
||||
|
||||
@ -95,8 +94,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
/**
|
||||
* Create empty format using full name style, for example, "hours".
|
||||
* Use setLocale and/or setFormat to modify.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitFormat() {
|
||||
isReady = false;
|
||||
@ -107,8 +105,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
/**
|
||||
* Create TimeUnitFormat given a ULocale, and using full name style.
|
||||
* @param locale locale of this time unit formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitFormat(ULocale locale) {
|
||||
this(locale, FULL_NAME);
|
||||
@ -117,8 +114,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
/**
|
||||
* Create TimeUnitFormat given a Locale, and using full name style.
|
||||
* @param locale locale of this time unit formatter.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitFormat(Locale locale) {
|
||||
this(locale, FULL_NAME);
|
||||
@ -157,8 +153,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
* Set the locale used for formatting or parsing.
|
||||
* @param locale locale of this time unit formatter.
|
||||
* @return this, for chaining.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitFormat setLocale(ULocale locale) {
|
||||
if ( locale != this.locale ) {
|
||||
@ -172,8 +167,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
* Set the locale used for formatting or parsing.
|
||||
* @param locale locale of this time unit formatter.
|
||||
* @return this, for chaining.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitFormat setLocale(Locale locale) {
|
||||
return setLocale(ULocale.forLocale(locale));
|
||||
@ -183,8 +177,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
* Set the format used for formatting or parsing. If null or not available, use the getNumberInstance(locale).
|
||||
* @param format the number formatter.
|
||||
* @return this, for chaining.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitFormat setNumberFormat(NumberFormat format) {
|
||||
if (format == this.format) {
|
||||
@ -224,8 +217,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
/**
|
||||
* Format a TimeUnitAmount.
|
||||
* @see java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public StringBuffer format(Object obj, StringBuffer toAppendTo,
|
||||
FieldPosition pos) {
|
||||
@ -247,8 +239,7 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
/**
|
||||
* Parse a TimeUnitAmount.
|
||||
* @see java.text.Format#parseObject(java.lang.String, java.text.ParsePosition)
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public Object parseObject(String source, ParsePosition pos) {
|
||||
if (!isReady) {
|
||||
|
@ -1283,6 +1283,7 @@ public class UnicodeSet extends UnicodeFilter implements Freezable {
|
||||
* Remove all strings from this UnicodeSet
|
||||
* @return this object, for chaining
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public final UnicodeSet removeAllStrings() {
|
||||
checkFrozen();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -206,8 +206,7 @@ public class UnicodeSetIterator {
|
||||
|
||||
/**
|
||||
* Gets the current string from the iterator. Only use after calling next(), not nextRange().
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String getString() {
|
||||
if (codepoint != IS_STRING) {
|
||||
|
@ -3156,7 +3156,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable {
|
||||
* subclass
|
||||
* @param locale the locale for which the symbols should be drawn
|
||||
* @return a <code>DateFormat</code> appropriate to this calendar
|
||||
* @draft ICU 3.2
|
||||
* @draft ICU 3.2 (retain)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) {
|
||||
@ -4890,7 +4890,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable {
|
||||
* taking year and era into account. Defaults to 0 (JANUARY) for Gregorian.
|
||||
* @param extendedYear the extendedYear, as returned by handleGetExtendedYear
|
||||
* @return the default month
|
||||
* @draft ICU 3.6
|
||||
* @draft ICU 3.6 (retain)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @see #MONTH
|
||||
*/
|
||||
@ -4905,7 +4905,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable {
|
||||
* @param extendedYear the extendedYear, as returned by handleGetExtendedYear
|
||||
* @param month the month, as returned by getDefaultMonthInYear
|
||||
* @return the default day of the month
|
||||
* @draft ICU 3.6
|
||||
* @draft ICU 3.6 (retain)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @see #DAY_OF_MONTH
|
||||
*/
|
||||
|
@ -148,8 +148,7 @@ public class ChineseCalendar extends Calendar {
|
||||
* Construct a <code>ChineseCalendar</code> with the give date set in the default time zone
|
||||
* with the default locale.
|
||||
* @param date The date to which the new calendar is set.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public ChineseCalendar(Date date) {
|
||||
super();
|
||||
@ -166,8 +165,7 @@ public class ChineseCalendar extends Calendar {
|
||||
* @param isLeapMonth The value used to set the Chiense calendar's (@link #IS_LEAP_MONTH)
|
||||
* time field.
|
||||
* @param date The value used to set the calendar's {@link #DATE DATE} time field.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public ChineseCalendar(int year, int month, int isLeapMonth, int date) {
|
||||
super(TimeZone.getDefault(), ULocale.getDefault());
|
||||
@ -201,8 +199,7 @@ public class ChineseCalendar extends Calendar {
|
||||
* in the calendar.
|
||||
* @param second the value used to set the {@link #SECOND SECOND} time field
|
||||
* in the calendar.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public ChineseCalendar(int year, int month, int isLeapMonth, int date, int hour,
|
||||
int minute, int second)
|
||||
@ -229,8 +226,7 @@ public class ChineseCalendar extends Calendar {
|
||||
* Constructs a <code>ChineseCalendar</code> based on the current time
|
||||
* in the default time zone with the given locale.
|
||||
* @param aLocale The given locale
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public ChineseCalendar(Locale aLocale) {
|
||||
this(TimeZone.getDefault(), aLocale);
|
||||
@ -241,8 +237,7 @@ public class ChineseCalendar extends Calendar {
|
||||
* Construct a <code>ChineseCalendar</code> based on the current time
|
||||
* in the given time zone with the default locale.
|
||||
* @param zone the given time zone
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public ChineseCalendar(TimeZone zone) {
|
||||
super(zone, ULocale.getDefault());
|
||||
@ -266,8 +261,7 @@ public class ChineseCalendar extends Calendar {
|
||||
* in the default time zone with the given locale.
|
||||
*
|
||||
* @param locale the given ulocale
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public ChineseCalendar(ULocale locale) {
|
||||
this(TimeZone.getDefault(), locale);
|
||||
|
@ -151,8 +151,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
||||
* @param loc the locale for which to retrieve currency codes.
|
||||
* @param d the date for which to retrieve currency codes for the given locale.
|
||||
* @return The array of ISO currency codes.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static String[] getAvailableCurrencyCodes(ULocale loc, Date d)
|
||||
{
|
||||
@ -1021,8 +1020,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
||||
* code. This constructor assumes that the code is valid.
|
||||
*
|
||||
* @param theISOCode The iso code used to construct the currency.
|
||||
* @draft ICU 3.4
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 3.4
|
||||
*/
|
||||
protected Currency(String theISOCode) {
|
||||
isoCode = theISOCode;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008, International Business Machines
|
||||
* Copyright (C) 2008-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -13,8 +13,7 @@ import java.io.Serializable;
|
||||
/**
|
||||
* This class represents date interval.
|
||||
* It is a pair of long representing from date 1 to date 2.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public final class DateInterval implements Serializable {
|
||||
|
||||
@ -27,8 +26,7 @@ public final class DateInterval implements Serializable {
|
||||
* Constructor given from date and to date.
|
||||
* @param from The from date in date interval.
|
||||
* @param to The to date in date interval.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public DateInterval(long from, long to)
|
||||
{
|
||||
@ -39,8 +37,7 @@ public final class DateInterval implements Serializable {
|
||||
/**
|
||||
* Get the from date.
|
||||
* @return the from date in dateInterval.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public long getFromDate()
|
||||
{
|
||||
@ -50,8 +47,7 @@ public final class DateInterval implements Serializable {
|
||||
/**
|
||||
* Get the to date.
|
||||
* @return the to date in dateInterval.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public long getToDate()
|
||||
{
|
||||
@ -60,8 +56,7 @@ public final class DateInterval implements Serializable {
|
||||
|
||||
/**
|
||||
* Override equals
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public boolean equals(Object a) {
|
||||
if ( a instanceof DateInterval ) {
|
||||
@ -73,8 +68,7 @@ public final class DateInterval implements Serializable {
|
||||
|
||||
/**
|
||||
* Override hashcode
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public int hashCode() {
|
||||
return (int)(fromDate + toDate);
|
||||
@ -82,8 +76,7 @@ public final class DateInterval implements Serializable {
|
||||
|
||||
/**
|
||||
* Override toString
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String toString() {
|
||||
return String.valueOf(fromDate) + " " + String.valueOf(toDate);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2004-2007, International Business Machines Corporation and *
|
||||
* Copyright (C) 2004-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -73,7 +73,7 @@ import com.ibm.icu.text.SimpleDateFormat;
|
||||
* locale that will ask the services to use the host platform's values).</li>
|
||||
* </ul>
|
||||
*
|
||||
* @draft ICU 3.6
|
||||
* @draft ICU 3.6 (retainAll)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -234,7 +234,7 @@ public class JapaneseCalendar extends GregorianCalendar {
|
||||
* @param extendedYear the extendedYear, as returned by handleGetExtendedYear
|
||||
* @return the default month
|
||||
* @provisional ICU 3.6
|
||||
* @draft ICU 3.6
|
||||
* @draft ICU 3.6 (retain)
|
||||
* @see #MONTH
|
||||
*/
|
||||
protected int getDefaultMonthInYear(int extendedYear)
|
||||
@ -257,7 +257,7 @@ public class JapaneseCalendar extends GregorianCalendar {
|
||||
* @param extendedYear the extendedYear, as returned by handleGetExtendedYear
|
||||
* @param month the month, as returned by getDefaultMonthInYear
|
||||
* @return the default day of the month
|
||||
* @draft ICU 3.6
|
||||
* @draft ICU 3.6 (retain)
|
||||
* @provisional ICU 3.6
|
||||
* @see #DAY_OF_MONTH
|
||||
*/
|
||||
@ -637,8 +637,7 @@ public class JapaneseCalendar extends GregorianCalendar {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public int getActualMaximum(int field) {
|
||||
if (field == YEAR) {
|
||||
|
@ -308,6 +308,7 @@ public final class LocaleData {
|
||||
* Returns LocaleDisplayPattern for this locale, e.g., {0}({1})
|
||||
* @return locale display pattern as a String.
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public String getLocaleDisplayPattern() {
|
||||
if (bundle == null) {
|
||||
@ -323,6 +324,7 @@ public final class LocaleData {
|
||||
* Returns LocaleDisplaySeparator for this locale.
|
||||
* @return locale display separator as a char.
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public String getLocaleSeparator() {
|
||||
if (bundle == null) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008, Google, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
**************************************************************************
|
||||
* Copyright (C) 2008-2009, Google, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.util;
|
||||
|
||||
@ -11,8 +11,7 @@ package com.ibm.icu.util;
|
||||
* @see TimeUnitAmount
|
||||
* @see TimeUnit
|
||||
* @author markdavis
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public class TimeUnit extends MeasureUnit {
|
||||
/**
|
||||
@ -25,8 +24,7 @@ public class TimeUnit extends MeasureUnit {
|
||||
|
||||
/**
|
||||
* Constant value for supported time unit.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static TimeUnit
|
||||
SECOND = new TimeUnit("second"),
|
||||
@ -44,8 +42,7 @@ public class TimeUnit extends MeasureUnit {
|
||||
|
||||
/**
|
||||
* @return the available values
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static TimeUnit[] values() {
|
||||
return (TimeUnit[])values.clone();
|
||||
@ -55,8 +52,7 @@ public class TimeUnit extends MeasureUnit {
|
||||
* A string representation for debugging.
|
||||
* It is for debugging purpose. The value might change.
|
||||
* Please do not count on the value.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String toString() {
|
||||
return name;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008, Google, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
**************************************************************************
|
||||
* Copyright (C) 2008-2009, Google, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.util;
|
||||
|
||||
@ -12,15 +12,13 @@ package com.ibm.icu.util;
|
||||
* @see TimeUnitAmount
|
||||
* @see com.ibm.icu.text.TimeUnitFormat
|
||||
* @author markdavis
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public class TimeUnitAmount extends Measure {
|
||||
|
||||
/**
|
||||
* Create from a number and unit.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitAmount(Number number, TimeUnit unit) {
|
||||
super(number, unit);
|
||||
@ -28,8 +26,7 @@ public class TimeUnitAmount extends Measure {
|
||||
|
||||
/**
|
||||
* Create from a number and unit.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnitAmount(double number, TimeUnit unit) {
|
||||
super(new Double(number), unit);
|
||||
@ -37,8 +34,7 @@ public class TimeUnitAmount extends Measure {
|
||||
|
||||
/**
|
||||
* Get the unit (convenience to avoid cast).
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public TimeUnit getTimeUnit() {
|
||||
return (TimeUnit) getUnit();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @(#)TimeZone.java 1.51 00/01/19
|
||||
*
|
||||
* Copyright (C) 1996-2008, International Business Machines
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*/
|
||||
|
||||
@ -114,16 +114,14 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
* A time zone implementation type indicating ICU's own TimeZone used by
|
||||
* <code>getTimeZone</code>, <code>setDefaultTimeZoneType</code>
|
||||
* and <code>getDefaultTimeZoneType</code>.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int TIMEZONE_ICU = 0;
|
||||
/**
|
||||
* A time zone implementation type indicating JDK TimeZone used by
|
||||
* <code>getTimeZone</code>, <code>setDefaultTimeZoneType</code>
|
||||
* and <code>getDefaultTimeZoneType</code>.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static final int TIMEZONE_JDK = 1;
|
||||
|
||||
@ -530,8 +528,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
* @param type Timezone type, either <code>TIMEZONE_ICU</code> or <code>TIMEZONE_JDK</code>.
|
||||
* @return the specified <code>TimeZone</code>, or the GMT zone if the given ID
|
||||
* cannot be understood.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static synchronized TimeZone getTimeZone(String ID, int type) {
|
||||
TimeZone result;
|
||||
@ -564,8 +561,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
/**
|
||||
* Sets the default timezone type used by <code>getTimeZone</code>.
|
||||
* @param type Timezone type, either <code>TIMEZONE_ICU</code> or <code>TIMEZONE_JDK</code>.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static synchronized void setDefaultTimeZoneType(int type) {
|
||||
if (type != TIMEZONE_ICU && type != TIMEZONE_JDK) {
|
||||
@ -577,8 +573,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
/**
|
||||
* Returns the default timezone type currently used.
|
||||
* @return The default timezone type, either <code>TIMEZONE_ICU</code> or <code>TIMEZONE_JDK</code>.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static int getDefaultTimeZoneType() {
|
||||
return TZ_IMPL;
|
||||
@ -805,8 +800,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
* in normalized format for the given timezone ID. When the given timezone ID
|
||||
* is neither a known system time zone ID nor a valid custom timezone ID,
|
||||
* null is returned.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static String getCanonicalID(String id) {
|
||||
return getCanonicalID(id, null);
|
||||
@ -822,8 +816,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
* in normalized format for the given timezone ID. When the given timezone ID
|
||||
* is neither a known system time zone ID nor a valid custom timezone ID,
|
||||
* null is returned.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static String getCanonicalID(String id, boolean[] isSystemID) {
|
||||
String canonicalID = null;
|
||||
|
@ -1006,6 +1006,7 @@ public final class ULocale implements Serializable {
|
||||
/**
|
||||
* Returns the current CLDR version
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static VersionInfo getCLDRVersion() {
|
||||
// fetching this data should be idempotent.
|
||||
@ -2696,8 +2697,7 @@ public final class ULocale implements Serializable {
|
||||
* values are "left-to-right", "right-to-left", "top-to-bottom" or
|
||||
* "bottom-to-top".
|
||||
* @return The locale's layout orientation for characters.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String getCharacterOrientation() {
|
||||
return getTableString("layout", null, "characters", getName());
|
||||
@ -2708,8 +2708,7 @@ public final class ULocale implements Serializable {
|
||||
* values are "left-to-right", "right-to-left", "top-to-bottom" or
|
||||
* "bottom-to-top".
|
||||
* @return The locale's layout orientation for lines.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public String getLineOrientation() {
|
||||
return getTableString("layout", null, "lines", getName());
|
||||
@ -3179,8 +3178,7 @@ public final class ULocale implements Serializable {
|
||||
*
|
||||
* @param loc The ULocale to maximize
|
||||
* @return The maximized ULocale instance.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static ULocale
|
||||
addLikelySubtags(ULocale loc)
|
||||
@ -3230,8 +3228,7 @@ public final class ULocale implements Serializable {
|
||||
*
|
||||
* @param loc The ULocale to minimize
|
||||
* @return The minimized ULocale instance.
|
||||
* @draft ICU 4.0
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 4.0
|
||||
*/
|
||||
public static ULocale
|
||||
minimizeSubtags(ULocale loc)
|
||||
@ -3986,7 +3983,7 @@ public final class ULocale implements Serializable {
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static class Builder {
|
||||
public static final class Builder {
|
||||
|
||||
private InternalLocaleBuilder _locbld = new InternalLocaleBuilder();
|
||||
|
||||
|
@ -408,6 +408,7 @@ public final class VersionInfo implements Comparable
|
||||
* Greater than 0 if the argument is a VersionInfo object that
|
||||
* has version information less than this object.
|
||||
* @draft ICU 4.2
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public int compareTo(Object other) {
|
||||
return compareTo((VersionInfo)other);
|
||||
|
Loading…
Reference in New Issue
Block a user