mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-3888 ensure all icu4j draft apis are marked deprecated
X-SVN-Rev: 15982
This commit is contained in:
parent
661a65289b
commit
f9149e41b4
58 changed files with 1972 additions and 1118 deletions
|
@ -304,6 +304,9 @@ public class CheckTags {
|
|||
void doTags(ProgramElementDoc doc) {
|
||||
Tag[] tags = doc.tags();
|
||||
boolean foundRequiredTag = false;
|
||||
boolean foundDraftTag = false;
|
||||
boolean foundDeprecatedTag = false;
|
||||
|
||||
for (int i = 0; i < tags.length; ++i) {
|
||||
Tag tag = tags[i];
|
||||
|
||||
|
@ -320,14 +323,25 @@ public class CheckTags {
|
|||
break;
|
||||
|
||||
case DRAFT:
|
||||
foundRequiredTag = true;
|
||||
foundDraftTag = true;
|
||||
if (tag.text().indexOf("ICU 2.4") != -1) {
|
||||
foundRequiredTag = true;
|
||||
tagErr(tag);
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
if (tag.text().indexOf("ICU") != 0) {
|
||||
tagErr(tag);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case DEPRECATED:
|
||||
foundDeprecatedTag = true;
|
||||
if (tag.text().indexOf("ICU") == 0) {
|
||||
foundRequiredTag = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case OBSOLETE:
|
||||
if (tag.text().indexOf("ICU") != 0) {
|
||||
tagErr(tag);
|
||||
|
@ -371,5 +385,8 @@ public class CheckTags {
|
|||
if (!foundRequiredTag) {
|
||||
errln("missing required tag [" + /*doc.position() +*/ "]");
|
||||
}
|
||||
if (foundDraftTag && !foundDeprecatedTag) {
|
||||
errln("draft tag missing deprecated");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.ibm.icu.text.UTF16;
|
|||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Builder lass to manipulate and generate a trie.
|
||||
* Builder class to manipulate and generate a trie.
|
||||
* This is useful for ICU data in primitive types.
|
||||
* Provides a compact way to store information that is indexed by Unicode
|
||||
* values, such as character properties, types, keyboard values, etc. This is
|
||||
|
@ -30,15 +30,15 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class IntTrieBuilder extends TrieBuilder
|
||||
{
|
||||
// public constructor ----------------------------------------------
|
||||
|
||||
/**
|
||||
* Copy constructor
|
||||
*/
|
||||
public IntTrieBuilder(IntTrieBuilder table)
|
||||
// public constructor ----------------------------------------------
|
||||
|
||||
/**
|
||||
* Copy constructor
|
||||
*/
|
||||
public IntTrieBuilder(IntTrieBuilder table)
|
||||
{
|
||||
super(table);
|
||||
m_data_ = new int[m_dataCapacity_];
|
||||
super(table);
|
||||
m_data_ = new int[m_dataCapacity_];
|
||||
System.arraycopy(table.m_data_, 0, m_data_, 0, m_dataLength_);
|
||||
m_initialValue_ = table.m_initialValue_;
|
||||
m_leadUnitValue_ = table.m_leadUnitValue_;
|
||||
|
@ -56,106 +56,106 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
int initialvalue, int leadunitvalue,
|
||||
boolean latin1linear)
|
||||
{
|
||||
super();
|
||||
if (maxdatalength < DATA_BLOCK_LENGTH || (latin1linear
|
||||
&& maxdatalength < 1024)) {
|
||||
throw new IllegalArgumentException(
|
||||
"Argument maxdatalength is too small");
|
||||
}
|
||||
|
||||
if (aliasdata != null) {
|
||||
m_data_ = aliasdata;
|
||||
}
|
||||
else {
|
||||
m_data_ = new int[maxdatalength];
|
||||
}
|
||||
|
||||
// preallocate and reset the first data block (block index 0)
|
||||
int j = DATA_BLOCK_LENGTH;
|
||||
|
||||
if (latin1linear) {
|
||||
// preallocate and reset the first block (number 0) and Latin-1
|
||||
// (U+0000..U+00ff) after that made sure above that
|
||||
// maxDataLength >= 1024
|
||||
// set indexes to point to consecutive data blocks
|
||||
int i = 0;
|
||||
do {
|
||||
// do this at least for trie->index[0] even if that block is
|
||||
// only partly used for Latin-1
|
||||
m_index_[i ++] = j;
|
||||
j += DATA_BLOCK_LENGTH;
|
||||
} while (i < (256 >> SHIFT_));
|
||||
}
|
||||
|
||||
super();
|
||||
if (maxdatalength < DATA_BLOCK_LENGTH || (latin1linear
|
||||
&& maxdatalength < 1024)) {
|
||||
throw new IllegalArgumentException(
|
||||
"Argument maxdatalength is too small");
|
||||
}
|
||||
|
||||
if (aliasdata != null) {
|
||||
m_data_ = aliasdata;
|
||||
}
|
||||
else {
|
||||
m_data_ = new int[maxdatalength];
|
||||
}
|
||||
|
||||
// preallocate and reset the first data block (block index 0)
|
||||
int j = DATA_BLOCK_LENGTH;
|
||||
|
||||
if (latin1linear) {
|
||||
// preallocate and reset the first block (number 0) and Latin-1
|
||||
// (U+0000..U+00ff) after that made sure above that
|
||||
// maxDataLength >= 1024
|
||||
// set indexes to point to consecutive data blocks
|
||||
int i = 0;
|
||||
do {
|
||||
// do this at least for trie->index[0] even if that block is
|
||||
// only partly used for Latin-1
|
||||
m_index_[i ++] = j;
|
||||
j += DATA_BLOCK_LENGTH;
|
||||
} while (i < (256 >> SHIFT_));
|
||||
}
|
||||
|
||||
m_dataLength_ = j;
|
||||
// reset the initially allocated blocks to the initial value
|
||||
// reset the initially allocated blocks to the initial value
|
||||
Arrays.fill(m_data_, 0, m_dataLength_, initialvalue);
|
||||
m_initialValue_ = initialvalue;
|
||||
m_initialValue_ = initialvalue;
|
||||
m_leadUnitValue_ = leadunitvalue;
|
||||
m_dataCapacity_ = maxdatalength;
|
||||
m_isLatin1Linear_ = latin1linear;
|
||||
m_isCompacted_ = false;
|
||||
}
|
||||
m_dataCapacity_ = maxdatalength;
|
||||
m_isLatin1Linear_ = latin1linear;
|
||||
m_isCompacted_ = false;
|
||||
}
|
||||
|
||||
// public methods -------------------------------------------------------
|
||||
// public methods -------------------------------------------------------
|
||||
|
||||
/*public final void print()
|
||||
{
|
||||
int i = 0;
|
||||
int oldvalue = m_index_[i];
|
||||
int count = 0;
|
||||
System.out.println("index length " + m_indexLength_
|
||||
+ " --------------------------");
|
||||
while (i < m_indexLength_) {
|
||||
if (m_index_[i] != oldvalue) {
|
||||
System.out.println("index has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
count = 0;
|
||||
oldvalue = m_index_[i];
|
||||
}
|
||||
count ++;
|
||||
i ++;
|
||||
}
|
||||
System.out.println("index has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
i = 0;
|
||||
oldvalue = m_data_[i];
|
||||
count = 0;
|
||||
System.out.println("data length " + m_dataLength_
|
||||
+ " --------------------------");
|
||||
while (i < m_dataLength_) {
|
||||
if (m_data_[i] != oldvalue) {
|
||||
if ((oldvalue & 0xf1000000) == 0xf1000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x320;
|
||||
oldvalue = 0xf1000000 | temp;
|
||||
}
|
||||
if ((oldvalue & 0xf2000000) == 0xf2000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x14a;
|
||||
oldvalue = 0xf2000000 | temp;
|
||||
}
|
||||
System.out.println("data has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
count = 0;
|
||||
oldvalue = m_data_[i];
|
||||
}
|
||||
count ++;
|
||||
i ++;
|
||||
}
|
||||
if ((oldvalue & 0xf1000000) == 0xf1000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x320;
|
||||
oldvalue = 0xf1000000 | temp;
|
||||
}
|
||||
if ((oldvalue & 0xf2000000) == 0xf2000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x14a;
|
||||
oldvalue = 0xf2000000 | temp;
|
||||
}
|
||||
System.out.println("data has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
}
|
||||
{
|
||||
int i = 0;
|
||||
int oldvalue = m_index_[i];
|
||||
int count = 0;
|
||||
System.out.println("index length " + m_indexLength_
|
||||
+ " --------------------------");
|
||||
while (i < m_indexLength_) {
|
||||
if (m_index_[i] != oldvalue) {
|
||||
System.out.println("index has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
count = 0;
|
||||
oldvalue = m_index_[i];
|
||||
}
|
||||
count ++;
|
||||
i ++;
|
||||
}
|
||||
System.out.println("index has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
i = 0;
|
||||
oldvalue = m_data_[i];
|
||||
count = 0;
|
||||
System.out.println("data length " + m_dataLength_
|
||||
+ " --------------------------");
|
||||
while (i < m_dataLength_) {
|
||||
if (m_data_[i] != oldvalue) {
|
||||
if ((oldvalue & 0xf1000000) == 0xf1000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x320;
|
||||
oldvalue = 0xf1000000 | temp;
|
||||
}
|
||||
if ((oldvalue & 0xf2000000) == 0xf2000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x14a;
|
||||
oldvalue = 0xf2000000 | temp;
|
||||
}
|
||||
System.out.println("data has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
count = 0;
|
||||
oldvalue = m_data_[i];
|
||||
}
|
||||
count ++;
|
||||
i ++;
|
||||
}
|
||||
if ((oldvalue & 0xf1000000) == 0xf1000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x320;
|
||||
oldvalue = 0xf1000000 | temp;
|
||||
}
|
||||
if ((oldvalue & 0xf2000000) == 0xf2000000) {
|
||||
int temp = oldvalue & 0xffffff;
|
||||
temp += 0x14a;
|
||||
oldvalue = 0xf2000000 | temp;
|
||||
}
|
||||
System.out.println("data has " + count + " counts of "
|
||||
+ Integer.toHexString(oldvalue));
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* Gets a 32 bit data from the table data
|
||||
|
@ -349,16 +349,16 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
return true;
|
||||
}
|
||||
|
||||
// protected data member ------------------------------------------------
|
||||
|
||||
protected int m_data_[];
|
||||
protected int m_initialValue_;
|
||||
// protected data member ------------------------------------------------
|
||||
|
||||
protected int m_data_[];
|
||||
protected int m_initialValue_;
|
||||
|
||||
// private data member ------------------------------------------------
|
||||
|
||||
private int m_leadUnitValue_;
|
||||
|
||||
// private methods ------------------------------------------------------
|
||||
// private methods ------------------------------------------------------
|
||||
|
||||
private int allocDataBlock()
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
// search for an identical block
|
||||
if (start >= overlapStart) {
|
||||
int i = findSameDataBlock(m_data_, newStart, start,
|
||||
overlap ? DATA_GRANULARITY_ : DATA_BLOCK_LENGTH);
|
||||
overlap ? DATA_GRANULARITY_ : DATA_BLOCK_LENGTH);
|
||||
if (i >= 0) {
|
||||
// found an identical block, set the other block's index
|
||||
// value for the current block
|
||||
|
@ -462,17 +462,17 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
int x = m_data_[start];
|
||||
int i = 0;
|
||||
if (x == m_data_[prevEnd] && overlap && start >= overlapStart)
|
||||
{
|
||||
// overlap by at least one
|
||||
for (i = 1; i < DATA_BLOCK_LENGTH
|
||||
&& x == m_data_[start + i]
|
||||
&& x == m_data_[prevEnd - i]; ++ i)
|
||||
{
|
||||
}
|
||||
// overlap by at least one
|
||||
for (i = 1; i < DATA_BLOCK_LENGTH
|
||||
&& x == m_data_[start + i]
|
||||
&& x == m_data_[prevEnd - i]; ++ i)
|
||||
{
|
||||
}
|
||||
|
||||
// overlap by i, rounded down for the data block granularity
|
||||
i &= ~(DATA_GRANULARITY_ - 1);
|
||||
}
|
||||
// overlap by i, rounded down for the data block granularity
|
||||
i &= ~(DATA_GRANULARITY_ - 1);
|
||||
}
|
||||
if (i > 0) {
|
||||
// some overlap
|
||||
m_map_[start >>> SHIFT_] = newStart - i;
|
||||
|
@ -512,7 +512,7 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
* @param step
|
||||
*/
|
||||
private static final int findSameDataBlock(int data[], int dataLength,
|
||||
int otherBlock, int step)
|
||||
int otherBlock, int step)
|
||||
{
|
||||
// ensure that we do not even partially get past dataLength
|
||||
dataLength -= DATA_BLOCK_LENGTH;
|
||||
|
@ -598,12 +598,12 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
// point, set it for the lead surrogate code unit
|
||||
|
||||
int value = manipulate.getFoldedValue(c,
|
||||
block + SURROGATE_BLOCK_COUNT_);
|
||||
block + SURROGATE_BLOCK_COUNT_);
|
||||
if (value != getValue(UTF16.getLeadSurrogate(c))) {
|
||||
if (!setValue(UTF16.getLeadSurrogate(c), value)) {
|
||||
// data table overflow
|
||||
throw new ArrayIndexOutOfBoundsException(
|
||||
"Data table overflow");
|
||||
"Data table overflow");
|
||||
}
|
||||
// if we did not find an identical index block...
|
||||
if (block == indexLength) {
|
||||
|
@ -666,4 +666,4 @@ public class IntTrieBuilder extends TrieBuilder
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,49 +29,49 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class TrieBuilder
|
||||
{
|
||||
// public data member ----------------------------------------------
|
||||
|
||||
/**
|
||||
* Number of data values in a stage 2 (data array) block. 2, 4, 8, ..,
|
||||
* 0x200
|
||||
*/
|
||||
// public data member ----------------------------------------------
|
||||
|
||||
/**
|
||||
* Number of data values in a stage 2 (data array) block. 2, 4, 8, ..,
|
||||
* 0x200
|
||||
*/
|
||||
public static final int DATA_BLOCK_LENGTH = 1 << Trie.INDEX_STAGE_1_SHIFT_;
|
||||
|
||||
// public class declaration ----------------------------------------
|
||||
// public class declaration ----------------------------------------
|
||||
|
||||
/**
|
||||
* Character data in com.ibm.impl.Trie have different user-specified format
|
||||
* for different purposes.
|
||||
* This interface specifies methods to be implemented in order for
|
||||
* com.ibm.impl.Trie, to surrogate offset information encapsulated within
|
||||
* the data.
|
||||
* @draft 2.2
|
||||
*/
|
||||
* Character data in com.ibm.impl.Trie have different user-specified format
|
||||
* for different purposes.
|
||||
* This interface specifies methods to be implemented in order for
|
||||
* com.ibm.impl.Trie, to surrogate offset information encapsulated within
|
||||
* the data.
|
||||
* @draft 2.2
|
||||
*/
|
||||
public static interface DataManipulate
|
||||
{
|
||||
/**
|
||||
* Build-time trie callback function, used with serialize().
|
||||
* This function calculates a lead surrogate's value including a
|
||||
* folding offset from the 1024 supplementary code points
|
||||
* [start..start+1024[ .
|
||||
* It is U+10000 <= start <= U+10fc00 and (start&0x3ff)==0.
|
||||
* The folding offset is provided by the caller.
|
||||
* It is offset=UTRIE_BMP_INDEX_LENGTH+n*UTRIE_SURROGATE_BLOCK_COUNT
|
||||
* with n=0..1023.
|
||||
* Instead of the offset itself, n can be stored in 10 bits - or fewer
|
||||
* if it can be assumed that few lead surrogates have associated data.
|
||||
* The returned value must be
|
||||
* - not zero if and only if there is relevant data for the
|
||||
* corresponding 1024 supplementary code points
|
||||
* - such that UTrie.getFoldingOffset(UNewTrieGetFoldedValue(...,
|
||||
* offset))==offset
|
||||
* Build-time trie callback function, used with serialize().
|
||||
* This function calculates a lead surrogate's value including a
|
||||
* folding offset from the 1024 supplementary code points
|
||||
* [start..start+1024[ .
|
||||
* It is U+10000 <= start <= U+10fc00 and (start&0x3ff)==0.
|
||||
* The folding offset is provided by the caller.
|
||||
* It is offset=UTRIE_BMP_INDEX_LENGTH+n*UTRIE_SURROGATE_BLOCK_COUNT
|
||||
* with n=0..1023.
|
||||
* Instead of the offset itself, n can be stored in 10 bits - or fewer
|
||||
* if it can be assumed that few lead surrogates have associated data.
|
||||
* The returned value must be
|
||||
* - not zero if and only if there is relevant data for the
|
||||
* corresponding 1024 supplementary code points
|
||||
* - such that UTrie.getFoldingOffset(UNewTrieGetFoldedValue(...,
|
||||
* offset))==offset
|
||||
* @return a folded value, or 0 if there is no relevant data for the
|
||||
* lead surrogate.
|
||||
*/
|
||||
public int getFoldedValue(int start, int offset);
|
||||
}
|
||||
|
||||
// public methods ----------------------------------------------------
|
||||
// public methods ----------------------------------------------------
|
||||
|
||||
/**
|
||||
* Checks if the character belongs to a zero block in the trie
|
||||
|
@ -91,30 +91,30 @@ public class TrieBuilder
|
|||
|
||||
// package private method -----------------------------------------------
|
||||
|
||||
// protected data member -----------------------------------------------
|
||||
|
||||
/**
|
||||
* Index values at build-time are 32 bits wide for easier processing.
|
||||
* Bit 31 is set if the data block is used by multiple index values
|
||||
* (from setRange()).
|
||||
*/
|
||||
protected int m_index_[];
|
||||
protected int m_indexLength_;
|
||||
protected int m_dataCapacity_;
|
||||
protected int m_dataLength_;
|
||||
protected boolean m_isLatin1Linear_;
|
||||
protected boolean m_isCompacted_;
|
||||
// protected data member -----------------------------------------------
|
||||
|
||||
/**
|
||||
* Index values at build-time are 32 bits wide for easier processing.
|
||||
* Bit 31 is set if the data block is used by multiple index values
|
||||
* (from setRange()).
|
||||
*/
|
||||
protected int m_index_[];
|
||||
protected int m_indexLength_;
|
||||
protected int m_dataCapacity_;
|
||||
protected int m_dataLength_;
|
||||
protected boolean m_isLatin1Linear_;
|
||||
protected boolean m_isCompacted_;
|
||||
/**
|
||||
* Map of adjusted indexes, used in utrie_compact().
|
||||
* Maps from original indexes to new ones.
|
||||
*/
|
||||
protected int m_map_[];
|
||||
|
||||
/**
|
||||
* Shift size for shifting right the input index. 1..9
|
||||
*/
|
||||
protected static final int SHIFT_ = Trie.INDEX_STAGE_1_SHIFT_;
|
||||
/**
|
||||
* Map of adjusted indexes, used in utrie_compact().
|
||||
* Maps from original indexes to new ones.
|
||||
*/
|
||||
protected int m_map_[];
|
||||
|
||||
/**
|
||||
* Shift size for shifting right the input index. 1..9
|
||||
*/
|
||||
protected static final int SHIFT_ = Trie.INDEX_STAGE_1_SHIFT_;
|
||||
/**
|
||||
* Length of the index (stage 1) array before folding.
|
||||
* Maximum number of Unicode code points (0x110000) shifted right by
|
||||
* SHIFT.
|
||||
|
@ -123,7 +123,7 @@ public class TrieBuilder
|
|||
/**
|
||||
* Length of the BMP portion of the index (stage 1) array.
|
||||
*/
|
||||
protected static final int BMP_INDEX_LENGTH_ = 0x10000 >> SHIFT_;
|
||||
protected static final int BMP_INDEX_LENGTH_ = 0x10000 >> SHIFT_;
|
||||
/**
|
||||
* Number of index (stage 1) entries per lead surrogate.
|
||||
* Same as number of indexe entries for 1024 trail surrogates,
|
||||
|
@ -132,10 +132,10 @@ public class TrieBuilder
|
|||
* index table lookups.
|
||||
*/
|
||||
protected static final int SURROGATE_BLOCK_COUNT_ = 1 << (10 - SHIFT_);
|
||||
/**
|
||||
* Mask for getting the lower bits from the input index.
|
||||
* DATA_BLOCK_LENGTH - 1.
|
||||
*/
|
||||
/**
|
||||
* Mask for getting the lower bits from the input index.
|
||||
* DATA_BLOCK_LENGTH - 1.
|
||||
*/
|
||||
protected static final int MASK_ = Trie.INDEX_STAGE_3_MASK_;
|
||||
/**
|
||||
* Shift size for shifting left the index array values.
|
||||
|
@ -146,11 +146,11 @@ public class TrieBuilder
|
|||
*/
|
||||
protected static final int INDEX_SHIFT_ = Trie.INDEX_STAGE_2_SHIFT_;
|
||||
/**
|
||||
* Maximum length of the runtime data (stage 2) array.
|
||||
* Limited by 16-bit index values that are left-shifted by INDEX_SHIFT_.
|
||||
*/
|
||||
protected static final int MAX_DATA_LENGTH_ = (0x10000 << INDEX_SHIFT_);
|
||||
/**
|
||||
* Maximum length of the runtime data (stage 2) array.
|
||||
* Limited by 16-bit index values that are left-shifted by INDEX_SHIFT_.
|
||||
*/
|
||||
protected static final int MAX_DATA_LENGTH_ = (0x10000 << INDEX_SHIFT_);
|
||||
/**
|
||||
* Shifting to position the index value in options
|
||||
*/
|
||||
protected static final int OPTIONS_INDEX_SHIFT_ = 4;
|
||||
|
@ -172,13 +172,13 @@ public class TrieBuilder
|
|||
// protected constructor ----------------------------------------------
|
||||
|
||||
protected TrieBuilder()
|
||||
{
|
||||
m_index_ = new int[MAX_INDEX_LENGTH_];
|
||||
m_map_ = new int[MAX_BUILD_TIME_DATA_LENGTH_ >> SHIFT_];
|
||||
m_isLatin1Linear_ = false;
|
||||
m_isCompacted_ = false;
|
||||
m_indexLength_ = MAX_INDEX_LENGTH_;
|
||||
}
|
||||
{
|
||||
m_index_ = new int[MAX_INDEX_LENGTH_];
|
||||
m_map_ = new int[MAX_BUILD_TIME_DATA_LENGTH_ >> SHIFT_];
|
||||
m_isLatin1Linear_ = false;
|
||||
m_isCompacted_ = false;
|
||||
m_indexLength_ = MAX_INDEX_LENGTH_;
|
||||
}
|
||||
|
||||
protected TrieBuilder(TrieBuilder table)
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ public class TrieBuilder
|
|||
int otherBlock)
|
||||
{
|
||||
for (int block = BMP_INDEX_LENGTH_; block < indexLength;
|
||||
block += SURROGATE_BLOCK_COUNT_) {
|
||||
block += SURROGATE_BLOCK_COUNT_) {
|
||||
int i = 0;
|
||||
for (; i < SURROGATE_BLOCK_COUNT_; ++ i) {
|
||||
if (index[block + i] != index[otherBlock + i]) {
|
||||
|
@ -242,14 +242,14 @@ public class TrieBuilder
|
|||
return indexLength;
|
||||
}
|
||||
|
||||
// private data member ------------------------------------------------
|
||||
|
||||
/**
|
||||
* Maximum length of the build-time data (stage 2) array.
|
||||
* The maximum length is 0x110000 + DATA_BLOCK_LENGTH + 0x400.
|
||||
* (Number of Unicode code points + one all-initial-value block +
|
||||
* possible duplicate entries for 1024 lead surrogates.)
|
||||
*/
|
||||
private static final int MAX_BUILD_TIME_DATA_LENGTH_ =
|
||||
0x110000 + DATA_BLOCK_LENGTH + 0x400;
|
||||
}
|
||||
// private data member ------------------------------------------------
|
||||
|
||||
/**
|
||||
* Maximum length of the build-time data (stage 2) array.
|
||||
* The maximum length is 0x110000 + DATA_BLOCK_LENGTH + 0x400.
|
||||
* (Number of Unicode code points + one all-initial-value block +
|
||||
* possible duplicate entries for 1024 lead surrogates.)
|
||||
*/
|
||||
private static final int MAX_BUILD_TIME_DATA_LENGTH_ =
|
||||
0x110000 + DATA_BLOCK_LENGTH + 0x400;
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock NO_BLOCK
|
||||
= new UnicodeBlock("NO_BLOCK", 0);
|
||||
|
@ -608,6 +609,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
/**
|
||||
* Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement".
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock CYRILLIC_SUPPLEMENT
|
||||
= new UnicodeBlock("CYRILLIC_SUPPLEMENT", 97);
|
||||
|
@ -678,79 +680,94 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock LIMBU
|
||||
= new UnicodeBlock("LIMBU", 111);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock TAI_LE
|
||||
= new UnicodeBlock("TAI LE", 112);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock KHMER_SYMBOLS
|
||||
= new UnicodeBlock("KHMER SYMBOLS", 113);
|
||||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock PHONETIC_EXTENSIONS
|
||||
= new UnicodeBlock("PHONETIC EXTENSIONS", 114);
|
||||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS
|
||||
= new UnicodeBlock("MISCELLANEOUS_SYMBOLS_AND_ARROWS", 115);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock YIJING_HEXAGRAM_SYMBOLS
|
||||
= new UnicodeBlock("YIJING_HEXAGRAM_SYMBOLS", 116);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock LINEAR_B_SYLLABARY
|
||||
= new UnicodeBlock("LINEAR_B_SYLLABARY", 117);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock LINEAR_B_IDEOGRAMS
|
||||
= new UnicodeBlock("LINEAR_B_IDEOGRAMS", 118);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock AEGEAN_NUMBERS
|
||||
= new UnicodeBlock("AEGEAN_NUMBERS", 119);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock UGARITIC
|
||||
= new UnicodeBlock("UGARITIC", 120);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock SHAVIAN
|
||||
= new UnicodeBlock("SHAVIAN", 121);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock OSMANYA
|
||||
= new UnicodeBlock("OSMANYA", 122);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock CYPRIOT_SYLLABARY
|
||||
= new UnicodeBlock("CYPRIOT_SYLLABARY", 123);
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock TAI_XUAN_JING_SYMBOLS
|
||||
= new UnicodeBlock("TAI_XUAN_JING_SYMBOLS", 124);
|
||||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT
|
||||
= new UnicodeBlock("VARIATION_SELECTORS_SUPPLEMENT", 125);
|
||||
|
@ -1180,7 +1197,9 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
/**
|
||||
* Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement".
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
|
||||
public static final int CYRILLIC_SUPPLEMENT_ID = 97;
|
||||
/**
|
||||
* @stable ICU 2.4
|
||||
|
@ -1235,35 +1254,80 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
*/
|
||||
public static final int SUPPLEMENTARY_PRIVATE_USE_AREA_B_ID = 110;
|
||||
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LIMBU_ID = 111; /*[1900]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TAI_LE_ID = 112; /*[1950]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int KHMER_SYMBOLS_ID = 113; /*[19E0]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int PHONETIC_EXTENSIONS_ID = 114; /*[1D00]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int MISCELLANEOUS_SYMBOLS_AND_ARROWS_ID = 115; /*[2B00]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int YIJING_HEXAGRAM_SYMBOLS_ID = 116; /*[4DC0]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LINEAR_B_SYLLABARY_ID = 117; /*[10000]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LINEAR_B_IDEOGRAMS_ID = 118; /*[10080]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int AEGEAN_NUMBERS_ID = 119; /*[10100]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int UGARITIC_ID = 120; /*[10380]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SHAVIAN_ID = 121; /*[10450]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int OSMANYA_ID = 122; /*[10480]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int CYPRIOT_SYLLABARY_ID = 123; /*[10800]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TAI_XUAN_JING_SYMBOLS_ID = 124; /*[1D300]*/
|
||||
/** @draft ICU 2.6 */
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int VARIATION_SELECTORS_SUPPLEMENT_ID = 125; /*[E0100]*/
|
||||
/**
|
||||
* @stable ICU 2.4
|
||||
|
@ -1330,6 +1394,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @return the UnicodeBlock with that name
|
||||
* @throws IllegalArgumentException if the blockName could not be matched
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UnicodeBlock forName(String blockName) {
|
||||
Map m = null;
|
||||
|
@ -1835,14 +1900,17 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
public static final int ZAIN = 50;
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FE = 51;
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int KHAPH = 52;
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ZHAIN =53;
|
||||
/**
|
||||
|
@ -1926,6 +1994,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
/**
|
||||
* Renamed from the misspelled "inseperable" in Unicode 4.0.1.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int INSEPARABLE = 15;
|
||||
/**
|
||||
|
@ -1983,11 +2052,13 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NEXT_LINE = 29; /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */
|
||||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_JOINER = 30; /*[WJ]*/
|
||||
|
||||
|
@ -2031,35 +2102,43 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
*
|
||||
* @see UProperty#HANGUL_SYLLABLE_TYPE
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static interface HangulSyllableType
|
||||
{
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NOT_APPLICABLE = 0; /*[NA]*/ /*See note !!*/
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LEADING_JAMO = 1; /*[L]*/
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int VOWEL_JAMO = 2; /*[V]*/
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TRAILING_JAMO = 3; /*[T]*/
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LV_SYLLABLE = 4; /*[LV]*/
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LVT_SYLLABLE = 5; /*[LVT]*/
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int COUNT = 6;
|
||||
}
|
||||
|
@ -3736,12 +3815,14 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
/**
|
||||
* Option value for case folding: use default mappings defined in CaseFolding.txt.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FOLD_CASE_DEFAULT = 0x0000;
|
||||
/**
|
||||
* Option value for case folding: exclude the mappings for dotted I
|
||||
* and dotless i marked with 'I' in CaseFolding.txt.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FOLD_CASE_EXCLUDE_SPECIAL_I = 0x0001;
|
||||
|
||||
|
@ -3759,6 +3840,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* any; otherwise the character itself.
|
||||
* @see #foldCase(String, boolean)
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
/*
|
||||
* Issue for canonical caseless match (UAX #21):
|
||||
|
@ -3849,6 +3931,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* any; otherwise the character itself.
|
||||
* @see #foldCase(int, boolean)
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final String foldCase(String str, int options){
|
||||
int size = str.length();
|
||||
|
@ -4489,6 +4572,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
/**
|
||||
* Provide the java.lang.Character forDigit API, for convenience.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static char forDigit(int digit, int radix) {
|
||||
return java.lang.Character.forDigit(digit, radix);
|
||||
|
@ -4500,6 +4584,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#LEAD_SURROGATE_MIN_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char MIN_HIGH_SURROGATE = UTF16.LEAD_SURROGATE_MIN_VALUE;
|
||||
|
||||
|
@ -4507,6 +4592,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#LEAD_SURROGATE_MAX_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char MAX_HIGH_SURROGATE = UTF16.LEAD_SURROGATE_MAX_VALUE;
|
||||
|
||||
|
@ -4514,6 +4600,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#TRAIL_SURROGATE_MIN_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char MIN_LOW_SURROGATE = UTF16.TRAIL_SURROGATE_MIN_VALUE;
|
||||
|
||||
|
@ -4521,6 +4608,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#TRAIL_SURROGATE_MAX_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char MAX_LOW_SURROGATE = UTF16.TRAIL_SURROGATE_MAX_VALUE;
|
||||
|
||||
|
@ -4528,6 +4616,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#SURROGATE_MIN_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char MIN_SURROGATE = UTF16.SURROGATE_MIN_VALUE;
|
||||
|
||||
|
@ -4535,6 +4624,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#SURROGATE_MAX_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char MAX_SURROGATE = UTF16.SURROGATE_MAX_VALUE;
|
||||
|
||||
|
@ -4542,6 +4632,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#SUPPLEMENTARY_MIN_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int MIN_SUPPLEMENTARY_CODE_POINT = UTF16.SUPPLEMENTARY_MIN_VALUE;
|
||||
|
||||
|
@ -4549,6 +4640,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#CODEPOINT_MAX_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int MAX_CODE_POINT = UTF16.CODEPOINT_MAX_VALUE;
|
||||
|
||||
|
@ -4556,6 +4648,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* Cover the JDK 1.5 API, for convenience.
|
||||
* @see UTF16#CODEPOINT_MIN_VALUE
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int MIN_CODE_POINT = UTF16.CODEPOINT_MIN_VALUE;
|
||||
|
||||
|
@ -4564,6 +4657,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param cp the code point to check
|
||||
* @return true if cp is a valid code point
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final boolean isValidCodePoint(int cp) {
|
||||
return cp >= 0 && cp <= MAX_CODE_POINT;
|
||||
|
@ -4574,6 +4668,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param cp the code point to check
|
||||
* @return true if cp is a supplementary code point
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final boolean isSupplementaryCodePoint(int cp) {
|
||||
return cp >= UTF16.SUPPLEMENTARY_MIN_VALUE
|
||||
|
@ -4585,6 +4680,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param ch the char to check
|
||||
* @return true if ch is a high (lead) surrogate
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static boolean isHighSurrogate(char ch) {
|
||||
return ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE;
|
||||
|
@ -4595,6 +4691,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param ch the char to check
|
||||
* @return true if ch is a low (trail) surrogate
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static boolean isLowSurrogate(char ch) {
|
||||
return ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE;
|
||||
|
@ -4607,6 +4704,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param low the low (trail) char
|
||||
* @return true if high, low form a surrogate pair
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final boolean isSurrogatePair(char high, char low) {
|
||||
return isHighSurrogate(high) && isLowSurrogate(low);
|
||||
|
@ -4620,6 +4718,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @return the number of chars needed to represent the code point
|
||||
* @see UTF16#getCharCount
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static int charCount(int cp) {
|
||||
return UTF16.getCharCount(cp);
|
||||
|
@ -4632,6 +4731,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param low the low (trail) surrogate
|
||||
* @return the code point formed by the surrogate pair
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int toCodePoint(char high, char low) {
|
||||
return UCharacterProperty.getRawSupplementary(high, low);
|
||||
|
@ -4645,6 +4745,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param index the index of the first or only char forming the code point
|
||||
* @return the code point at the index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int codePointAt(CharSequence seq, int index) {
|
||||
char c1 = seq.charAt(index++);
|
||||
|
@ -4667,6 +4768,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param index the index of the first or only char forming the code point
|
||||
* @return the code point at the index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int codePointAt(char[] text, int index) {
|
||||
char c1 = text[index++];
|
||||
|
@ -4681,6 +4783,33 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
return c1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cover the JDK 1.5 API, for convenience. Return the code point at index.
|
||||
* <br/><b>Note</b>: the semantics of this API is different from the related UTF16
|
||||
* API. This examines only the characters at index and index+1.
|
||||
* @param text the characters to check
|
||||
* @param index the index of the first or only char forming the code point
|
||||
* @param limit the limit of the valid text
|
||||
* @return the code point at the index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int codePointAt(char[] text, int index, int limit) {
|
||||
if (index >= limit || limit > text.length) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
char c1 = text[index++];
|
||||
if (isHighSurrogate(c1)) {
|
||||
if (index < limit) {
|
||||
char c2 = text[index];
|
||||
if (isLowSurrogate(c2)) {
|
||||
return toCodePoint(c1, c2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return c1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cover the JDK 1.5 API, for convenience. Return the code point before index.
|
||||
* <br/><b>Note</b>: the semantics of this API is different from the related UTF16
|
||||
|
@ -4689,6 +4818,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param index the index after the last or only char forming the code point
|
||||
* @return the code point before the index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int codePointBefore(CharSequence seq, int index) {
|
||||
char c2 = seq.charAt(--index);
|
||||
|
@ -4711,6 +4841,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param index the index after the last or only char forming the code point
|
||||
* @return the code point before the index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int codePointBefore(char[] text, int index) {
|
||||
char c2 = text[--index];
|
||||
|
@ -4725,6 +4856,33 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
return c2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cover the JDK 1.5 API, for convenience. Return the code point before index.
|
||||
* <br/><b>Note</b>: the semantics of this API is different from the related UTF16
|
||||
* API. This examines only the characters at index-1 and index-2.
|
||||
* @param text the characters to check
|
||||
* @param index the index after the last or only char forming the code point
|
||||
* @param limit the start of the valid text
|
||||
* @return the code point before the index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int codePointBefore(char[] text, int index, int limit) {
|
||||
if (index <= limit || limit < 0) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
char c2 = text[--index];
|
||||
if (isLowSurrogate(c2)) {
|
||||
if (index > limit) {
|
||||
char c1 = text[--index];
|
||||
if (isHighSurrogate(c1)) {
|
||||
return toCodePoint(c1, c2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return c2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cover the JDK 1.5 API, for convenience. Writes the chars representing the
|
||||
* code point into the destination at the given index.
|
||||
|
@ -4734,6 +4892,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @return the count of the number of chars written (1 or 2)
|
||||
* @throws IllegalArgumentException if cp is not a valid code point
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int toChars(int cp, char[] dst, int dstIndex) {
|
||||
if (cp >= 0) {
|
||||
|
@ -4757,6 +4916,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @return an array containing the char(s) representing the code point
|
||||
* @throws IllegalArgumentException if cp is not a valid code point
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final char[] toChars(int cp) {
|
||||
if (cp >= 0) {
|
||||
|
@ -4784,6 +4944,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @return the directionality of the code point
|
||||
* @see #getDirection
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static byte getDirectionality(int cp)
|
||||
{
|
||||
|
@ -4798,6 +4959,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param limit the limit of the range
|
||||
* @return the number of code points in the range
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static int codePointCount(CharSequence text, int start, int limit) {
|
||||
if (start < 0 || limit < start || limit > text.length()) {
|
||||
|
@ -4827,6 +4989,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param limit the limit of the range
|
||||
* @return the number of code points in the range
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static int codePointCount(char[] text, int start, int limit) {
|
||||
if (start < 0 || limit < start || limit > text.length) {
|
||||
|
@ -4856,6 +5019,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param codePointOffset the number of code points by which to offset the index
|
||||
* @return the adjusted index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static int offsetByCodePoints(CharSequence text, int index, int codePointOffset) {
|
||||
if (index < 0 || index > text.length()) {
|
||||
|
@ -4902,6 +5066,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param codePointOffset the number of code points by which to offset the index
|
||||
* @return the adjusted index
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static int offsetByCodePoints(char[] text, int start, int count, int index, int codePointOffset) {
|
||||
int limit = start + count;
|
||||
|
@ -5305,6 +5470,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
|||
* @param ch code point whose property value is to be retrieved
|
||||
* @return property value of code point
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
private static int getProperty(int ch)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@ package com.ibm.icu.lang;
|
|||
/**
|
||||
* A container for the different 'enumerated types' used by UCharacter.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class UCharacterEnums {
|
||||
|
||||
|
@ -22,6 +23,7 @@ public class UCharacterEnums {
|
|||
* <code>java.lang.Character</code>.
|
||||
* @see UCharacterCategory
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static interface ECharacterCategory {
|
||||
/**
|
||||
|
@ -212,6 +214,7 @@ public class UCharacterEnums {
|
|||
* This name is compatible with java.lang.Character's name for this type.
|
||||
* @see #INITIAL_PUNCTUATION
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int INITIAL_QUOTE_PUNCTUATION = 28;
|
||||
|
||||
|
@ -227,6 +230,7 @@ public class UCharacterEnums {
|
|||
* This name is compatible with java.lang.Character's name for this type.
|
||||
* @see #FINAL_PUNCTUATION
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FINAL_QUOTE_PUNCTUATION = 29;
|
||||
|
||||
|
@ -244,6 +248,7 @@ public class UCharacterEnums {
|
|||
* with those defined in <code>java.lang.Character</code>.
|
||||
* @see UCharacterDirection
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static interface ECharacterDirection {
|
||||
/**
|
||||
|
@ -255,6 +260,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for LEFT_TO_RIGHT.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = (byte)LEFT_TO_RIGHT;
|
||||
|
||||
|
@ -267,6 +273,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for RIGHT_TO_LEFT.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = (byte)RIGHT_TO_LEFT;
|
||||
|
||||
|
@ -279,6 +286,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for EUROPEAN_NUMBER.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = (byte)EUROPEAN_NUMBER;
|
||||
|
||||
|
@ -291,6 +299,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for EUROPEAN_NUMBER_SEPARATOR.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = (byte)EUROPEAN_NUMBER_SEPARATOR;
|
||||
|
||||
|
@ -303,6 +312,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for EUROPEAN_NUMBER_TERMINATOR.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = (byte)EUROPEAN_NUMBER_TERMINATOR;
|
||||
|
||||
|
@ -315,6 +325,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for ARABIC_NUMBER.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_ARABIC_NUMBER = (byte)ARABIC_NUMBER;
|
||||
|
||||
|
@ -327,6 +338,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for COMMON_NUMBER_SEPARATOR.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = (byte)COMMON_NUMBER_SEPARATOR;
|
||||
|
||||
|
@ -339,6 +351,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for BLOCK_SEPARATOR.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = (byte)BLOCK_SEPARATOR;
|
||||
|
||||
|
@ -351,6 +364,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for SEGMENT_SEPARATOR.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = (byte)SEGMENT_SEPARATOR;
|
||||
|
||||
|
@ -363,6 +377,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for WHITE_SPACE_NEUTRAL.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_WHITESPACE = (byte)WHITE_SPACE_NEUTRAL;
|
||||
|
||||
|
@ -375,6 +390,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for OTHER_NEUTRAL.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_OTHER_NEUTRALS = (byte)OTHER_NEUTRAL;
|
||||
|
||||
|
@ -387,6 +403,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for LEFT_TO_RIGHT_EMBEDDING.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = (byte)LEFT_TO_RIGHT_EMBEDDING;
|
||||
|
||||
|
@ -399,6 +416,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for LEFT_TO_RIGHT_OVERRIDE.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = (byte)LEFT_TO_RIGHT_OVERRIDE;
|
||||
|
||||
|
@ -411,6 +429,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for RIGHT_TO_LEFT_ARABIC.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = (byte)RIGHT_TO_LEFT_ARABIC;
|
||||
|
||||
|
@ -423,6 +442,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for RIGHT_TO_LEFT_EMBEDDING.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = (byte)RIGHT_TO_LEFT_EMBEDDING;
|
||||
|
||||
|
@ -435,6 +455,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for RIGHT_TO_LEFT_OVERRIDE.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = (byte)RIGHT_TO_LEFT_OVERRIDE;
|
||||
|
||||
|
@ -447,6 +468,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for POP_DIRECTIONAL_FORMAT.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = (byte)POP_DIRECTIONAL_FORMAT;
|
||||
|
||||
|
@ -459,6 +481,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for DIR_NON_SPACING_MARK.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_NON_SPACING_MARK = (byte)DIR_NON_SPACING_MARK;
|
||||
|
||||
|
@ -471,6 +494,7 @@ public class UCharacterEnums {
|
|||
/**
|
||||
* JDK-compatible synonum for BOUNDARY_NEUTRAL.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = (byte)BOUNDARY_NEUTRAL;
|
||||
|
||||
|
@ -484,6 +508,7 @@ public class UCharacterEnums {
|
|||
* Undefined bidirectional character type. Undefined <code>char</code>
|
||||
* values have undefined directionality in the Unicode specification.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_UNDEFINED = -1;
|
||||
}
|
||||
|
|
|
@ -310,6 +310,7 @@ public interface UProperty
|
|||
* mapping or _in_ the target of a case mapping. Not the same as
|
||||
* the general category Cased_Letter.</p>
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int CASE_SENSITIVE = 34;
|
||||
|
||||
|
@ -318,6 +319,7 @@ public interface UProperty
|
|||
* Sentence Terminal. Used in UAX #29: Text Boundaries
|
||||
* (http://www.unicode.org/reports/tr29/)
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int S_TERM = 35;
|
||||
|
||||
|
@ -327,73 +329,89 @@ public interface UProperty
|
|||
* For details on the behavior of these characters,
|
||||
* see StandardizedVariants.html and 15.6 Variation Selectors.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int VARIATION_SELECTOR = 36;
|
||||
|
||||
/** Binary property NFD_Inert.
|
||||
ICU-specific property for characters that are inert under NFD,
|
||||
i.e., they do not interact with adjacent characters.
|
||||
Used for example in normalizing transforms in incremental mode
|
||||
to find the boundary of safely normalizable text despite possible
|
||||
text additions.
|
||||
|
||||
There is one such property per normalization form.
|
||||
These properties are computed as follows - an inert character is:
|
||||
a) unassigned, or ALL of the following:
|
||||
b) of combining class 0.
|
||||
c) not decomposed by this normalization form.
|
||||
AND if NFC or NFKC,
|
||||
d) can never compose with a previous character.
|
||||
e) can never compose with a following character.
|
||||
f) can never change if another character is added.
|
||||
Example: a-breve might satisfy all but f, but if you
|
||||
add an ogonek it changes to a-ogonek + breve
|
||||
|
||||
See also com.ibm.text.UCD.NFSkippable in the ICU4J repository,
|
||||
and icu/source/common/unormimp.h .
|
||||
@draft ICU 3.0 */
|
||||
/**
|
||||
* Binary property NFD_Inert.
|
||||
* ICU-specific property for characters that are inert under NFD,
|
||||
* i.e., they do not interact with adjacent characters.
|
||||
* Used for example in normalizing transforms in incremental mode
|
||||
* to find the boundary of safely normalizable text despite possible
|
||||
* text additions.
|
||||
*
|
||||
* There is one such property per normalization form.
|
||||
* These properties are computed as follows - an inert character is:
|
||||
* a) unassigned, or ALL of the following:
|
||||
* b) of combining class 0.
|
||||
* c) not decomposed by this normalization form.
|
||||
* AND if NFC or NFKC,
|
||||
* d) can never compose with a previous character.
|
||||
* e) can never compose with a following character.
|
||||
* f) can never change if another character is added.
|
||||
* Example: a-breve might satisfy all but f, but if you
|
||||
* add an ogonek it changes to a-ogonek + breve
|
||||
*
|
||||
* See also com.ibm.text.UCD.NFSkippable in the ICU4J repository,
|
||||
* and icu/source/common/unormimp.h .
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFD_INERT = 37;
|
||||
|
||||
/** Binary property NFKD_Inert.
|
||||
ICU-specific property for characters that are inert under NFKD,
|
||||
i.e., they do not interact with adjacent characters.
|
||||
Used for example in normalizing transforms in incremental mode
|
||||
to find the boundary of safely normalizable text despite possible
|
||||
text additions.
|
||||
@see #NFD_INERT
|
||||
@draft ICU 3.0 */
|
||||
/**
|
||||
* Binary property NFKD_Inert.
|
||||
* ICU-specific property for characters that are inert under NFKD,
|
||||
* i.e., they do not interact with adjacent characters.
|
||||
* Used for example in normalizing transforms in incremental mode
|
||||
* to find the boundary of safely normalizable text despite possible
|
||||
* text additions.
|
||||
* @see #NFD_INERT
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFKD_INERT = 38;
|
||||
|
||||
/** Binary property NFC_Inert.
|
||||
ICU-specific property for characters that are inert under NFC,
|
||||
i.e., they do not interact with adjacent characters.
|
||||
Used for example in normalizing transforms in incremental mode
|
||||
to find the boundary of safely normalizable text despite possible
|
||||
text additions.
|
||||
@see #NFD_INERT
|
||||
@draft ICU 3.0 */
|
||||
/**
|
||||
* Binary property NFC_Inert.
|
||||
* ICU-specific property for characters that are inert under NFC,
|
||||
* i.e., they do not interact with adjacent characters.
|
||||
* Used for example in normalizing transforms in incremental mode
|
||||
* to find the boundary of safely normalizable text despite possible
|
||||
* text additions.
|
||||
* @see #NFD_INERT
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFC_INERT = 39;
|
||||
|
||||
/** Binary property NFKC_Inert.
|
||||
ICU-specific property for characters that are inert under NFKC,
|
||||
i.e., they do not interact with adjacent characters.
|
||||
Used for example in normalizing transforms in incremental mode
|
||||
to find the boundary of safely normalizable text despite possible
|
||||
text additions.
|
||||
@see #NFD_INERT
|
||||
@draft ICU 3.0 */
|
||||
/**
|
||||
* Binary property NFKC_Inert.
|
||||
* ICU-specific property for characters that are inert under NFKC,
|
||||
* i.e., they do not interact with adjacent characters.
|
||||
* Used for example in normalizing transforms in incremental mode
|
||||
* to find the boundary of safely normalizable text despite possible
|
||||
* text additions.
|
||||
* @see #NFD_INERT
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFKC_INERT = 40;
|
||||
|
||||
/** Binary Property Segment_Starter.
|
||||
ICU-specific property for characters that are starters in terms of
|
||||
Unicode normalization and combining character sequences.
|
||||
They have ccc=0 and do not occur in non-initial position of the
|
||||
canonical decomposition of any character
|
||||
(like " in NFD(a-umlaut) and a Jamo T in an NFD(Hangul LVT)).
|
||||
ICU uses this property for segmenting a string for generating a set of
|
||||
canonically equivalent strings, e.g. for canonical closure while
|
||||
processing collation tailoring rules.
|
||||
@draft ICU 3.0 */
|
||||
/**
|
||||
* Binary Property Segment_Starter.
|
||||
* ICU-specific property for characters that are starters in terms of
|
||||
* Unicode normalization and combining character sequences.
|
||||
* They have ccc=0 and do not occur in non-initial position of the
|
||||
* canonical decomposition of any character
|
||||
* (like " in NFD(a-umlaut) and a Jamo T in an NFD(Hangul LVT)).
|
||||
* ICU uses this property for segmenting a string for generating a set of
|
||||
* canonically equivalent strings, e.g. for canonical closure while
|
||||
* processing collation tailoring rules.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SEGMENT_STARTER = 41;
|
||||
|
||||
/**
|
||||
|
@ -491,6 +509,7 @@ public interface UProperty
|
|||
* Enumerated property Hangul_Syllable_Type, new in Unicode 4.
|
||||
* Returns HangulSyllableType values.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int HANGUL_SYLLABLE_TYPE = 0x100B;
|
||||
|
||||
|
@ -498,6 +517,7 @@ public interface UProperty
|
|||
* Enumerated property NFD_Quick_Check.
|
||||
* Returns numeric values compatible with Normalizer.QuickCheckResult.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFD_QUICK_CHECK = 0x100C;
|
||||
|
||||
|
@ -505,6 +525,7 @@ public interface UProperty
|
|||
* Enumerated property NFKD_Quick_Check.
|
||||
* Returns numeric values compatible with Normalizer.QuickCheckResult.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFKD_QUICK_CHECK = 0x100D;
|
||||
|
||||
|
@ -512,6 +533,7 @@ public interface UProperty
|
|||
* Enumerated property NFC_Quick_Check.
|
||||
* Returns numeric values compatible with Normalizer.QuickCheckResult.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFC_QUICK_CHECK = 0x100E;
|
||||
|
||||
|
@ -519,6 +541,7 @@ public interface UProperty
|
|||
* Enumerated property NFKC_Quick_Check.
|
||||
* Returns numeric values compatible with Normalizer.QuickCheckResult.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NFKC_QUICK_CHECK = 0x100F;
|
||||
|
||||
|
@ -530,6 +553,7 @@ public interface UProperty
|
|||
* see Normalizer.FCD and http://www.unicode.org/notes/tn5/#FCD .
|
||||
* Returns 8-bit numeric values like CANONICAL_COMBINING_CLASS.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LEAD_CANONICAL_COMBINING_CLASS = 0x1010;
|
||||
|
||||
|
@ -541,6 +565,7 @@ public interface UProperty
|
|||
* see Normalizer.FCD and http://www.unicode.org/notes/tn5/#FCD .
|
||||
* Returns 8-bit numeric values like CANONICAL_COMBINING_CLASS.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TRAIL_CANONICAL_COMBINING_CLASS = 0x1011;
|
||||
|
||||
|
|
|
@ -238,6 +238,7 @@ public final class UScript {
|
|||
/**
|
||||
* Unified Canadian Aboriginal Symbols
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int CANADIAN_ABORIGINAL = 40; /* Cans */
|
||||
/**
|
||||
|
@ -274,53 +275,62 @@ public final class UScript {
|
|||
* Braille
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int BRAILLE = 46; /* Brai */
|
||||
/**
|
||||
* Cypriot
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int CYPRIOT = 47; /* Cprt */
|
||||
/**
|
||||
* Limbu
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int LIMBU = 48; /* Limb */
|
||||
/**
|
||||
* Linear B
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int LINEAR_B = 49; /* Linb */
|
||||
/**
|
||||
* Osmanya
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int OSMANYA = 50; /* Osma */
|
||||
/**
|
||||
* Shavian
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int SHAVIAN = 51; /* Shaw */
|
||||
/**
|
||||
* Tai Le
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int TAI_LE = 52; /* Tale */
|
||||
/**
|
||||
* Ugaritic
|
||||
* New script in Unicode 4
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* */
|
||||
public static final int UGARITIC = 53; /* Ugar */
|
||||
/**
|
||||
* New script code in Unicode 4.0.1
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int KATAKANA_OR_HIRAGANA = 54; /*Hrkt */
|
||||
|
||||
|
@ -387,6 +397,7 @@ public final class UScript {
|
|||
* @param locale ULocale
|
||||
* @return The script codes array. null if the the code cannot be found.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int[] getCode(ULocale locale){
|
||||
return findCodeFromLocale(locale);
|
||||
|
|
|
@ -635,6 +635,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* @return An array of Locales. All of the locales in the array can
|
||||
* be used when creating a BreakIterator.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static synchronized Locale[] getAvailableLocales()
|
||||
{
|
||||
|
@ -713,6 +714,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -60,12 +60,13 @@ public class ChineseDateFormatSymbols extends DateFormatSymbols {
|
|||
public String getLeapMonth(int isLeapMonth) {
|
||||
return this.isLeapMonth[isLeapMonth];
|
||||
}
|
||||
|
||||
/**
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void initializeData(ULocale loc, CalendarData calData) {
|
||||
super.initializeData(loc, calData);
|
||||
isLeapMonth = calData.getStringArray("IsLeapMonth");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -551,6 +551,7 @@ public final class CollationElementIterator
|
|||
* will be created for use.</p>
|
||||
* @param source the new source string iterator for iteration.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setText(UCharacterIterator source)
|
||||
{
|
||||
|
|
|
@ -88,6 +88,7 @@ public final class CollationKey implements Comparable
|
|||
* Options that used in the API CollationKey.getBound() for getting a
|
||||
* CollationKey based on the bound mode requested.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final class BoundMode
|
||||
{
|
||||
|
@ -99,22 +100,29 @@ public final class CollationKey implements Comparable
|
|||
/**
|
||||
* Lower bound
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LOWER = 0;
|
||||
|
||||
/**
|
||||
* Upper bound that will match strings of exact size
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int UPPER = 1;
|
||||
|
||||
/**
|
||||
* Upper bound that will match all the strings that have the same
|
||||
* initial substring as the given string
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int UPPER_LONG = 2;
|
||||
|
||||
/**
|
||||
* Number of bound mode
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int COUNT = 3;
|
||||
|
||||
|
@ -157,6 +165,7 @@ public final class CollationKey implements Comparable
|
|||
* @see Collator
|
||||
* @see RawCollationKey
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public CollationKey(String source, RawCollationKey key)
|
||||
{
|
||||
|
@ -433,6 +442,7 @@ public final class CollationKey implements Comparable
|
|||
* @see Collator#QUATERNARY
|
||||
* @see Collator#IDENTICAL
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public CollationKey getBound(int boundType, int noOfLevels)
|
||||
{
|
||||
|
@ -529,6 +539,7 @@ public final class CollationKey implements Comparable
|
|||
* @exception IllegalArgumentException thrown if source CollationKey
|
||||
* argument is null or of 0 length.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public CollationKey merge(CollationKey source)
|
||||
{
|
||||
|
|
|
@ -307,6 +307,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
/**
|
||||
* Clone the collator.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @return a clone of this collator.
|
||||
*/
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
|
@ -320,6 +321,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* display names for them. If standard locale display names are sufficient,
|
||||
* Collator instances may be registered instead.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static abstract class CollatorFactory {
|
||||
/**
|
||||
|
@ -329,6 +331,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
*
|
||||
* @return true if this factory is visible
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean visible() {
|
||||
return true;
|
||||
|
@ -340,7 +343,8 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @param loc the locale for which this collator is to be created.
|
||||
* @return the newly created collator.
|
||||
* @draft ICU 2.6
|
||||
*/
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract Collator createCollator(Locale loc);
|
||||
|
||||
/**
|
||||
|
@ -350,6 +354,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @param displayLocale the locale for which the display name of the collator should be localized
|
||||
* @return the display name
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayName(Locale objectLocale, Locale displayLocale) {
|
||||
if (visible()) {
|
||||
|
@ -368,12 +373,14 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
*
|
||||
* @return the set of supported locale IDs.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract Set getSupportedLocaleIDs();
|
||||
|
||||
/**
|
||||
* Empty default constructor.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected CollatorFactory() {
|
||||
}
|
||||
|
@ -422,6 +429,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @see #getInstance(Locale)
|
||||
* @see #getInstance()
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final Collator getInstance(ULocale locale) {
|
||||
// fetching from service cache is faster than instantiation
|
||||
|
@ -454,6 +462,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @return an object that can be used to unregister the registered collator.
|
||||
*
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final Object registerInstance(Collator collator, Locale locale) {
|
||||
return getShim().registerInstance(collator, locale);
|
||||
|
@ -466,6 +475,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @return an object that can be used to unregister the registered factory.
|
||||
*
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final Object registerFactory(CollatorFactory factory) {
|
||||
return getShim().registerFactory(factory);
|
||||
|
@ -476,6 +486,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @param registryKey the object previously returned by registerInstance.
|
||||
* @return true if the collator was successfully unregistered.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final boolean unregister(Object registryKey) {
|
||||
if (shim == null) {
|
||||
|
@ -507,6 +518,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* This list includes any that have been registered, in addition to
|
||||
* those that are installed with ICU4J.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale[] getAvailableULocales() {
|
||||
if (shim == null) {
|
||||
|
@ -542,6 +554,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @return an array of valid collation keywords.
|
||||
* @see #getKeywordValues
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final String[] getKeywords() {
|
||||
return KEYWORDS;
|
||||
|
@ -553,6 +566,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @param keyword one of the keywords returned by getKeywords.
|
||||
* @see #getKeywords
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final String[] getKeywordValues(String keyword) {
|
||||
if (!keyword.equals(KEYWORDS[0])) {
|
||||
|
@ -586,6 +600,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* data. If non-null, isAvailable must have length >= 1.
|
||||
* @return the locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale getFunctionalEquivalent(String keyword,
|
||||
ULocale locID,
|
||||
|
@ -604,6 +619,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @return the locale
|
||||
* @see #getFunctionalEquivalent(String,ULocale,boolean[])
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale getFunctionalEquivalent(String keyword,
|
||||
ULocale locID) {
|
||||
|
@ -616,6 +632,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @param displayLocale the locale for the collator's display name
|
||||
* @return the display name
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public String getDisplayName(Locale objectLocale, Locale displayLocale) {
|
||||
return getShim().getDisplayName(objectLocale, displayLocale);
|
||||
|
@ -626,6 +643,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @param objectLocale the locale of the collator
|
||||
* @return the display name
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public String getDisplayName(Locale objectLocale) {
|
||||
return getShim().getDisplayName(objectLocale, Locale.getDefault());
|
||||
|
@ -803,6 +821,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @see #getCollationKey
|
||||
* @see RawCollationKey
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract RawCollationKey getRawCollationKey(String source,
|
||||
RawCollationKey key);
|
||||
|
@ -828,6 +847,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @see #getVariableTop
|
||||
* @see RuleBasedCollator#setAlternateHandlingShifted
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract int setVariableTop(String varTop);
|
||||
|
||||
|
@ -837,6 +857,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @return the variable top value of a Collator.
|
||||
* @see #setVariableTop
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract int getVariableTop();
|
||||
|
||||
|
@ -849,18 +870,21 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @see #getVariableTop
|
||||
* @see #setVariableTop
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract void setVariableTop(int varTop);
|
||||
|
||||
/** Get the version of this collator object.
|
||||
* @return the version object associated with this collator
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract VersionInfo getVersion();
|
||||
|
||||
/** Get the UCA version of this collator object.
|
||||
* @return the version object associated with this collator
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract VersionInfo getUCAVersion();
|
||||
|
||||
|
@ -916,6 +940,7 @@ public abstract class Collator implements Comparator, Cloneable
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -191,6 +191,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* FieldPosition selector for 'S' field alignment,
|
||||
* corresponding to the {@link Calendar#MILLISECOND} field.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int FRACTIONAL_SECOND_FIELD = 8;
|
||||
|
||||
|
@ -272,6 +273,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* FieldPosition selector for 'Y' field alignment,
|
||||
* corresponding to the {@link Calendar#YEAR_WOY} field.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int YEAR_WOY_FIELD = 18;
|
||||
|
||||
|
@ -279,6 +281,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* FieldPosition selector for 'e' field alignment,
|
||||
* corresponding to the {@link Calendar#DOW_LOCAL} field.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int DOW_LOCAL_FIELD = 19;
|
||||
|
||||
|
@ -286,6 +289,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* FieldPosition selector for 'u' field alignment,
|
||||
* corresponding to the {@link Calendar#EXTENDED_YEAR} field.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int EXTENDED_YEAR_FIELD = 20;
|
||||
|
||||
|
@ -293,6 +297,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* FieldPosition selector for 'g' field alignment,
|
||||
* corresponding to the {@link Calendar#JULIAN_DAY} field.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int JULIAN_DAY_FIELD = 21;
|
||||
|
||||
|
@ -300,6 +305,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* FieldPosition selector for 'A' field alignment,
|
||||
* corresponding to the {@link Calendar#MILLISECONDS_IN_DAY} field.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int MILLISECONDS_IN_DAY_FIELD = 22;
|
||||
|
||||
|
@ -308,6 +314,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* corresponding to the {@link Calendar#ZONE_OFFSET} and
|
||||
* {@link Calendar#DST_OFFSET} fields.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int TIMEZONE_RFC_FIELD = 23;
|
||||
|
||||
|
@ -315,6 +322,7 @@ public abstract class DateFormat extends UFormat {
|
|||
* Number of FieldPosition selectors for DateFormat.
|
||||
* Valid selectors range from 0 to FIELD_COUNT-1.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final static int FIELD_COUNT = 24; // must == DateFormatSymbols.patternChars.length()
|
||||
|
||||
|
|
|
@ -413,6 +413,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
* @param desiredLocale
|
||||
* @param type
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
|
||||
protected void initializeData(ULocale desiredLocale, String type)
|
||||
|
@ -425,6 +426,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
* @param desiredLocale
|
||||
* @param calData
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void initializeData(ULocale desiredLocale, CalendarData calData)
|
||||
{
|
||||
|
@ -734,6 +736,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -3746,6 +3746,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* returns true.
|
||||
* @return the fewest significant digits that will be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getMinimumSignificantDigits() {
|
||||
return minSignificantDigits;
|
||||
|
@ -3757,6 +3758,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* returns true.
|
||||
* @return the most significant digits that will be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getMaximumSignificantDigits() {
|
||||
return maxSignificantDigits;
|
||||
|
@ -3770,6 +3772,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* value has no effect unless areSignificantDigitsUsed() returns true.
|
||||
* @param min the fewest significant digits to be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setMinimumSignificantDigits(int min) {
|
||||
if (min < 1) {
|
||||
|
@ -3789,6 +3792,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* value has no effect unless areSignificantDigitsUsed() returns true.
|
||||
* @param max the most significant digits to be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setMaximumSignificantDigits(int max) {
|
||||
if (max < 1) {
|
||||
|
@ -3805,6 +3809,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* integer and fraction digit counts are in use.
|
||||
* @return true if significant digits are in use
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean areSignificantDigitsUsed() {
|
||||
return useSignificantDigits;
|
||||
|
@ -3816,6 +3821,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param useSignificantDigits true to use significant digits, or
|
||||
* false to use integer and fraction digit counts
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setSignificantDigitsUsed(boolean useSignificantDigits) {
|
||||
this.useSignificantDigits = useSignificantDigits;
|
||||
|
|
|
@ -80,6 +80,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
* Return the character used to represent a significant digit in a pattern.
|
||||
* @return the significant digit pattern character
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public char getSignificantDigit() {
|
||||
return sigDigit;
|
||||
|
@ -89,6 +90,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
* Set the character used to represent a significant digit in a pattern.
|
||||
* @param sigDigit the significant digit pattern character
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setSignificantDigit(char sigDigit) {
|
||||
this.sigDigit = sigDigit;
|
||||
|
@ -814,6 +816,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -35,6 +35,7 @@ import com.ibm.icu.impl.ICUResourceBundle;
|
|||
*
|
||||
* @author Ram Viswanadha
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final class IDNA {
|
||||
|
||||
|
@ -55,6 +56,7 @@ public final class IDNA {
|
|||
*
|
||||
* @see #convertToASCII #convertToUnicode
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int DEFAULT = 0x0000;
|
||||
/**
|
||||
|
@ -62,6 +64,7 @@ public final class IDNA {
|
|||
*
|
||||
* @see #convertToASCII #convertToUnicode
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ALLOW_UNASSIGNED = 0x0001;
|
||||
/**
|
||||
|
@ -69,6 +72,7 @@ public final class IDNA {
|
|||
*
|
||||
* @see #convertToASCII #convertToUnicode
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int USE_STD3_RULES = 0x0002;
|
||||
|
||||
|
@ -195,6 +199,7 @@ public final class IDNA {
|
|||
* @param ch The code point to be ascertained
|
||||
* @return true if the char is a label separator
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
private static boolean isLabelSeparator(int ch){
|
||||
switch(ch){
|
||||
|
@ -232,6 +237,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertToASCII(String src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -263,6 +269,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertToASCII(StringBuffer src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -294,6 +301,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertToASCII(UCharacterIterator src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -412,6 +420,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertIDNToASCII(UCharacterIterator src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -447,6 +456,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertIDNToASCII(StringBuffer src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -482,6 +492,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertIDNToASCII(String src,int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -530,6 +541,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertToUnicode(String src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -561,6 +573,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertToUnicode(StringBuffer src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -592,6 +605,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertToUnicode(UCharacterIterator src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -712,6 +726,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertIDNToUnicode(UCharacterIterator src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -744,6 +759,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertIDNToUnicode(StringBuffer src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -776,6 +792,7 @@ public final class IDNA {
|
|||
* @return StringBuffer the converted String
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer convertIDNToUnicode(String src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
@ -826,6 +843,7 @@ public final class IDNA {
|
|||
* @return 0 if the strings are equal, > 0 if s1 > s2 and < 0 if s1 < s2
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
// TODO: optimize
|
||||
public static int compare(StringBuffer s1, StringBuffer s2, int options)
|
||||
|
@ -865,6 +883,7 @@ public final class IDNA {
|
|||
* @return 0 if the strings are equal, > 0 if s1 > s2 and < 0 if s1 < s2
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
// TODO: optimize
|
||||
public static int compare(String s1, String s2, int options)
|
||||
|
@ -903,6 +922,7 @@ public final class IDNA {
|
|||
* @return 0 if the strings are equal, > 0 if i1 > i2 and < 0 if i1 < i2
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
// TODO: optimize
|
||||
public static int compare(UCharacterIterator s1, UCharacterIterator s2, int options)
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* @see com.ibm.icu.text.UFormat
|
||||
* @author Alan Liu
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract class MeasureFormat extends UFormat {
|
||||
|
||||
|
@ -36,6 +37,7 @@ public abstract class MeasureFormat extends UFormat {
|
|||
* @param locale desired locale
|
||||
* @return a formatter object
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static MeasureFormat getCurrencyFormat(ULocale locale) {
|
||||
return new CurrencyFormat(locale);
|
||||
|
@ -46,6 +48,7 @@ public abstract class MeasureFormat extends UFormat {
|
|||
* locale.
|
||||
* @return a formatter object
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static MeasureFormat getCurrencyFormat() {
|
||||
return getCurrencyFormat(ULocale.getDefault());
|
||||
|
|
|
@ -316,6 +316,7 @@ import com.ibm.icu.impl.Utility;
|
|||
* @see ChoiceFormat
|
||||
* @author Mark Davis
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class MessageFormat extends UFormat {
|
||||
|
||||
|
@ -333,6 +334,7 @@ public class MessageFormat extends UFormat {
|
|||
* @param pattern the pattern for this message format
|
||||
* @exception IllegalArgumentException if the pattern is invalid
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public MessageFormat(String pattern) {
|
||||
this.locale = Locale.getDefault();
|
||||
|
@ -351,6 +353,7 @@ public class MessageFormat extends UFormat {
|
|||
* @param locale the locale for this message format
|
||||
* @exception IllegalArgumentException if the pattern is invalid
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public MessageFormat(String pattern, Locale locale) {
|
||||
this.locale = locale;
|
||||
|
@ -366,6 +369,7 @@ public class MessageFormat extends UFormat {
|
|||
*
|
||||
* @param locale the locale to be used when creating or comparing subformats
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setLocale(Locale locale) {
|
||||
/* Save the pattern, and then reapply so that */
|
||||
|
@ -381,6 +385,7 @@ public class MessageFormat extends UFormat {
|
|||
*
|
||||
* @return the locale used when creating or comparing subformats
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Locale getLocale() {
|
||||
return locale;
|
||||
|
@ -397,6 +402,7 @@ public class MessageFormat extends UFormat {
|
|||
* @param pattern the pattern for this message format
|
||||
* @exception IllegalArgumentException if the pattern is invalid
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void applyPattern(String pattern) {
|
||||
StringBuffer[] segments = new StringBuffer[4];
|
||||
|
@ -475,6 +481,7 @@ public class MessageFormat extends UFormat {
|
|||
*
|
||||
* @return a pattern representing the current state of the message format
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String toPattern() {
|
||||
// later, make this more extensible
|
||||
|
@ -571,6 +578,7 @@ public class MessageFormat extends UFormat {
|
|||
* @param newFormats the new formats to use
|
||||
* @exception NullPointerException if <code>newFormats</code> is null
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setFormatsByArgumentIndex(Format[] newFormats) {
|
||||
for (int i = 0; i <= maxOffset; i++) {
|
||||
|
@ -603,6 +611,7 @@ public class MessageFormat extends UFormat {
|
|||
* @param newFormats the new formats to use
|
||||
* @exception NullPointerException if <code>newFormats</code> is null
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setFormats(Format[] newFormats) {
|
||||
int runsToCopy = newFormats.length;
|
||||
|
@ -631,6 +640,7 @@ public class MessageFormat extends UFormat {
|
|||
* @param argumentIndex the argument index for which to use the new format
|
||||
* @param newFormat the new format to use
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setFormatByArgumentIndex(int argumentIndex, Format newFormat) {
|
||||
for (int j = 0; j <= maxOffset; j++) {
|
||||
|
@ -657,6 +667,7 @@ public class MessageFormat extends UFormat {
|
|||
* @exception ArrayIndexOutOfBoundsException if formatElementIndex is equal to or
|
||||
* larger than the number of format elements in the pattern string
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setFormat(int formatElementIndex, Format newFormat) {
|
||||
formats[formatElementIndex] = newFormat;
|
||||
|
@ -681,6 +692,7 @@ public class MessageFormat extends UFormat {
|
|||
*
|
||||
* @return the formats used for the arguments within the pattern
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Format[] getFormatsByArgumentIndex() {
|
||||
int maximumArgumentNumber = -1;
|
||||
|
@ -712,6 +724,7 @@ public class MessageFormat extends UFormat {
|
|||
*
|
||||
* @return the formats used for the format elements in the pattern
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Format[] getFormats() {
|
||||
Format[] resultArray = new Format[maxOffset + 1];
|
||||
|
@ -784,6 +797,7 @@ public class MessageFormat extends UFormat {
|
|||
* <code>arguments</code> array is not of the type
|
||||
* expected by the format element(s) that use it.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final StringBuffer format(Object[] arguments, StringBuffer result,
|
||||
FieldPosition pos)
|
||||
|
@ -803,6 +817,7 @@ public class MessageFormat extends UFormat {
|
|||
* is not of the type expected by the format element(s)
|
||||
* that use it.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String format(String pattern, Object[] arguments) {
|
||||
MessageFormat temp = new MessageFormat(pattern);
|
||||
|
@ -827,6 +842,7 @@ public class MessageFormat extends UFormat {
|
|||
* <code>arguments</code> array is not of the type
|
||||
* expected by the format element(s) that use it.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final StringBuffer format(Object arguments, StringBuffer result,
|
||||
FieldPosition pos)
|
||||
|
@ -913,6 +929,7 @@ public class MessageFormat extends UFormat {
|
|||
* 0. When an error occurs, the call to this method will return null.
|
||||
* If the source is null, return an empty array.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Object[] parse(String source, ParsePosition pos) {
|
||||
if (source == null) {
|
||||
|
@ -1002,6 +1019,7 @@ public class MessageFormat extends UFormat {
|
|||
* @exception ParseException if the beginning of the specified string
|
||||
* cannot be parsed.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Object[] parse(String source) throws ParseException {
|
||||
ParsePosition pos = new ParsePosition(0);
|
||||
|
@ -1036,6 +1054,7 @@ public class MessageFormat extends UFormat {
|
|||
* error, returns null.
|
||||
* @exception NullPointerException if <code>pos</code> is null.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Object parseObject(String source, ParsePosition pos) {
|
||||
return parse(source, pos);
|
||||
|
@ -1046,6 +1065,7 @@ public class MessageFormat extends UFormat {
|
|||
*
|
||||
* @return a clone of this instance.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Object clone() {
|
||||
MessageFormat other = (MessageFormat) super.clone();
|
||||
|
@ -1066,6 +1086,7 @@ public class MessageFormat extends UFormat {
|
|||
/**
|
||||
* Equality comparison between two message format objects
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) // quick check
|
||||
|
@ -1084,6 +1105,7 @@ public class MessageFormat extends UFormat {
|
|||
/**
|
||||
* Generates a hash code for the message format object.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int hashCode() {
|
||||
return pattern.hashCode(); // enough for reasonable distribution
|
||||
|
@ -1095,6 +1117,7 @@ public class MessageFormat extends UFormat {
|
|||
// * <code>AttributedCharacterIterator</code> returned
|
||||
// * from <code>MessageFormat.formatToCharacterIterator</code>.
|
||||
// * @draft ICU 3.0
|
||||
// * @deprecated This is a draft API and might change in a future release of ICU.
|
||||
// */
|
||||
// public static class Field extends Format.Field {
|
||||
// /**
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -269,6 +269,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* <strong><font face=helvetica color=red>NEW</font></strong>
|
||||
* Convenience method to format a CurrencyAmount.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final String format(CurrencyAmount currAmt) {
|
||||
return format(currAmt, new StringBuffer(),
|
||||
|
@ -328,6 +329,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* Format a CurrencyAmount.
|
||||
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public StringBuffer format(CurrencyAmount currAmt,
|
||||
StringBuffer toAppendTo,
|
||||
|
@ -564,35 +566,41 @@ public abstract class NumberFormat extends UFormat {
|
|||
* locales already supported by ICU.
|
||||
*
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static abstract class NumberFormatFactory {
|
||||
/**
|
||||
* Value passed to format requesting a default number format.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FORMAT_NUMBER = NUMBERSTYLE;
|
||||
|
||||
/**
|
||||
* Value passed to format requesting a currency format.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FORMAT_CURRENCY = CURRENCYSTYLE;
|
||||
|
||||
/**
|
||||
* Value passed to format requesting a percent format.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FORMAT_PERCENT = PERCENTSTYLE;
|
||||
|
||||
/**
|
||||
* Value passed to format requesting a scientific format.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FORMAT_SCIENTIFIC = SCIENTIFICSTYLE;
|
||||
|
||||
/**
|
||||
* Value passed to format requesting an integer format.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int FORMAT_INTEGER = INTEGERSTYLE;
|
||||
|
||||
|
@ -602,6 +610,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* be listed by getAvailableLocales. This value must not change.
|
||||
* @return true if the factory is visible.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
///CLOVER:OFF
|
||||
public boolean visible() {
|
||||
|
@ -614,6 +623,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* supported by this factory.
|
||||
* @return the supported locale names.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract Set getSupportedLocaleNames();
|
||||
|
||||
|
@ -626,11 +636,13 @@ public abstract class NumberFormat extends UFormat {
|
|||
* @param formatType the type of format
|
||||
* @return the NumberFormat, or null.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract NumberFormat createFormat(Locale loc, int formatType);
|
||||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected NumberFormatFactory() {
|
||||
}
|
||||
|
@ -639,6 +651,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
/**
|
||||
* A NumberFormatFactory that supports a single locale. It can be visible or invisible.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static abstract class SimpleNumberFormatFactory extends NumberFormatFactory {
|
||||
final Set localeNames;
|
||||
|
@ -646,6 +659,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleNumberFormatFactory(Locale locale) {
|
||||
this(locale, true);
|
||||
|
@ -653,6 +667,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleNumberFormatFactory(Locale locale, boolean visible) {
|
||||
localeNames = Collections.singleton(LocaleUtility.canonicalLocaleString(locale));
|
||||
|
@ -661,6 +676,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final boolean visible() {
|
||||
return visible;
|
||||
|
@ -668,6 +684,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
|
||||
/**
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final Set getSupportedLocaleNames() {
|
||||
return localeNames;
|
||||
|
@ -722,6 +739,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* @param factory the factory to register
|
||||
* @return a key with which to unregister the factory
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Object registerFactory(NumberFormatFactory factory) {
|
||||
if (factory == null) {
|
||||
|
@ -736,6 +754,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* @param registryKey a key obtained from registerFactory
|
||||
* @return true if the object was successfully unregistered
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static boolean unregister(Object registryKey) {
|
||||
if (registryKey == null) {
|
||||
|
@ -954,6 +973,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* @param theCurrency new currency object to use. May be null for
|
||||
* some subclasses.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setCurrency(Currency theCurrency) {
|
||||
currency = theCurrency;
|
||||
|
@ -963,6 +983,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
* Gets the <tt>Currency</tt> object used to display currency
|
||||
* amounts. This may be null.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Currency getCurrency() {
|
||||
return currency;
|
||||
|
@ -1332,6 +1353,7 @@ public abstract class NumberFormat extends UFormat {
|
|||
/**
|
||||
* Empty constructor.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected NumberFormat() {
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.ibm.icu.util.ByteArrayWrapper;
|
|||
* }
|
||||
* </code>
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @see RuleBasedCollator
|
||||
* @see CollationKey
|
||||
*/
|
||||
|
@ -42,6 +43,7 @@ public final class RawCollationKey extends ByteArrayWrapper
|
|||
/**
|
||||
* Default constructor, internal byte array is null and its size set to 0.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public RawCollationKey()
|
||||
{
|
||||
|
@ -52,6 +54,7 @@ public final class RawCollationKey extends ByteArrayWrapper
|
|||
* capacity. Size of the internal byte array will be set to 0.
|
||||
* @param capacity length of internal byte array
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public RawCollationKey(int capacity)
|
||||
{
|
||||
|
@ -63,6 +66,7 @@ public final class RawCollationKey extends ByteArrayWrapper
|
|||
* Size of the internal byte array will be set to 0.
|
||||
* @param bytes byte array to be adopted by RawCollationKey
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public RawCollationKey(byte[] bytes)
|
||||
{
|
||||
|
@ -77,6 +81,7 @@ public final class RawCollationKey extends ByteArrayWrapper
|
|||
* @exception ArrayIndexOutOfBoundsException thrown if size is >
|
||||
* bytes.length
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public RawCollationKey(byte[] bytes, int size)
|
||||
{
|
||||
|
@ -107,6 +112,7 @@ public final class RawCollationKey extends ByteArrayWrapper
|
|||
* > 0 if this RawCollationKey has a bigger sort order than
|
||||
* target.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int compareTo(RawCollationKey target)
|
||||
{
|
||||
|
|
|
@ -18,9 +18,7 @@ import java.io.IOException;
|
|||
|
||||
public class RuleBasedBreakIterator extends BreakIterator {
|
||||
|
||||
|
||||
private RuleBasedBreakIterator delegatedThis = null;
|
||||
|
||||
private RuleBasedBreakIterator delegatedThis = null;
|
||||
|
||||
//=======================================================================
|
||||
// constructors
|
||||
|
@ -37,7 +35,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @stable ICU 2.0
|
||||
*/
|
||||
public RuleBasedBreakIterator(String description) {
|
||||
delegatedThis = new RuleBasedBreakIterator_Old(description);
|
||||
delegatedThis = new RuleBasedBreakIterator_Old(description);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,7 +45,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @internal ICU 3.0
|
||||
*/
|
||||
protected RuleBasedBreakIterator() {
|
||||
delegatedThis = this;
|
||||
delegatedThis = this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,15 +57,16 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @return A RuleBasedBreakIterator based on the supplied break rules.
|
||||
* @throws IOException
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static RuleBasedBreakIterator getInstanceFromCompiledRules(InputStream is) throws IOException {
|
||||
return RuleBasedBreakIterator_New.getInstanceFromCompiledRules(is);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// boilerplate
|
||||
//=======================================================================
|
||||
|
||||
/**
|
||||
* Clones this iterator.
|
||||
* @return A newly-constructed RuleBasedBreakIterator with the same
|
||||
|
@ -97,7 +96,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @stable ICU 2.0
|
||||
*/
|
||||
public boolean equals(Object that) {
|
||||
return delegatedThis.equals(that);
|
||||
return delegatedThis.equals(that);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,39 +117,77 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
return delegatedThis.hashCode();
|
||||
}
|
||||
|
||||
|
||||
/** Tag value for "words" that do not fit into any of other categories.
|
||||
* Includes spaces and most punctuation.
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_NONE = 0;
|
||||
/** Upper bound for tags for uncategorized words.
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_NONE_LIMIT = 100;
|
||||
/** Tag value for words that appear to be numbers, lower limit.
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_NUMBER = 100;
|
||||
/** Tag value for words that appear to be numbers, upper limit.
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_NUMBER_LIMIT = 200;
|
||||
/** Tag value for words that contain letters, excluding
|
||||
* hiragana, katakana or ideographic characters, lower limit.
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_LETTER = 200;
|
||||
/** Tag value for words containing letters, upper limit
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_LETTER_LIMIT = 300;
|
||||
/** Tag value for words containing kana characters, lower limit
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_KANA = 300;
|
||||
/** Tag value for words containing kana characters, upper limit
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_KANA_LIMIT = 400;
|
||||
/** Tag value for words containing ideographic characters, lower limit
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_IDEO = 400;
|
||||
/** Tag value for words containing ideographic characters, upper limit
|
||||
* @draft ICU 3.0 */
|
||||
public static final int WORD_IDEO_LIMIT = 500;
|
||||
/**
|
||||
* Tag value for "words" that do not fit into any of other categories.
|
||||
* Includes spaces and most punctuation.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_NONE = 0;
|
||||
|
||||
/**
|
||||
* Upper bound for tags for uncategorized words.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_NONE_LIMIT = 100;
|
||||
|
||||
/**
|
||||
* Tag value for words that appear to be numbers, lower limit.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_NUMBER = 100;
|
||||
|
||||
/**
|
||||
* Tag value for words that appear to be numbers, upper limit.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_NUMBER_LIMIT = 200;
|
||||
|
||||
/**
|
||||
* Tag value for words that contain letters, excluding
|
||||
* hiragana, katakana or ideographic characters, lower limit.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_LETTER = 200;
|
||||
|
||||
/**
|
||||
* Tag value for words containing letters, upper limit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_LETTER_LIMIT = 300;
|
||||
|
||||
/**
|
||||
* Tag value for words containing kana characters, lower limit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_KANA = 300;
|
||||
|
||||
/**
|
||||
* Tag value for words containing kana characters, upper limit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_KANA_LIMIT = 400;
|
||||
|
||||
/**
|
||||
* Tag value for words containing ideographic characters, lower limit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_IDEO = 400;
|
||||
|
||||
/**
|
||||
* Tag value for words containing ideographic characters, upper limit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int WORD_IDEO_LIMIT = 500;
|
||||
|
||||
//=======================================================================
|
||||
// BreakIterator overrides
|
||||
|
@ -162,18 +199,20 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @return The offset of the beginning of the text.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int first() {
|
||||
return delegatedThis.first();
|
||||
}
|
||||
public int first() {
|
||||
return delegatedThis.first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current iteration position to the end of the text.
|
||||
* (i.e., the CharacterIterator's ending offset).
|
||||
* @return The text's past-the-end offset.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int last() {
|
||||
return delegatedThis.last();
|
||||
}
|
||||
public int last() {
|
||||
return delegatedThis.last();
|
||||
}
|
||||
|
||||
/**
|
||||
* Advances the iterator either forward or backward the specified number of steps.
|
||||
* Negative values move backward, and positive values move forward. This is
|
||||
|
@ -184,25 +223,28 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* the current one.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int next(int n) {
|
||||
return delegatedThis.next(n);
|
||||
}
|
||||
public int next(int n) {
|
||||
return delegatedThis.next(n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advances the iterator to the next boundary position.
|
||||
* @return The position of the first boundary after this one.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int next() {
|
||||
return delegatedThis.next();
|
||||
}
|
||||
public int next() {
|
||||
return delegatedThis.next();
|
||||
}
|
||||
|
||||
/**
|
||||
* Advances the iterator backwards, to the last boundary preceding this one.
|
||||
* @return The position of the last boundary position preceding this one.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int previous() {
|
||||
return delegatedThis.previous();
|
||||
}
|
||||
public int previous() {
|
||||
return delegatedThis.previous();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the iterator to refer to the first boundary position following
|
||||
* the specified position.
|
||||
|
@ -210,9 +252,10 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @return The position of the first break after the current position.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int following(int offset) {
|
||||
return delegatedThis.following(offset);
|
||||
}
|
||||
public int following(int offset) {
|
||||
return delegatedThis.following(offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the iterator to refer to the last boundary position before the
|
||||
* specified position.
|
||||
|
@ -221,96 +264,92 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
|||
* @stable ICU 2.0
|
||||
*/
|
||||
public int preceding(int offset) {
|
||||
return delegatedThis.preceding(offset);
|
||||
return delegatedThis.preceding(offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specfied position is a boundary position. As a side
|
||||
* effect, leaves the iterator pointing to the first boundary position at
|
||||
* or after "offset".
|
||||
* @param offset the offset to check.
|
||||
* @return True if "offset" is a boundary position.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public boolean isBoundary(int offset) {
|
||||
return delegatedThis.isBoundary(offset);
|
||||
}
|
||||
/**
|
||||
* Returns true if the specfied position is a boundary position. As a side
|
||||
* effect, leaves the iterator pointing to the first boundary position at
|
||||
* or after "offset".
|
||||
* @param offset the offset to check.
|
||||
* @return True if "offset" is a boundary position.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public boolean isBoundary(int offset) {
|
||||
return delegatedThis.isBoundary(offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current iteration position.
|
||||
* @return The current iteration position.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int current() {
|
||||
return delegatedThis.current();
|
||||
}
|
||||
/**
|
||||
* Returns the current iteration position.
|
||||
* @return The current iteration position.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public int current() {
|
||||
return delegatedThis.current();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the status tag from the break rule that determined the most recently
|
||||
* returned break position. The values appear in the rule source
|
||||
* within brackets, {123}, for example. For rules that do not specify a
|
||||
* status, a default value of 0 is returned. If more than one rule applies,
|
||||
* the numerically largest of the possible status values is returned.
|
||||
* <p>
|
||||
* Of the standard types of ICU break iterators, only the word break
|
||||
* iterator provides status values. The values are defined in
|
||||
* <code>enum UWordBreak</code>, and allow distinguishing between words
|
||||
* that contain alphabetic letters, "words" that appear to be numbers,
|
||||
* punctuation and spaces, words containing ideographic characters, and
|
||||
* more. Call <code>getRuleStatus</code> after obtaining a boundary
|
||||
* position from <code>next()<code>, <code>previous()</code>, or
|
||||
* any other break iterator functions that returns a boundary position.
|
||||
* <p>
|
||||
* @return the status from the break rule that determined the most recently
|
||||
* returned break position.
|
||||
*
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getRuleStatus() {
|
||||
return delegatedThis.getRuleStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status (tag) values from the break rule(s) that determined the most
|
||||
* recently returned break position. The values appear in the rule source
|
||||
* within brackets, {123}, for example. The default status value for rules
|
||||
* that do not explicitly provide one is zero.
|
||||
* <p>
|
||||
* For word break iterators, the possible values are defined in enum UWordBreak.
|
||||
* <p>
|
||||
* If the size of the output array is insufficient to hold the data,
|
||||
* the output will be truncated to the available length. No exception
|
||||
* will be thrown.
|
||||
*
|
||||
* @param fillInArray an array to be filled in with the status values.
|
||||
* @return The number of rule status values from rules that determined
|
||||
* the most recent boundary returned by the break iterator.
|
||||
* In the event that the array is too small, the return value
|
||||
* is the total number of status values that were available,
|
||||
* not the reduced number that were actually returned.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getRuleStatusVec(int[] fillInArray) {
|
||||
return delegatedThis.getRuleStatusVec(fillInArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the status tag from the break rule that determined the most recently
|
||||
* returned break position. The values appear in the rule source
|
||||
* within brackets, {123}, for example. For rules that do not specify a
|
||||
* status, a default value of 0 is returned. If more than one rule applies,
|
||||
* the numerically largest of the possible status values is returned.
|
||||
* <p>
|
||||
* Of the standard types of ICU break iterators, only the word break
|
||||
* iterator provides status values. The values are defined in
|
||||
* <code>enum UWordBreak</code>, and allow distinguishing between words
|
||||
* that contain alphabetic letters, "words" that appear to be numbers,
|
||||
* punctuation and spaces, words containing ideographic characters, and
|
||||
* more. Call <code>getRuleStatus</code> after obtaining a boundary
|
||||
* position from <code>next()<code>, <code>previous()</code>, or
|
||||
* any other break iterator functions that returns a boundary position.
|
||||
* <p>
|
||||
* @return the status from the break rule that determined the most recently
|
||||
* returned break position.
|
||||
*
|
||||
* @draft ICU 3.0
|
||||
*/
|
||||
public int getRuleStatus() {
|
||||
return delegatedThis.getRuleStatus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the status (tag) values from the break rule(s) that determined the most
|
||||
* recently returned break position. The values appear in the rule source
|
||||
* within brackets, {123}, for example. The default status value for rules
|
||||
* that do not explicitly provide one is zero.
|
||||
* <p>
|
||||
* For word break iterators, the possible values are defined in enum UWordBreak.
|
||||
* <p>
|
||||
* If the size of the output array is insufficient to hold the data,
|
||||
* the output will be truncated to the available length. No exception
|
||||
* will be thrown.
|
||||
*
|
||||
* @param fillInArray an array to be filled in with the status values.
|
||||
* @return The number of rule status values from rules that determined
|
||||
* the most recent boundary returned by the break iterator.
|
||||
* In the event that the array is too small, the return value
|
||||
* is the total number of status values that were available,
|
||||
* not the reduced number that were actually returned.
|
||||
* @draft ICU 3.0
|
||||
*/
|
||||
public int getRuleStatusVec(int[] fillInArray) {
|
||||
return delegatedThis.getRuleStatusVec(fillInArray);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a CharacterIterator over the text being analyzed. This version
|
||||
* of this method returns the actual CharacterIterator we're using internally.
|
||||
* Changing the state of this iterator can have undefined consequences. If
|
||||
* you need to change it, clone it first.
|
||||
* @return An iterator over the text being analyzed.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public CharacterIterator getText() {
|
||||
return delegatedThis.getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a CharacterIterator over the text being analyzed. This version
|
||||
* of this method returns the actual CharacterIterator we're using internally.
|
||||
* Changing the state of this iterator can have undefined consequences. If
|
||||
* you need to change it, clone it first.
|
||||
* @return An iterator over the text being analyzed.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public CharacterIterator getText() {
|
||||
return delegatedThis.getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the iterator to analyze a new piece of text. This function resets
|
||||
|
@ -318,7 +357,7 @@ public int getRuleStatus() {
|
|||
* @param newText An iterator over the text to analyze.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
public void setText(CharacterIterator newText) {
|
||||
delegatedThis.setText(newText);
|
||||
}
|
||||
public void setText(CharacterIterator newText) {
|
||||
delegatedThis.setText(newText);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -562,6 +562,7 @@ private void makeRuleStatusValid() {
|
|||
* returned break position.
|
||||
*
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
|
||||
public int getRuleStatus() {
|
||||
|
@ -601,6 +602,7 @@ public int getRuleStatus() {
|
|||
* is the total number of status values that were available,
|
||||
* not the reduced number that were actually returned.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getRuleStatusVec(int[] fillInArray) {
|
||||
makeRuleStatusValid();
|
||||
|
|
|
@ -837,6 +837,7 @@ throws IOException {
|
|||
* <p>
|
||||
*
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getRuleStatus() {
|
||||
return 0;
|
||||
|
@ -854,6 +855,7 @@ throws IOException {
|
|||
* status can be declared, and a status of zero is always assumed.
|
||||
* <p>
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getRuleStatusVec(int[] fillInArray) {
|
||||
if (fillInArray != null && fillInArray.length >= 1) {
|
||||
|
|
|
@ -257,6 +257,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* will be created for use.
|
||||
* @see CollationElementIterator
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public CollationElementIterator getCollationElementIterator(
|
||||
UCharacterIterator source)
|
||||
|
@ -465,6 +466,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @see #getNumericCollation
|
||||
* @see #setNumericCollation
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setNumericCollationDefault()
|
||||
{
|
||||
|
@ -601,6 +603,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @see #getVariableTop
|
||||
* @see RuleBasedCollator#setAlternateHandlingShifted
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int setVariableTop(String varTop)
|
||||
{
|
||||
|
@ -646,6 +649,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @see #getVariableTop
|
||||
* @see #setVariableTop
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setVariableTop(int varTop)
|
||||
{
|
||||
|
@ -660,6 +664,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @see #getNumericCollation
|
||||
* @see #setNumericCollationDefault
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setNumericCollation(boolean flag)
|
||||
{
|
||||
|
@ -691,6 +696,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @return the current rules that defines this Collator.
|
||||
* @see #getRules
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getRules(boolean fullrules)
|
||||
{
|
||||
|
@ -771,6 +777,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @see #compare(String, String)
|
||||
* @see RawCollationKey
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public RawCollationKey getRawCollationKey(String source,
|
||||
RawCollationKey key)
|
||||
|
@ -930,6 +937,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @return the variable top value of a Collator.
|
||||
* @see #setVariableTop
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getVariableTop()
|
||||
{
|
||||
|
@ -945,6 +953,7 @@ public final class RuleBasedCollator extends Collator
|
|||
* @see #setNumericCollationDefault
|
||||
* @return true if numeric collation is turned on, false otherwise
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean getNumericCollation()
|
||||
{
|
||||
|
@ -4410,6 +4419,7 @@ public final class RuleBasedCollator extends Collator
|
|||
/** Get the version of this collator object.
|
||||
* @return the version object associated with this collator
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public VersionInfo getVersion() {
|
||||
/* RunTime version */
|
||||
|
@ -4441,6 +4451,7 @@ public final class RuleBasedCollator extends Collator
|
|||
/** Get the UCA version of this collator object.
|
||||
* @return the version object associated with this collator
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public VersionInfo getUCAVersion() {
|
||||
return UCA_.m_UCA_version_;
|
||||
|
|
|
@ -1050,6 +1050,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
|||
* Return the name of the current default rule set.
|
||||
* @return the name of the current default rule set, if it is public, else the empty string.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDefaultRuleSetName() {
|
||||
if (defaultRuleSet != null && defaultRuleSet.isPublic()) {
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.ibm.icu.lang.UCharacterDirection;
|
|||
* </ol>
|
||||
* @author Ram Viswanadha
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final class StringPrep {
|
||||
/**
|
||||
|
@ -57,6 +58,7 @@ public final class StringPrep {
|
|||
*
|
||||
* @see #prepare
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int DEFAULT = 0x0000;
|
||||
|
||||
|
@ -65,6 +67,7 @@ public final class StringPrep {
|
|||
*
|
||||
* @see #prepare
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ALLOW_UNASSIGNED = 0x0001;
|
||||
|
||||
|
@ -158,6 +161,7 @@ public final class StringPrep {
|
|||
* @param inputStream The stream for reading the StringPrep profile binarySun
|
||||
* @throws IOException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public StringPrep(InputStream inputStream) throws IOException{
|
||||
|
||||
|
@ -365,6 +369,7 @@ public final class StringPrep {
|
|||
* @return StringBuffer A StringBuffer containing the output
|
||||
* @throws ParseException
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public StringBuffer prepare(UCharacterIterator src, int options)
|
||||
throws StringPrepParseException{
|
||||
|
|
|
@ -14,46 +14,57 @@ import java.text.ParseException;
|
|||
*
|
||||
* @author Ram Viswanadha
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class StringPrepParseException extends ParseException {
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int INVALID_CHAR_FOUND = 0;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ILLEGAL_CHAR_FOUND = 1;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int PROHIBITED_ERROR = 2;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int UNASSIGNED_ERROR = 3;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int CHECK_BIDI_ERROR = 4;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int STD3_ASCII_RULES_ERROR = 5;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ACE_PREFIX_ERROR = 6;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int VERIFICATION_ERROR = 7;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LABEL_TOO_LONG_ERROR = 8;
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int BUFFER_OVERFLOW_ERROR = 9;
|
||||
|
||||
|
@ -64,6 +75,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* @param message A string describing the type of error that occurred
|
||||
* @param error The error that has occurred
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public StringPrepParseException(String message,int error){
|
||||
super(message, -1);
|
||||
|
@ -80,6 +92,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* @param rules The input rules string
|
||||
* @param pos The position of error in the rules string
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public StringPrepParseException(String message,int error, String rules, int pos){
|
||||
super(message, -1);
|
||||
|
@ -100,6 +113,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* is -1. It will be set to 0 if the code populating this struct is not
|
||||
* using line numbers.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public StringPrepParseException(String message, int error, String rules, int pos, int lineNumber){
|
||||
super(message, -1);
|
||||
|
@ -115,6 +129,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* @param other The exception that this object should be compared to
|
||||
* @return true if the objects are equal, false if unequal
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean equals(Object other){
|
||||
if(!(other instanceof StringPrepParseException)){
|
||||
|
@ -128,6 +143,7 @@ public class StringPrepParseException extends ParseException {
|
|||
*
|
||||
* @return String
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String toString(){
|
||||
StringBuffer buf = new StringBuffer();
|
||||
|
@ -149,6 +165,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* is -1. It will be set to 0 if the code populating this struct is not
|
||||
* using line numbers.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
private int line;
|
||||
|
||||
|
@ -157,6 +174,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* Textual context before the error. Null-terminated.
|
||||
* May be the empty string if not implemented by parser.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
private StringBuffer preContext = new StringBuffer();
|
||||
|
||||
|
@ -164,6 +182,7 @@ public class StringPrepParseException extends ParseException {
|
|||
* Textual context after the error. Null-terminated.
|
||||
* May be the empty string if not implemented by parser.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
private StringBuffer postContext = new StringBuffer();
|
||||
|
||||
|
|
|
@ -31,12 +31,14 @@ import java.text.ParsePosition;
|
|||
* table parses the name, if there is one, and returns it.
|
||||
*
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public interface SymbolTable {
|
||||
|
||||
/**
|
||||
* The character preceding a symbol reference name.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static final char SYMBOL_REF = '$';
|
||||
|
||||
|
@ -48,6 +50,7 @@ public interface SymbolTable {
|
|||
* @return a char array containing the name's value, or null if
|
||||
* there is no mapping for s.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
char[] lookup(String s);
|
||||
|
||||
|
@ -58,6 +61,7 @@ public interface SymbolTable {
|
|||
* @return the UnicodeMatcher object represented by the given
|
||||
* character, or null if there is no mapping for ch.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
UnicodeMatcher lookupMatcher(int ch);
|
||||
|
||||
|
@ -77,6 +81,7 @@ public interface SymbolTable {
|
|||
* @return the parsed name, or null if there is no valid symbolic
|
||||
* name at the given position.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
String parseReference(String text, ParsePosition pos, int limit);
|
||||
}
|
||||
|
|
|
@ -360,6 +360,7 @@ public abstract class Transliterator {
|
|||
/**
|
||||
* Constructs a Position object that is a copy of another.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Position(Position pos) {
|
||||
set(pos);
|
||||
|
@ -368,6 +369,7 @@ public abstract class Transliterator {
|
|||
/**
|
||||
* Copies the indices of this position from another.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void set(Position pos) {
|
||||
contextStart = pos.contextStart;
|
||||
|
@ -379,6 +381,7 @@ public abstract class Transliterator {
|
|||
/**
|
||||
* Returns true if this Position is equal to the given object.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Position) {
|
||||
|
@ -394,6 +397,7 @@ public abstract class Transliterator {
|
|||
/**
|
||||
* Returns a string representation of this Position.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String toString() {
|
||||
return "[cs=" + contextStart
|
||||
|
@ -1478,6 +1482,7 @@ public abstract class Transliterator {
|
|||
* @return an array of one or more transliterators that make up
|
||||
* this transliterator
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Transliterator[] getElements() {
|
||||
Transliterator result[];
|
||||
|
|
|
@ -18,11 +18,13 @@ import com.ibm.icu.util.ULocale;
|
|||
* @author weiv
|
||||
* @author Alan Liu
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract class UFormat extends Format {
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public UFormat() {}
|
||||
|
||||
|
@ -50,6 +52,7 @@ public abstract class UFormat extends Format {
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -1069,6 +1069,7 @@ public final class UTF16
|
|||
* @return the updated StringBuffer
|
||||
* @throws IllegalArgumentException if cp is not a valid code point
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static StringBuffer appendCodePoint(StringBuffer target, int cp) {
|
||||
return append(target, cp);
|
||||
|
@ -2317,6 +2318,7 @@ public final class UTF16
|
|||
* @throws IllegalArgumentException if an invalid code point is encountered
|
||||
* @throws IndexOutOfBoundsException if the offset or count are out of bounds.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String newString(int[] codePoints, int offset, int count) {
|
||||
if (count < 0) {
|
||||
|
|
|
@ -2328,6 +2328,7 @@ public class UnicodeSet extends UnicodeFilter {
|
|||
* Add the contents of the UnicodeSet (as strings) into a collection.
|
||||
* @param target collection to add into
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void addAllTo(Collection target) {
|
||||
UnicodeSetIterator it = new UnicodeSetIterator(this);
|
||||
|
@ -2340,6 +2341,7 @@ public class UnicodeSet extends UnicodeFilter {
|
|||
* Add the contents of the collection (as strings) into this UnicodeSet.
|
||||
* @param source the collection to add
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void addAll(Collection source) {
|
||||
Iterator it = source.iterator();
|
||||
|
|
|
@ -27,13 +27,14 @@ import java.util.Locale;
|
|||
* 1/1/1 BE are rejected with an <code>IllegalArgumentException</code>.
|
||||
* <p>
|
||||
* Note This API has not been promoted to @stable and instead has been left
|
||||
* as @draft ICU 2.4. It may yet change or be removed in a future release.
|
||||
* as @draft ICU 2.8. It may yet change or be removed in a future release.
|
||||
*
|
||||
* @see com.ibm.icu.util.GregorianCalendar
|
||||
*
|
||||
* @author Laura Werner
|
||||
* @author Alan Liu
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class BuddhistCalendar extends GregorianCalendar {
|
||||
|
||||
|
@ -48,14 +49,16 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* value for the Buddhist calendar.
|
||||
*
|
||||
* @see com.ibm.icu.util.Calendar#ERA
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int BE = 0;
|
||||
|
||||
/**
|
||||
* Constructs a <code>BuddhistCalendar</code> using the current time
|
||||
* in the default time zone with the default locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar() {
|
||||
super();
|
||||
|
@ -66,7 +69,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* in the given time zone with the default locale.
|
||||
*
|
||||
* @param zone the given time zone.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar(TimeZone zone) {
|
||||
super(zone);
|
||||
|
@ -77,7 +81,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* in the default time zone with the given locale.
|
||||
*
|
||||
* @param aLocale the given locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar(Locale aLocale) {
|
||||
super(aLocale);
|
||||
|
@ -90,7 +95,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* @param zone the given time zone.
|
||||
*
|
||||
* @param aLocale the given locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar(TimeZone zone, Locale aLocale) {
|
||||
super(zone, aLocale);
|
||||
|
@ -101,7 +107,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* in the default time zone with the default locale.
|
||||
*
|
||||
* @param date The date to which the new calendar is set.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar(Date date) {
|
||||
this();
|
||||
|
@ -118,7 +125,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* The value is 0-based. e.g., 0 for January.
|
||||
*
|
||||
* @param date The value used to set the calendar's {@link #DATE DATE} time field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar(int year, int month, int date) {
|
||||
super(year, month, date);
|
||||
|
@ -140,7 +148,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* @param minute The value used to set the calendar's {@link #MINUTE MINUTE} time field.
|
||||
*
|
||||
* @param second The value used to set the calendar's {@link #SECOND SECOND} time field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public BuddhistCalendar(int year, int month, int date, int hour,
|
||||
int minute, int second)
|
||||
|
@ -159,7 +168,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
private static final int BUDDHIST_ERA_START = -543;
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetExtendedYear() {
|
||||
int year;
|
||||
|
@ -174,14 +184,16 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
|
||||
// Return JD of start of given month/year
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
|
||||
return super.handleComputeMonthStart(eyear + BUDDHIST_ERA_START, month, useMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void handleComputeFields(int julianDay) {
|
||||
super.handleComputeFields(julianDay);
|
||||
|
@ -195,7 +207,8 @@ public class BuddhistCalendar extends GregorianCalendar {
|
|||
* Override GregorianCalendar. There is only one Buddhist ERA. We
|
||||
* should really handle YEAR, YEAR_WOY, and EXTENDED_YEAR here too to
|
||||
* implement the 1..5000000 range, but it's not critical.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetLimit(int field, int limitType) {
|
||||
if (field == ERA) {
|
||||
|
|
|
@ -18,6 +18,7 @@ package com.ibm.icu.util;
|
|||
* </p>
|
||||
* @author syn wee
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class ByteArrayWrapper
|
||||
{
|
||||
|
@ -26,6 +27,7 @@ public class ByteArrayWrapper
|
|||
/**
|
||||
* Internal byte array.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public byte[] bytes;
|
||||
/**
|
||||
|
@ -33,6 +35,7 @@ public class ByteArrayWrapper
|
|||
* Different from bytes.length, size will be <= bytes.length.
|
||||
* Semantics of size is similar to java.util.Vector.size().
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int size;
|
||||
|
||||
|
@ -41,6 +44,7 @@ public class ByteArrayWrapper
|
|||
/**
|
||||
* Construct a new ByteArrayWrapper with no data.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public ByteArrayWrapper() {
|
||||
}
|
||||
|
@ -54,6 +58,7 @@ public class ByteArrayWrapper
|
|||
* The contents of the array (between 0 and size) remain unchanged.
|
||||
* @param capacity minimum length of internal byte array.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void ensureCapacity(int capacity)
|
||||
{
|
||||
|
@ -73,6 +78,7 @@ public class ByteArrayWrapper
|
|||
* @param start start offset of src to copy from
|
||||
* @param limit end + 1 offset of src to copy from
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final void set(byte[] src, int start, int limit)
|
||||
{
|
||||
|
@ -88,6 +94,7 @@ public class ByteArrayWrapper
|
|||
* @param start start offset of src to copy from
|
||||
* @param limit end + 1 offset of src to copy from
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final void append(byte[] src, int start, int limit)
|
||||
{
|
||||
|
@ -102,6 +109,7 @@ public class ByteArrayWrapper
|
|||
* byte array to null and its size to 0.
|
||||
* @return internal byte array.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final byte[] releaseBytes()
|
||||
{
|
||||
|
|
|
@ -4921,6 +4921,7 @@ public abstract class Calendar implements Serializable, Cloneable {
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -69,11 +69,12 @@ import java.util.Locale;
|
|||
*
|
||||
* <p>
|
||||
* Note This API has not been promoted to @stable and instead has been left
|
||||
* as @draft ICU 2.4. It may yet change or be removed in a future release.
|
||||
* as @draft ICU 2.8. It may yet change or be removed in a future release.
|
||||
*
|
||||
* @see com.ibm.icu.text.ChineseDateFormat
|
||||
* @author Alan Liu
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class ChineseCalendar extends Calendar {
|
||||
|
||||
|
@ -125,7 +126,8 @@ public class ChineseCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Construct a Chinese calendar with the default time zone and locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public ChineseCalendar() {
|
||||
super();
|
||||
|
@ -135,7 +137,8 @@ public class ChineseCalendar extends Calendar {
|
|||
* Construct a Chinese calendar with the given time zone and locale.
|
||||
* @param zone time zone for this calendar
|
||||
* @param locale locale for this calendar
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public ChineseCalendar(TimeZone zone, Locale locale) {
|
||||
super(zone, locale);
|
||||
|
@ -148,7 +151,8 @@ public class ChineseCalendar extends Calendar {
|
|||
/**
|
||||
* Field indicating whether or not the current month is a leap month.
|
||||
* Should have a value of 0 for non-leap months, and 1 for leap months.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static int IS_LEAP_MONTH = BASE_FIELD_COUNT;
|
||||
|
||||
|
@ -163,7 +167,8 @@ public class ChineseCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Override Calendar to allocate our additional field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int[] handleCreateFields() {
|
||||
return new int[FIELD_COUNT];
|
||||
|
@ -235,7 +240,8 @@ public class ChineseCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Override Calendar to return the limit value for the given field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetLimit(int field, int limitType) {
|
||||
return LIMITS[field][limitType];
|
||||
|
@ -246,7 +252,8 @@ public class ChineseCalendar extends Calendar {
|
|||
* defined by the current fields. This will use either the ERA and
|
||||
* YEAR field as the cycle and year-of-cycle, or the EXTENDED_YEAR
|
||||
* field as the continuous year count, depending on which is newer.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetExtendedYear() {
|
||||
int year;
|
||||
|
@ -265,7 +272,8 @@ public class ChineseCalendar extends Calendar {
|
|||
*
|
||||
* <p>Note: This method also reads the IS_LEAP_MONTH field to determine
|
||||
* whether or not the given month is a leap month.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetMonthLength(int extendedYear, int month) {
|
||||
int thisStart = handleComputeMonthStart(extendedYear, month, true) -
|
||||
|
@ -279,7 +287,8 @@ public class ChineseCalendar extends Calendar {
|
|||
* using the the given pattern. This method is responsible for
|
||||
* creating the calendar- specific DateFormat and DateFormatSymbols
|
||||
* objects as needed.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected DateFormat handleGetDateFormat(String pattern, Locale locale) {
|
||||
return new ChineseDateFormat(pattern, locale);
|
||||
|
@ -312,7 +321,8 @@ public class ChineseCalendar extends Calendar {
|
|||
/**
|
||||
* Override Calendar to add IS_LEAP_MONTH to the field resolution
|
||||
* table.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int[][][] getFieldResolutionTable() {
|
||||
return CHINESE_DATE_PRECEDENCE;
|
||||
|
@ -358,7 +368,8 @@ public class ChineseCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Override Calendar to handle leap months properly.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void add(int field, int amount) {
|
||||
switch (field) {
|
||||
|
@ -378,7 +389,8 @@ public class ChineseCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Override Calendar to handle leap months properly.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void roll(int field, int amount) {
|
||||
switch (field) {
|
||||
|
@ -619,7 +631,8 @@ public class ChineseCalendar extends Calendar {
|
|||
* calendar equivalents for the given Julian day.
|
||||
*
|
||||
* <p>Compute the ChineseCalendar-specific field IS_LEAP_MONTH.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void handleComputeFields(int julianDay) {
|
||||
|
||||
|
@ -760,7 +773,8 @@ public class ChineseCalendar extends Calendar {
|
|||
* by reading the IS_LEAP_MONTH field.
|
||||
* @return the Julian day number of the day before the first
|
||||
* day of the given month and year
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
|||
* Selector for getName() indicating a symbolic name for a
|
||||
* currency, such as "$" for USD.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SYMBOL_NAME = 0;
|
||||
|
||||
|
@ -53,6 +54,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
|||
* Selector for ucurr_getName indicating the long name for a
|
||||
* currency, such as "US Dollar" for USD.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int LONG_NAME = 1;
|
||||
|
||||
|
@ -147,6 +149,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
|||
* Registers a new currency for the provided locale. The returned object
|
||||
* is a key that can be used to unregister this currency object.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Object registerInstance(Currency currency, Locale locale) {
|
||||
return getShim().registerInstance(currency, locale);
|
||||
|
@ -156,6 +159,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
|||
* Unregister the currency associated with this key (obtained from
|
||||
* registerInstance).
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static boolean unregister(Object registryKey) {
|
||||
if (registryKey == null) {
|
||||
|
@ -229,6 +233,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
|||
* returned. If isChoiceFormat[0] is true, then the result is a
|
||||
* ChoiceFormat pattern. Otherwise it is a static string.
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getName(Locale locale,
|
||||
int nameStyle,
|
||||
|
@ -587,6 +592,7 @@ public class Currency extends MeasureUnit implements Serializable {
|
|||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final ULocale getLocale(ULocale.Type type) {
|
||||
return type == ULocale.ACTUAL_LOCALE ?
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.lang.Number;
|
|||
* @see Currency
|
||||
* @author Alan Liu
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class CurrencyAmount extends Measure {
|
||||
|
||||
|
@ -28,6 +29,7 @@ public class CurrencyAmount extends Measure {
|
|||
* @param number the number
|
||||
* @param currency the currency
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public CurrencyAmount(Number number, Currency currency) {
|
||||
super(number, currency);
|
||||
|
@ -38,6 +40,7 @@ public class CurrencyAmount extends Measure {
|
|||
* @param number a double value
|
||||
* @param currency the currency
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public CurrencyAmount(double number, Currency currency) {
|
||||
super(new Double(number), currency);
|
||||
|
@ -47,6 +50,7 @@ public class CurrencyAmount extends Measure {
|
|||
* Returns the currency of this object.
|
||||
* @return this object's Currency
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Currency getCurrency() {
|
||||
return (Currency) getUnit();
|
||||
|
|
|
@ -17,6 +17,7 @@ import java.util.Date;
|
|||
*
|
||||
* @see SimpleDateRule
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public interface DateRule
|
||||
{
|
||||
|
@ -31,6 +32,7 @@ public interface DateRule
|
|||
*
|
||||
* @see #firstBetween
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
abstract public Date firstAfter(Date start);
|
||||
|
||||
|
@ -47,6 +49,7 @@ public interface DateRule
|
|||
*
|
||||
* @see #firstAfter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
abstract public Date firstBetween(Date start, Date end);
|
||||
|
||||
|
@ -60,6 +63,7 @@ public interface DateRule
|
|||
* @param date The date to check.
|
||||
* @return true if this event occurs on the given date.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
abstract public boolean isOn(Date date);
|
||||
|
||||
|
@ -67,6 +71,7 @@ public interface DateRule
|
|||
* Check whether this event occurs at least once between the two
|
||||
* dates given.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
abstract public boolean isBetween(Date start, Date end);
|
||||
};
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.Date;
|
|||
* a fixed number of days before or after Easter. Supports both the
|
||||
* Western and Orthodox methods for calculating Easter.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class EasterHoliday extends Holiday
|
||||
{
|
||||
|
@ -22,6 +23,7 @@ public class EasterHoliday extends Holiday
|
|||
*
|
||||
* @param name The name of the holiday
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public EasterHoliday(String name)
|
||||
{
|
||||
|
@ -35,6 +37,7 @@ public class EasterHoliday extends Holiday
|
|||
* @param daysAfter The number of days before (-) or after (+) Easter
|
||||
* @param name The name of the holiday
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public EasterHoliday(int daysAfter, String name)
|
||||
{
|
||||
|
@ -50,6 +53,7 @@ public class EasterHoliday extends Holiday
|
|||
* @param orthodox Use the Orthodox calendar?
|
||||
* @param name The name of the holiday
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public EasterHoliday(int daysAfter, boolean orthodox, String name)
|
||||
{
|
||||
|
@ -59,72 +63,84 @@ public class EasterHoliday extends Holiday
|
|||
/**
|
||||
* Shrove Tuesday, aka Mardi Gras, 48 days before Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday SHROVE_TUESDAY = new EasterHoliday(-48, "Shrove Tuesday");
|
||||
|
||||
/**
|
||||
* Ash Wednesday, start of Lent, 47 days before Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday ASH_WEDNESDAY = new EasterHoliday(-47, "Ash Wednesday");
|
||||
|
||||
/**
|
||||
* Palm Sunday, 7 days before Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday PALM_SUNDAY = new EasterHoliday( -7, "Palm Sunday");
|
||||
|
||||
/**
|
||||
* Maundy Thursday, 3 days before Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday MAUNDY_THURSDAY = new EasterHoliday( -3, "Maundy Thursday");
|
||||
|
||||
/**
|
||||
* Good Friday, 2 days before Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday GOOD_FRIDAY = new EasterHoliday( -2, "Good Friday");
|
||||
|
||||
/**
|
||||
* Easter Sunday
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday EASTER_SUNDAY = new EasterHoliday( 0, "Easter Sunday");
|
||||
|
||||
/**
|
||||
* Easter Monday, 1 day after Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday EASTER_MONDAY = new EasterHoliday( 1, "Easter Monday");
|
||||
|
||||
/**
|
||||
* Ascension, 39 days after Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday ASCENSION = new EasterHoliday( 39, "Ascension");
|
||||
|
||||
/**
|
||||
* Pentecost (aka Whit Sunday), 49 days after Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday PENTECOST = new EasterHoliday( 49, "Pentecost");
|
||||
|
||||
/**
|
||||
* Whit Sunday (aka Pentecost), 49 days after Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday WHIT_SUNDAY = new EasterHoliday( 49, "Whit Sunday");
|
||||
|
||||
/**
|
||||
* Whit Monday, 50 days after Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday WHIT_MONDAY = new EasterHoliday( 50, "Whit Monday");
|
||||
|
||||
/**
|
||||
* Corpus Christi, 60 days after Easter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final EasterHoliday CORPUS_CHRISTI = new EasterHoliday( 60, "Corpus Christi");
|
||||
}
|
||||
|
|
|
@ -57,13 +57,14 @@ import java.util.Locale;
|
|||
* </ul>
|
||||
* <p>
|
||||
* Note This API has not been promoted to @stable and instead has been left
|
||||
* as @draft ICU 2.4. It may yet change or be removed in a future release.
|
||||
* as @draft ICU 2.8. It may yet change or be removed in a future release.
|
||||
*
|
||||
* @see com.ibm.icu.util.GregorianCalendar
|
||||
*
|
||||
* @author Laura Werner
|
||||
* @author Alan Liu
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class HebrewCalendar extends Calendar {
|
||||
|
||||
|
@ -76,31 +77,36 @@ public class HebrewCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Constant for Tishri, the 1st month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TISHRI = 0;
|
||||
|
||||
/**
|
||||
* Constant for Heshvan, the 2nd month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int HESHVAN = 1;
|
||||
|
||||
/**
|
||||
* Constant for Kislev, the 3rd month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int KISLEV = 2;
|
||||
|
||||
/**
|
||||
* Constant for Tevet, the 4th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TEVET = 3;
|
||||
|
||||
/**
|
||||
* Constant for Shevat, the 5th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SHEVAT = 4;
|
||||
|
||||
|
@ -108,49 +114,57 @@ public class HebrewCalendar extends Calendar {
|
|||
* Constant for Adar I, the 6th month of the Hebrew year
|
||||
* (present in leap years only). In non-leap years, the calendar
|
||||
* jumps from Shevat (5th month) to Adar (7th month).
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ADAR_1 = 5;
|
||||
|
||||
/**
|
||||
* Constant for the Adar, the 7th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ADAR = 6;
|
||||
|
||||
/**
|
||||
* Constant for Nisan, the 8th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int NISAN = 7;
|
||||
|
||||
/**
|
||||
* Constant for Iyar, the 9th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int IYAR = 8;
|
||||
|
||||
/**
|
||||
* Constant for Sivan, the 10th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SIVAN = 9;
|
||||
|
||||
/**
|
||||
* Constant for Tammuz, the 11th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int TAMUZ = 10;
|
||||
|
||||
/**
|
||||
* Constant for Av, the 12th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int AV = 11;
|
||||
|
||||
/**
|
||||
* Constant for Elul, the 13th month of the Hebrew year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int ELUL = 12;
|
||||
|
||||
|
@ -270,7 +284,8 @@ public class HebrewCalendar extends Calendar {
|
|||
/**
|
||||
* Constructs a default <code>HebrewCalendar</code> using the current time
|
||||
* in the default time zone with the default locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar() {
|
||||
this(TimeZone.getDefault(), Locale.getDefault());
|
||||
|
@ -281,7 +296,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* in the given time zone with the default locale.
|
||||
*
|
||||
* @param zone The time zone for the new calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar(TimeZone zone) {
|
||||
this(zone, Locale.getDefault());
|
||||
|
@ -292,7 +308,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* in the default time zone with the given locale.
|
||||
*
|
||||
* @param aLocale The locale for the new calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar(Locale aLocale) {
|
||||
this(TimeZone.getDefault(), aLocale);
|
||||
|
@ -305,7 +322,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* @param zone The time zone for the new calendar.
|
||||
*
|
||||
* @param aLocale The locale for the new calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar(TimeZone zone, Locale aLocale) {
|
||||
super(zone, aLocale);
|
||||
|
@ -322,7 +340,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* The value is 0-based. e.g., 0 for Tishri.
|
||||
*
|
||||
* @param date The value used to set the calendar's {@link #DATE DATE} time field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar(int year, int month, int date) {
|
||||
super(TimeZone.getDefault(), Locale.getDefault());
|
||||
|
@ -336,7 +355,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* in the default time zone with the default locale.
|
||||
*
|
||||
* @param date The date to which the new calendar is set.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar(Date date) {
|
||||
super(TimeZone.getDefault(), Locale.getDefault());
|
||||
|
@ -359,7 +379,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* @param minute The value used to set the calendar's {@link #MINUTE MINUTE} time field.
|
||||
*
|
||||
* @param second The value used to set the calendar's {@link #SECOND SECOND} time field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewCalendar(int year, int month, int date, int hour,
|
||||
int minute, int second)
|
||||
|
@ -405,7 +426,8 @@ public class HebrewCalendar extends Calendar {
|
|||
*
|
||||
* @exception IllegalArgumentException if the field is invalid or refers
|
||||
* to a field that cannot be handled by this method.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void add(int field, int amount)
|
||||
{
|
||||
|
@ -491,7 +513,8 @@ public class HebrewCalendar extends Calendar {
|
|||
*
|
||||
* @exception IllegalArgumentException if the field is invalid or refers
|
||||
* to a field that cannot be handled by this method.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void roll(int field, int amount)
|
||||
{
|
||||
|
@ -665,7 +688,8 @@ public class HebrewCalendar extends Calendar {
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetLimit(int field, int limitType) {
|
||||
return LIMITS[field][limitType];
|
||||
|
@ -673,7 +697,8 @@ public class HebrewCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Returns the length of the given month in the given year
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetMonthLength(int extendedYear, int month) {
|
||||
|
||||
|
@ -691,7 +716,8 @@ public class HebrewCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Returns the number of days in the given Hebrew year
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetYearLength(int eyear) {
|
||||
return (int)(startOfYear(eyear+1) - startOfYear(eyear));
|
||||
|
@ -720,7 +746,8 @@ public class HebrewCalendar extends Calendar {
|
|||
* <p>In addition, subclasses should compute any subclass-specific
|
||||
* fields, that is, fields from BASE_FIELD_COUNT to
|
||||
* getFieldCount() - 1.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void handleComputeFields(int julianDay) {
|
||||
long d = julianDay - 347997;
|
||||
|
@ -760,7 +787,8 @@ public class HebrewCalendar extends Calendar {
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetExtendedYear() {
|
||||
int year;
|
||||
|
@ -774,7 +802,8 @@ public class HebrewCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Return JD of start of given month/year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ package com.ibm.icu.util;
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class HebrewHoliday extends Holiday
|
||||
{
|
||||
|
@ -19,6 +20,7 @@ public class HebrewHoliday extends Holiday
|
|||
*
|
||||
* @param name The name of the holiday
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewHoliday(int month, int date, String name)
|
||||
{
|
||||
|
@ -27,6 +29,7 @@ public class HebrewHoliday extends Holiday
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public HebrewHoliday(int month, int date, int length, String name)
|
||||
{
|
||||
|
@ -35,121 +38,145 @@ public class HebrewHoliday extends Holiday
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday ROSH_HASHANAH = new HebrewHoliday(HebrewCalendar.TISHRI, 1, 2, "Rosh Hashanah");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday GEDALIAH = new HebrewHoliday(HebrewCalendar.TISHRI, 3, "Fast of Gedaliah");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday YOM_KIPPUR = new HebrewHoliday(HebrewCalendar.TISHRI, 10, "Yom Kippur");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday SUKKOT = new HebrewHoliday(HebrewCalendar.TISHRI, 15, 6, "Sukkot");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday HOSHANAH_RABBAH = new HebrewHoliday(HebrewCalendar.TISHRI, 21, "Hoshanah Rabbah");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday SHEMINI_ATZERET = new HebrewHoliday(HebrewCalendar.TISHRI, 22, "Shemini Atzeret");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday SIMCHAT_TORAH = new HebrewHoliday(HebrewCalendar.TISHRI, 23, "Simchat Torah");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday HANUKKAH = new HebrewHoliday(HebrewCalendar.KISLEV, 25, "Hanukkah");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday TEVET_10 = new HebrewHoliday(HebrewCalendar.TEVET, 10, "Fast of Tevet 10");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday TU_BSHEVAT = new HebrewHoliday(HebrewCalendar.SHEVAT, 15, "Tu B'Shevat");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday ESTHER = new HebrewHoliday(HebrewCalendar.ADAR, 13, "Fast of Esther");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday PURIM = new HebrewHoliday(HebrewCalendar.ADAR, 14, "Purim");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday SHUSHAN_PURIM = new HebrewHoliday(HebrewCalendar.ADAR, 15, "Shushan Purim");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday PASSOVER = new HebrewHoliday(HebrewCalendar.NISAN, 15, 8, "Passover");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday YOM_HASHOAH = new HebrewHoliday(HebrewCalendar.NISAN, 27, "Yom Hashoah");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday YOM_HAZIKARON = new HebrewHoliday(HebrewCalendar.IYAR, 4, "Yom Hazikaron");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday YOM_HAATZMAUT = new HebrewHoliday(HebrewCalendar.IYAR, 5, "Yom Ha'Atzmaut");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday PESACH_SHEINI = new HebrewHoliday(HebrewCalendar.IYAR, 14, "Pesach Sheini");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday LAG_BOMER = new HebrewHoliday(HebrewCalendar.IYAR, 18, "Lab B'Omer");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday YOM_YERUSHALAYIM = new HebrewHoliday(HebrewCalendar.IYAR, 28, "Yom Yerushalayim");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday SHAVUOT = new HebrewHoliday(HebrewCalendar.SIVAN, 6, 2, "Shavuot");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday TAMMUZ_17 = new HebrewHoliday(HebrewCalendar.TAMUZ, 17, "Fast of Tammuz 17");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday TISHA_BAV = new HebrewHoliday(HebrewCalendar.AV, 9, "Fast of Tisha B'Av");
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static HebrewHoliday SELIHOT = new HebrewHoliday(HebrewCalendar.ELUL, 21, "Selihot");
|
||||
}
|
||||
|
|
|
@ -15,11 +15,13 @@ import java.util.ResourceBundle;
|
|||
/**
|
||||
* An abstract class representing a holiday.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract class Holiday implements DateRule
|
||||
{
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Holiday[] getHolidays()
|
||||
{
|
||||
|
@ -28,6 +30,7 @@ public abstract class Holiday implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Holiday[] getHolidays(Locale locale)
|
||||
{
|
||||
|
@ -53,6 +56,7 @@ public abstract class Holiday implements DateRule
|
|||
*
|
||||
* @see #firstBetween
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Date firstAfter(Date start) {
|
||||
return rule.firstAfter(start);
|
||||
|
@ -70,6 +74,7 @@ public abstract class Holiday implements DateRule
|
|||
*
|
||||
* @see #firstAfter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Date firstBetween(Date start, Date end) {
|
||||
return rule.firstBetween(start, end);
|
||||
|
@ -83,7 +88,7 @@ public abstract class Holiday implements DateRule
|
|||
* @param date The date to check.
|
||||
* @return true if this holiday occurs on the given date.
|
||||
* @draft ICU 2.8
|
||||
*
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isOn(Date date) {
|
||||
//System.out.println(name + ".isOn(" + date.toString() + "):");
|
||||
|
@ -94,6 +99,7 @@ public abstract class Holiday implements DateRule
|
|||
* Check whether this holiday occurs at least once between the two
|
||||
* dates given.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isBetween(Date start, Date end) {
|
||||
return rule.isBetween(start, end);
|
||||
|
@ -111,6 +117,7 @@ public abstract class Holiday implements DateRule
|
|||
* falls. Holiday's implementation of the DateRule inteface
|
||||
* simply delegates to this DateRule object.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected Holiday(String name, DateRule rule)
|
||||
{
|
||||
|
@ -121,6 +128,7 @@ public abstract class Holiday implements DateRule
|
|||
/**
|
||||
* Return the name of this holiday in the language of the default locale
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayName() {
|
||||
return getDisplayName(Locale.getDefault());
|
||||
|
@ -136,6 +144,7 @@ public abstract class Holiday implements DateRule
|
|||
*
|
||||
* @see ResourceBundle
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayName(Locale locale)
|
||||
{
|
||||
|
@ -153,6 +162,7 @@ public abstract class Holiday implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public DateRule getRule() {
|
||||
return rule;
|
||||
|
@ -160,6 +170,7 @@ public abstract class Holiday implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setRule(DateRule rule) {
|
||||
this.rule = rule;
|
||||
|
|
|
@ -62,13 +62,14 @@ import java.util.Locale;
|
|||
* is called, an approximation of the true lunar calendar will be used.
|
||||
* <p>
|
||||
* Note This API has not been promoted to @stable and instead has been left
|
||||
* as @draft ICU 2.4. It may yet change or be removed in a future release.
|
||||
* as @draft ICU 2.8. It may yet change or be removed in a future release.
|
||||
*
|
||||
* @see com.ibm.icu.util.GregorianCalendar
|
||||
*
|
||||
* @author Laura Werner
|
||||
* @author Alan Liu
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class IslamicCalendar extends Calendar {
|
||||
|
||||
|
@ -80,73 +81,85 @@ public class IslamicCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Constant for Muharram, the 1st month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int MUHARRAM = 0;
|
||||
|
||||
/**
|
||||
* Constant for Safar, the 2nd month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SAFAR = 1;
|
||||
|
||||
/**
|
||||
* Constant for Rabi' al-awwal (or Rabi' I), the 3rd month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int RABI_1 = 2;
|
||||
|
||||
/**
|
||||
* Constant for Rabi' al-thani or (Rabi' II), the 4th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int RABI_2 = 3;
|
||||
|
||||
/**
|
||||
* Constant for Jumada al-awwal or (Jumada I), the 5th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int JUMADA_1 = 4;
|
||||
|
||||
/**
|
||||
* Constant for Jumada al-thani or (Jumada II), the 6th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int JUMADA_2 = 5;
|
||||
|
||||
/**
|
||||
* Constant for Rajab, the 7th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int RAJAB = 6;
|
||||
|
||||
/**
|
||||
* Constant for Sha'ban, the 8th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SHABAN = 7;
|
||||
|
||||
/**
|
||||
* Constant for Ramadan, the 9th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int RAMADAN = 8;
|
||||
|
||||
/**
|
||||
* Constant for Shawwal, the 10th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int SHAWWAL = 9;
|
||||
|
||||
/**
|
||||
* Constant for Dhu al-Qi'dah, the 11th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int DHU_AL_QIDAH = 10;
|
||||
|
||||
/**
|
||||
* Constant for Dhu al-Hijjah, the 12th month of the Islamic year.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final int DHU_AL_HIJJAH = 11;
|
||||
|
||||
|
@ -160,7 +173,8 @@ public class IslamicCalendar extends Calendar {
|
|||
/**
|
||||
* Constructs a default <code>IslamicCalendar</code> using the current time
|
||||
* in the default time zone with the default locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar()
|
||||
{
|
||||
|
@ -171,7 +185,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* Constructs an <code>IslamicCalendar</code> based on the current time
|
||||
* in the given time zone with the default locale.
|
||||
* @param zone the given time zone.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar(TimeZone zone)
|
||||
{
|
||||
|
@ -183,7 +198,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* in the default time zone with the given locale.
|
||||
*
|
||||
* @param aLocale the given locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar(Locale aLocale)
|
||||
{
|
||||
|
@ -196,7 +212,8 @@ public class IslamicCalendar extends Calendar {
|
|||
*
|
||||
* @param zone the given time zone.
|
||||
* @param aLocale the given locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar(TimeZone zone, Locale aLocale)
|
||||
{
|
||||
|
@ -209,7 +226,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* in the default time zone with the default locale.
|
||||
*
|
||||
* @param date The date to which the new calendar is set.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar(Date date) {
|
||||
super(TimeZone.getDefault(), Locale.getDefault());
|
||||
|
@ -224,7 +242,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* @param month the value used to set the {@link #MONTH MONTH} time field in the calendar.
|
||||
* Note that the month value is 0-based. e.g., 0 for Muharram.
|
||||
* @param date the value used to set the {@link #DATE DATE} time field in the calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar(int year, int month, int date)
|
||||
{
|
||||
|
@ -248,7 +267,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* in the calendar.
|
||||
* @param second the value used to set the {@link #SECOND SECOND} time field
|
||||
* in the calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public IslamicCalendar(int year, int month, int date, int hour,
|
||||
int minute, int second)
|
||||
|
@ -268,7 +288,8 @@ public class IslamicCalendar extends Calendar {
|
|||
*
|
||||
* @param beCivil <code>true</code> to use the civil calendar,
|
||||
* <code>false</code> to use the astronomical calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void setCivil(boolean beCivil)
|
||||
{
|
||||
|
@ -286,7 +307,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* Returns <code>true</code> if this object is using the fixed-cycle civil
|
||||
* calendar, or <code>false</code> if using the religious, astronomical
|
||||
* calendar.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isCivil() {
|
||||
return civil;
|
||||
|
@ -324,7 +346,8 @@ public class IslamicCalendar extends Calendar {
|
|||
};
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetLimit(int field, int limitType) {
|
||||
return LIMITS[field][limitType];
|
||||
|
@ -486,7 +509,8 @@ public class IslamicCalendar extends Calendar {
|
|||
*
|
||||
* @param extendedYear The hijri year
|
||||
* @param month The hijri month, 0-based
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetMonthLength(int extendedYear, int month) {
|
||||
|
||||
|
@ -506,7 +530,8 @@ public class IslamicCalendar extends Calendar {
|
|||
|
||||
/**
|
||||
* Return the number of days in the given Islamic year
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetYearLength(int extendedYear) {
|
||||
if (civil) {
|
||||
|
@ -523,7 +548,8 @@ public class IslamicCalendar extends Calendar {
|
|||
|
||||
// Return JD of start of given month/year
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
|
||||
return (int) monthStart(eyear, month) + 1948439;
|
||||
|
@ -534,7 +560,8 @@ public class IslamicCalendar extends Calendar {
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetExtendedYear() {
|
||||
int year;
|
||||
|
@ -560,7 +587,8 @@ public class IslamicCalendar extends Calendar {
|
|||
* The DAY_OF_WEEK and DOW_LOCAL fields are already set when this
|
||||
* method is called. The getGregorianXxx() methods return Gregorian
|
||||
* calendar equivalents for the given Julian day.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void handleComputeFields(int julianDay) {
|
||||
int year, month, dayOfMonth, dayOfYear;
|
||||
|
|
|
@ -34,13 +34,14 @@ import java.util.Locale;
|
|||
* constants rather than using actual, absolute numbers.
|
||||
* <p>
|
||||
* Note This API has not been promoted to @stable and instead has been left
|
||||
* as @draft ICU 2.4. It may yet change or be removed in a future release.
|
||||
* as @draft ICU 2.8. It may yet change or be removed in a future release.
|
||||
*
|
||||
* @see com.ibm.icu.util.GregorianCalendar
|
||||
*
|
||||
* @author Laura Werner
|
||||
* @author Alan Liu
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class JapaneseCalendar extends GregorianCalendar {
|
||||
|
||||
|
@ -53,7 +54,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
/**
|
||||
* Constructs a default <code>JapaneseCalendar</code> using the current time
|
||||
* in the default time zone with the default locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar() {
|
||||
super();
|
||||
|
@ -63,7 +65,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* Constructs a <code>JapaneseCalendar</code> based on the current time
|
||||
* in the given time zone with the default locale.
|
||||
* @param zone the given time zone.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(TimeZone zone) {
|
||||
super(zone);
|
||||
|
@ -73,7 +76,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* Constructs a <code>JapaneseCalendar</code> based on the current time
|
||||
* in the default time zone with the given locale.
|
||||
* @param aLocale the given locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(Locale aLocale) {
|
||||
super(aLocale);
|
||||
|
@ -86,7 +90,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* @param zone the given time zone.
|
||||
*
|
||||
* @param aLocale the given locale.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(TimeZone zone, Locale aLocale) {
|
||||
super(zone, aLocale);
|
||||
|
@ -97,7 +102,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* in the default time zone with the default locale.
|
||||
*
|
||||
* @param date The date to which the new calendar is set.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(Date date) {
|
||||
this();
|
||||
|
@ -124,7 +130,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* The value is 0-based. e.g., 0 for January.
|
||||
*
|
||||
* @param date The value used to set the calendar's DATE field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(int era, int year, int month, int date) {
|
||||
super(year, month, date);
|
||||
|
@ -143,7 +150,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* The value is 0-based. e.g., 0 for January.
|
||||
*
|
||||
* @param date The value used to set the calendar's {@link #DATE DATE} field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(int year, int month, int date) {
|
||||
super(year, month, date);
|
||||
|
@ -168,7 +176,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* @param minute The value used to set the calendar's {@link #MINUTE MINUTE} time field.
|
||||
*
|
||||
* @param second The value used to set the calendar's {@link #SECOND SECOND} time field.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public JapaneseCalendar(int year, int month, int date, int hour,
|
||||
int minute, int second)
|
||||
|
@ -180,7 +189,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetExtendedYear() {
|
||||
int year;
|
||||
|
@ -196,7 +206,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
}
|
||||
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected void handleComputeFields(int julianDay) {
|
||||
super.handleComputeFields(julianDay);
|
||||
|
@ -491,31 +502,36 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
|
||||
// Constant for the current era. This must be regularly updated.
|
||||
/**
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final int CURRENT_ERA = (ERAS.length / 3) - 1;
|
||||
|
||||
/**
|
||||
* Constant for the era starting on Sept. 8, 1868 AD.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final int MEIJI = CURRENT_ERA - 3;
|
||||
|
||||
/**
|
||||
* Constant for the era starting on July 30, 1912 AD.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final int TAISHO = CURRENT_ERA - 2;
|
||||
|
||||
/**
|
||||
* Constant for the era starting on Dec. 25, 1926 AD.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final int SHOWA = CURRENT_ERA - 1;
|
||||
|
||||
/**
|
||||
* Constant for the era starting on Jan. 7, 1989 AD.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
static public final int HEISEI = CURRENT_ERA;
|
||||
|
||||
|
@ -536,7 +552,8 @@ public class JapaneseCalendar extends GregorianCalendar {
|
|||
* Override GregorianCalendar. We should really handle YEAR_WOY and
|
||||
* EXTENDED_YEAR here too to implement the 1..5000000 range, but it's
|
||||
* not critical.
|
||||
* @draft ICU 2.4
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected int handleGetLimit(int field, int limitType) {
|
||||
switch (field) {
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.ibm.icu.text.UnicodeSet;
|
|||
* A class for accessing miscelleneous data in the locale bundles
|
||||
* @author ram
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public final class LocaleData {
|
||||
|
||||
|
@ -39,6 +40,7 @@ public final class LocaleData {
|
|||
* value of 'options'.
|
||||
* @return The set of exemplar characters for the given locale.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static UnicodeSet getExemplarSet(ULocale locale, int options) {
|
||||
ICUResourceBundle bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, locale);
|
||||
|
@ -49,18 +51,21 @@ public final class LocaleData {
|
|||
/**
|
||||
* Enumeration for representing the measurement systems.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final class MeasurementSystem{
|
||||
/**
|
||||
* Measurement system specified by Le Système International d'Unités (SI)
|
||||
* otherwise known as Metric system.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final MeasurementSystem SI = new MeasurementSystem(0);
|
||||
|
||||
/**
|
||||
* Measurement system followed in the United States of America.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final MeasurementSystem US = new MeasurementSystem(1);
|
||||
|
||||
|
@ -79,6 +84,7 @@ public final class LocaleData {
|
|||
* @param locale The locale for which the measurement system to be retrieved.
|
||||
* @return MeasurementSystem the measurement system used in the locale.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final MeasurementSystem getMeasurementSystem(ULocale locale){
|
||||
ICUResourceBundle bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, locale);
|
||||
|
@ -100,6 +106,7 @@ public final class LocaleData {
|
|||
* A class that represents the size of letter head
|
||||
* used in the country
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final class PaperSize{
|
||||
private int height;
|
||||
|
@ -113,6 +120,7 @@ public final class LocaleData {
|
|||
* Retruns the height of the paper
|
||||
* @return the height
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getHeight(){
|
||||
return height;
|
||||
|
@ -121,6 +129,7 @@ public final class LocaleData {
|
|||
* Returns the width of hte paper
|
||||
* @return the width
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getWidth(){
|
||||
return width;
|
||||
|
@ -133,6 +142,7 @@ public final class LocaleData {
|
|||
* @param locale The locale for which the measurement system to be retrieved.
|
||||
* @return The paper size used in the locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final PaperSize getPaperSize(ULocale locale){
|
||||
ICUResourceBundle bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, locale);
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.lang.Number;
|
|||
* @see com.ibm.icu.text.MeasureFormat
|
||||
* @author Alan Liu
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract class Measure {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public abstract class Measure {
|
|||
* @param number the number
|
||||
* @param unit the unit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected Measure(Number number, MeasureUnit unit) {
|
||||
if (number == null || unit == null) {
|
||||
|
@ -53,6 +55,7 @@ public abstract class Measure {
|
|||
* Returns true if the given object is equal to this object.
|
||||
* @return true if this object is equal to the given object
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) return false;
|
||||
|
@ -69,6 +72,7 @@ public abstract class Measure {
|
|||
* Returns a hashcode for this object.
|
||||
* @return a 32-bit hash
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int hashCode() {
|
||||
return number.hashCode() ^ unit.hashCode();
|
||||
|
@ -79,6 +83,7 @@ public abstract class Measure {
|
|||
* @return a string representation consisting of the ISO currency
|
||||
* code together with the numeric amount
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String toString() {
|
||||
return number.toString() + ' ' + unit.toString();
|
||||
|
@ -88,6 +93,7 @@ public abstract class Measure {
|
|||
* Returns the numeric value of this object.
|
||||
* @return this object's Number
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Number getNumber() {
|
||||
return number;
|
||||
|
@ -97,6 +103,7 @@ public abstract class Measure {
|
|||
* Returns the unit of this object.
|
||||
* @return this object's Unit
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public MeasureUnit getUnit() {
|
||||
return unit;
|
||||
|
|
|
@ -17,6 +17,7 @@ package com.ibm.icu.util;
|
|||
* @see com.ibm.icu.util.Measure
|
||||
* @author Alan Liu
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract class MeasureUnit {
|
||||
/**
|
||||
|
|
|
@ -13,14 +13,14 @@ import java.util.Vector;
|
|||
/**
|
||||
* Implementation of DateRule that takes a range.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class RangeDateRule implements DateRule
|
||||
{
|
||||
public class RangeDateRule implements DateRule {
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public RangeDateRule()
|
||||
{
|
||||
public RangeDateRule() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,17 +36,17 @@ public class RangeDateRule implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void add(DateRule rule)
|
||||
{
|
||||
public void add(DateRule rule) {
|
||||
add(new Date(Long.MIN_VALUE), rule);
|
||||
}
|
||||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void add(Date start, DateRule rule)
|
||||
{
|
||||
public void add(Date start, DateRule rule) {
|
||||
// TODO: Insert in the right place
|
||||
// System.out.println("Add: " + start.toString());
|
||||
ranges.addElement(new Range(start, rule));
|
||||
|
@ -56,9 +56,9 @@ public class RangeDateRule implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Date firstAfter(Date start)
|
||||
{
|
||||
public Date firstAfter(Date start) {
|
||||
// Find the range that I should look at
|
||||
int index = startIndex(start);
|
||||
if (index == ranges.size()) {
|
||||
|
@ -82,9 +82,9 @@ public class RangeDateRule implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Date firstBetween(Date start, Date end)
|
||||
{
|
||||
public Date firstBetween(Date start, Date end) {
|
||||
if (end == null) {
|
||||
return firstAfter(start);
|
||||
}
|
||||
|
@ -111,9 +111,9 @@ public class RangeDateRule implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isOn(Date date)
|
||||
{
|
||||
public boolean isOn(Date date) {
|
||||
Range r = rangeAt(startIndex(date));
|
||||
return r != null && r.rule != null && r.rule.isOn(date);
|
||||
}
|
||||
|
@ -122,9 +122,9 @@ public class RangeDateRule implements DateRule
|
|||
* Check whether this event occurs at least once between the two
|
||||
* dates given.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isBetween(Date start, Date end)
|
||||
{
|
||||
public boolean isBetween(Date start, Date end) {
|
||||
return firstBetween(start,end) == null;
|
||||
}
|
||||
|
||||
|
@ -132,8 +132,7 @@ public class RangeDateRule implements DateRule
|
|||
* find the index of the last range whose start date is before "start"
|
||||
* returns an index >= ranges.size() if there is none
|
||||
*/
|
||||
private int startIndex(Date start)
|
||||
{
|
||||
private int startIndex(Date start) {
|
||||
int lastIndex = ranges.size();
|
||||
|
||||
for (int i = 0; i < ranges.size(); i++) {
|
||||
|
@ -146,14 +145,13 @@ public class RangeDateRule implements DateRule
|
|||
return lastIndex;
|
||||
}
|
||||
|
||||
private Range rangeAt(int index)
|
||||
{
|
||||
private Range rangeAt(int index) {
|
||||
return (index < ranges.size()) ? (Range) ranges.elementAt(index)
|
||||
: null;
|
||||
}
|
||||
|
||||
Vector ranges = new Vector(2,2);
|
||||
};
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Privates
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Date;
|
|||
/**
|
||||
* Simple implementation of DateRule.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class SimpleDateRule implements DateRule
|
||||
{
|
||||
|
@ -21,6 +22,7 @@ public class SimpleDateRule implements DateRule
|
|||
* @param month The month in which this rule occurs (0-based).
|
||||
* @param dayOfMonth The date in that month (1-based).
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleDateRule(int month, int dayOfMonth)
|
||||
{
|
||||
|
@ -48,6 +50,7 @@ public class SimpleDateRule implements DateRule
|
|||
* on or after dayOfMonth. If false, the rule selects
|
||||
* the first dayOfWeek on or before dayOfMonth.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleDateRule(int month, int dayOfMonth, int dayOfWeek, boolean after)
|
||||
{
|
||||
|
@ -67,6 +70,7 @@ public class SimpleDateRule implements DateRule
|
|||
*
|
||||
* @see #firstBetween
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Date firstAfter(Date start)
|
||||
{
|
||||
|
@ -86,6 +90,7 @@ public class SimpleDateRule implements DateRule
|
|||
*
|
||||
* @see #firstAfter
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Date firstBetween(Date start, Date end)
|
||||
{
|
||||
|
@ -103,7 +108,7 @@ public class SimpleDateRule implements DateRule
|
|||
* @param date The date to check.
|
||||
* @return true if this event occurs on the given date.
|
||||
* @draft ICU 2.8
|
||||
*
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isOn(Date date)
|
||||
{
|
||||
|
@ -127,6 +132,7 @@ public class SimpleDateRule implements DateRule
|
|||
* Check whether this event occurs at least once between the two
|
||||
* dates given.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean isBetween(Date start, Date end)
|
||||
{
|
||||
|
@ -204,6 +210,7 @@ public class SimpleDateRule implements DateRule
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
// public void setCalendar(Calendar c) {
|
||||
// calendar = c;
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.ibm.icu.util.GregorianCalendar;
|
|||
* in the Gregorian calendar.
|
||||
*
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class SimpleHoliday extends Holiday {
|
||||
/**
|
||||
|
@ -31,6 +32,7 @@ public class SimpleHoliday extends Holiday {
|
|||
*
|
||||
* @see Holiday#getDisplayName(java.util.Locale)
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleHoliday(int month, int dayOfMonth, String name)
|
||||
{
|
||||
|
@ -50,7 +52,7 @@ public class SimpleHoliday extends Holiday {
|
|||
*
|
||||
* @see Holiday#getDisplayName(java.util.Locale)
|
||||
* @draft ICU 2.8
|
||||
*
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleHoliday(int month, int dayOfMonth, String name,
|
||||
int startYear)
|
||||
|
@ -71,6 +73,7 @@ public class SimpleHoliday extends Holiday {
|
|||
*
|
||||
* @see Holiday#getDisplayName(java.util.Locale)
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleHoliday(int month, int dayOfMonth, String name,
|
||||
int startYear, int endYear)
|
||||
|
@ -101,7 +104,7 @@ public class SimpleHoliday extends Holiday {
|
|||
*
|
||||
* @see Holiday#getDisplayName(java.util.Locale)
|
||||
* @draft ICU 2.8
|
||||
*
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name)
|
||||
{
|
||||
|
@ -112,6 +115,7 @@ public class SimpleHoliday extends Holiday {
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name,
|
||||
int startYear)
|
||||
|
@ -125,6 +129,7 @@ public class SimpleHoliday extends Holiday {
|
|||
|
||||
/**
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name,
|
||||
int startYear, int endYear)
|
||||
|
@ -163,6 +168,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* New Year's Day - January 1st
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday NEW_YEARS_DAY =
|
||||
new SimpleHoliday(Calendar.JANUARY, 1, "New Year's Day");
|
||||
|
@ -170,6 +176,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Epiphany, January 6th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday EPIPHANY =
|
||||
new SimpleHoliday(Calendar.JANUARY, 6, "Epiphany");
|
||||
|
@ -177,6 +184,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* May Day, May 1st
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday MAY_DAY =
|
||||
new SimpleHoliday(Calendar.MAY, 1, "May Day");
|
||||
|
@ -184,6 +192,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Assumption, August 15th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday ASSUMPTION =
|
||||
new SimpleHoliday(Calendar.AUGUST, 15, "Assumption");
|
||||
|
@ -191,6 +200,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* All Saints' Day, November 1st
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday ALL_SAINTS_DAY =
|
||||
new SimpleHoliday(Calendar.NOVEMBER, 1, "All Saints' Day");
|
||||
|
@ -198,6 +208,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* All Souls' Day, November 1st
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday ALL_SOULS_DAY =
|
||||
new SimpleHoliday(Calendar.NOVEMBER, 2, "All Souls' Day");
|
||||
|
@ -205,6 +216,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Immaculate Conception, December 8th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday IMMACULATE_CONCEPTION =
|
||||
new SimpleHoliday(Calendar.DECEMBER, 8, "Immaculate Conception");
|
||||
|
@ -212,6 +224,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Christmas Eve, December 24th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday CHRISTMAS_EVE =
|
||||
new SimpleHoliday(Calendar.DECEMBER, 24, "Christmas Eve");
|
||||
|
@ -219,6 +232,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Christmas, December 25th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday CHRISTMAS =
|
||||
new SimpleHoliday(Calendar.DECEMBER, 25, "Christmas");
|
||||
|
@ -226,6 +240,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Boxing Day, December 26th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday BOXING_DAY =
|
||||
new SimpleHoliday(Calendar.DECEMBER, 26, "Boxing Day");
|
||||
|
@ -233,6 +248,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* Saint Stephen's Day, December 26th
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday ST_STEPHENS_DAY =
|
||||
new SimpleHoliday(Calendar.DECEMBER, 26, "St. Stephen's Day");
|
||||
|
@ -240,6 +256,7 @@ public class SimpleHoliday extends Holiday {
|
|||
/**
|
||||
* New Year's Eve, December 31st
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final SimpleHoliday NEW_YEARS_EVE =
|
||||
new SimpleHoliday(Calendar.DECEMBER, 31, "New Year's Eve");
|
||||
|
|
|
@ -75,6 +75,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
|||
* Default constructor. (For invocation by subclass constructors,
|
||||
* typically implicit.)
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public TimeZone() {
|
||||
}
|
||||
|
@ -130,6 +131,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
|||
* @see Calendar#DST_OFFSET
|
||||
* @see #getOffset(long, boolean, int[])
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getOffset(long date) {
|
||||
int[] result = new int[2];
|
||||
|
@ -157,6 +159,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
|||
* zero; otherwise it is a positive value, typically one hour.
|
||||
*
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public void getOffset(long date, boolean local, int[] offsets) {
|
||||
offsets[0] = getRawOffset();
|
||||
|
@ -474,6 +477,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
|||
*
|
||||
* @return the amount of saving time in milliseconds
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int getDSTSavings() {
|
||||
if (useDaylightTime()) {
|
||||
|
|
|
@ -79,132 +79,154 @@ import com.ibm.icu.impl.ICUResourceBundle;
|
|||
* @author weiv
|
||||
* @author Alan Liu
|
||||
* @author Ram Viswanadha
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
public final class ULocale implements Serializable {
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale ENGLISH = new ULocale("en", Locale.ENGLISH);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale FRENCH = new ULocale("fr", Locale.FRENCH);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale GERMAN = new ULocale("de", Locale.GERMAN);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale ITALIAN = new ULocale("it", Locale.ITALIAN);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale JAPANESE = new ULocale("ja", Locale.JAPANESE);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale KOREAN = new ULocale("ko", Locale.KOREAN);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale CHINESE = new ULocale("zh", Locale.CHINESE);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale SIMPLIFIED_CHINESE = new ULocale("zh_Hans", Locale.CHINESE);
|
||||
|
||||
/**
|
||||
* Useful constant for language.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale TRADITIONAL_CHINESE = new ULocale("zh_Hant", Locale.CHINESE);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale FRANCE = new ULocale("fr_FR", Locale.FRANCE);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale GERMANY = new ULocale("de_DE", Locale.GERMANY);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale ITALY = new ULocale("it_IT", Locale.ITALY);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale JAPAN = new ULocale("ja_JP", Locale.JAPAN);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale KOREA = new ULocale("ko_KR", Locale.KOREA);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale CHINA = new ULocale("zh_Hans_CN", Locale.CHINA);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale PRC = CHINA;
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale TAIWAN = new ULocale("zh_Hant_TW", Locale.TAIWAN);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale UK = new ULocale("en_GB", Locale.UK);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale US = new ULocale("en_US", Locale.US);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale CANADA = new ULocale("en_CA", Locale.CANADA);
|
||||
|
||||
/**
|
||||
* Useful constant for country/region.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale CANADA_FRENCH = new ULocale("fr_CA", Locale.CANADA_FRENCH);
|
||||
|
||||
|
@ -219,6 +241,7 @@ public final class ULocale implements Serializable {
|
|||
/**
|
||||
* The root ULocale.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final ULocale ROOT = new ULocale(EMPTY_STRING, null);
|
||||
|
||||
|
@ -682,6 +705,7 @@ public final class ULocale implements Serializable {
|
|||
* Construct a ULocale object from a {@link java.util.Locale}.
|
||||
* @param loc a JDK locale
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public ULocale(Locale loc) {
|
||||
this.localeID = getName(loc.toString());
|
||||
|
@ -703,6 +727,7 @@ public final class ULocale implements Serializable {
|
|||
* @param localeID string representation of the locale, e.g:
|
||||
* "en_US", "sy_Cyrl_YU", "zh__pinyin", "es_ES@currency=EUR,collation=traditional"
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public ULocale(String localeID) {
|
||||
this.localeID = getName(localeID);
|
||||
|
@ -727,6 +752,7 @@ public final class ULocale implements Serializable {
|
|||
* @param c third component of the locale id
|
||||
* @see #ULocale(String)
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public ULocale(String a, String b, String c) {
|
||||
localeID = getName(lscvToID(a, b, c, EMPTY_STRING));
|
||||
|
@ -737,6 +763,7 @@ public final class ULocale implements Serializable {
|
|||
* @param nonCanonicalID the locale id to canonicalize
|
||||
* @return the locale created from the canonical version of the ID.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static ULocale createCanonical(String nonCanonicalID) {
|
||||
return new ULocale(canonicalize(nonCanonicalID), null);
|
||||
|
@ -771,6 +798,7 @@ public final class ULocale implements Serializable {
|
|||
* @return a JDK locale that either exactly represents this object
|
||||
* or is the closest approximation.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Locale toLocale() {
|
||||
if (locale == null) {
|
||||
|
@ -788,6 +816,7 @@ public final class ULocale implements Serializable {
|
|||
/**
|
||||
* Returns the current default ULocale.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static ULocale getDefault() {
|
||||
synchronized (ULocale.class) {
|
||||
|
@ -812,6 +841,7 @@ public final class ULocale implements Serializable {
|
|||
* @see SecurityManager#checkPermission
|
||||
* @see java.util.PropertyPermission
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static synchronized void setDefault(ULocale newLocale){
|
||||
Locale.setDefault(newLocale.toLocale());
|
||||
|
@ -822,6 +852,7 @@ public final class ULocale implements Serializable {
|
|||
* This is for compatibility with Locale-- in actuality, since ULocale is
|
||||
* immutable, there is no reason to clone it, so this API returns 'this'.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Object clone() {
|
||||
return this;
|
||||
|
@ -830,6 +861,7 @@ public final class ULocale implements Serializable {
|
|||
/**
|
||||
* Returns the hashCode.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public int hashCode() {
|
||||
return localeID.hashCode();
|
||||
|
@ -843,6 +875,7 @@ public final class ULocale implements Serializable {
|
|||
*
|
||||
* @return true if this Locale is equal to the specified object.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
|
@ -860,6 +893,7 @@ public final class ULocale implements Serializable {
|
|||
/**
|
||||
* Returns a list of all installed locales.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static ULocale[] getAvailableLocales() {
|
||||
return ICUResourceBundle.getAvailableULocales();
|
||||
|
@ -869,6 +903,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns a list of all 2-letter country codes defined in ISO 3166.
|
||||
* Can be used to create Locales.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String[] getISOCountries() {
|
||||
initCountryTables();
|
||||
|
@ -882,6 +917,7 @@ public final class ULocale implements Serializable {
|
|||
* The list this function returns includes both the new and the old codes for the
|
||||
* languages whose codes have changed.]
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String[] getISOLanguages() {
|
||||
initLanguageTables();
|
||||
|
@ -893,6 +929,7 @@ public final class ULocale implements Serializable {
|
|||
* or a lowercase ISO 639 code.
|
||||
* @see #getDisplayLanguage
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getLanguage() {
|
||||
return getLanguage(localeID);
|
||||
|
@ -904,6 +941,7 @@ public final class ULocale implements Serializable {
|
|||
* or a lowercase ISO 639 code.
|
||||
* @see #getDisplayLanguage
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getLanguage(String localeID) {
|
||||
return new IDParser(localeID).getLanguage();
|
||||
|
@ -913,6 +951,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns the script code for this locale, which might be the empty string.
|
||||
* @see #getDisplayScript
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getScript() {
|
||||
return getScript(localeID);
|
||||
|
@ -922,6 +961,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns the script code for the specified locale, which might be the empty string.
|
||||
* @see #getDisplayScript
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getScript(String localeID) {
|
||||
return new IDParser(localeID).getScript();
|
||||
|
@ -932,6 +972,7 @@ public final class ULocale implements Serializable {
|
|||
* or an uppercase ISO 3166 2-letter code.
|
||||
* @see #getDisplayCountry
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getCountry() {
|
||||
return getCountry(localeID);
|
||||
|
@ -943,6 +984,7 @@ public final class ULocale implements Serializable {
|
|||
* @param localeID
|
||||
* @see #getDisplayCountry
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getCountry(String localeID) {
|
||||
return new IDParser(localeID).getCountry();
|
||||
|
@ -952,6 +994,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns the variant code for this locale, which might be the empty string.
|
||||
* @see #getDisplayVariant
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getVariant() {
|
||||
return getVariant(localeID);
|
||||
|
@ -961,6 +1004,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns the variant code for the specified locale, which might be the empty string.
|
||||
* @see #getDisplayVariant
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getVariant(String localeID) {
|
||||
return new IDParser(localeID).getVariant();
|
||||
|
@ -970,6 +1014,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns the (normalized) base name for this locale.
|
||||
* @return the base name as a String.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getBaseName() {
|
||||
return getBaseName(localeID);
|
||||
|
@ -980,6 +1025,7 @@ public final class ULocale implements Serializable {
|
|||
* @param localeID the locale ID as a string
|
||||
* @return the base name as a String.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getBaseName(String localeID){
|
||||
return new IDParser(localeID).getBaseName();
|
||||
|
@ -990,6 +1036,7 @@ public final class ULocale implements Serializable {
|
|||
*
|
||||
* @return String the full name of the localeID
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getName() {
|
||||
return localeID; // always normalized
|
||||
|
@ -1001,6 +1048,7 @@ public final class ULocale implements Serializable {
|
|||
* @param localeID the localeID as a string
|
||||
* @return String the full name of the localeID
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getName(String localeID){
|
||||
return new IDParser(localeID).getName();
|
||||
|
@ -1009,6 +1057,7 @@ public final class ULocale implements Serializable {
|
|||
/**
|
||||
* Returns a string representation of this object.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String toString() {
|
||||
return localeID;
|
||||
|
@ -1019,6 +1068,7 @@ public final class ULocale implements Serializable {
|
|||
* are no keywords, returns null.
|
||||
* @return iterator over keywords, or null if there are no keywords.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Iterator getKeywords() {
|
||||
return getKeywords(localeID);
|
||||
|
@ -1030,6 +1080,7 @@ public final class ULocale implements Serializable {
|
|||
* @return an iterator over the keywords in the specified locale, or null
|
||||
* if there are no keywords.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Iterator getKeywords(String localeID){
|
||||
return new IDParser(localeID).getKeywords();
|
||||
|
@ -1040,6 +1091,7 @@ public final class ULocale implements Serializable {
|
|||
* @param keywordName name of the keyword whose value is desired. Case insensitive.
|
||||
* @return the value of the keyword, or null.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getKeywordValue(String keywordName){
|
||||
return getKeywordValue(localeID, keywordName);
|
||||
|
@ -1051,6 +1103,7 @@ public final class ULocale implements Serializable {
|
|||
* @param keywordName name of the keyword whose value is desired. Case insensitive.
|
||||
* @return String the value of the keyword as a string
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getKeywordValue(String localeID, String keywordName) {
|
||||
return new IDParser(localeID).getKeywordValue(keywordName);
|
||||
|
@ -1788,6 +1841,7 @@ public final class ULocale implements Serializable {
|
|||
* @param localeID the locale id
|
||||
* @return the canonicalized id
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String canonicalize(String localeID){
|
||||
IDParser parser = new IDParser(localeID, true);
|
||||
|
@ -1881,6 +1935,7 @@ public final class ULocale implements Serializable {
|
|||
* @exception MissingResourceException Throws MissingResourceException if the
|
||||
* three-letter language abbreviation is not available for this locale.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getISO3Language(){
|
||||
return getISO3Language(localeID);
|
||||
|
@ -1895,6 +1950,7 @@ public final class ULocale implements Serializable {
|
|||
* @exception MissingResourceException Throws MissingResourceException if the
|
||||
* three-letter language abbreviation is not available for this locale.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getISO3Language(String localeID){
|
||||
initLanguageTables();
|
||||
|
@ -1919,6 +1975,7 @@ public final class ULocale implements Serializable {
|
|||
* @exception MissingResourceException Throws MissingResourceException if the
|
||||
* three-letter country abbreviation is not available for this locale.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getISO3Country(){
|
||||
return getISO3Country(localeID);
|
||||
|
@ -1930,6 +1987,7 @@ public final class ULocale implements Serializable {
|
|||
* @exception MissingResourceException Throws MissingResourceException if the
|
||||
* three-letter country abbreviation is not available for this locale.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getISO3Country(String localeID){
|
||||
initCountryTables();
|
||||
|
@ -2015,6 +2073,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns this locale's language localized for display in the default locale.
|
||||
* @return the localized language name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayLanguage() {
|
||||
return getDisplayLanguageInternal(localeID, getDefault().localeID);
|
||||
|
@ -2025,6 +2084,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized language name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayLanguage(ULocale displayLocale) {
|
||||
return getDisplayLanguageInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2037,6 +2097,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocaleID the id of the locale in which to display the name.
|
||||
* @return the localized language name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayLanguage(String localeID, String displayLocaleID) {
|
||||
return getDisplayLanguageInternal(localeID, getName(displayLocaleID));
|
||||
|
@ -2049,6 +2110,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized language name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayLanguage(String localeID, ULocale displayLocale) {
|
||||
return getDisplayLanguageInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2063,6 +2125,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns this locale's script localized for display in the default locale.
|
||||
* @return the localized script name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayScript() {
|
||||
return getDisplayScriptInternal(localeID, getDefault().localeID);
|
||||
|
@ -2073,6 +2136,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized script name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayScript(ULocale displayLocale) {
|
||||
return getDisplayScriptInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2085,6 +2149,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocaleID the id of the locale in which to display the name.
|
||||
* @return the localized script name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayScript(String localeID, String displayLocaleID) {
|
||||
return getDisplayScriptInternal(localeID, getName(displayLocaleID));
|
||||
|
@ -2096,6 +2161,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized script name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayScript(String localeID, ULocale displayLocale) {
|
||||
return getDisplayScriptInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2110,6 +2176,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns this locale's country localized for display in the default locale.
|
||||
* @return the localized country name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayCountry() {
|
||||
return getDisplayCountryInternal(localeID, getDefault().localeID);
|
||||
|
@ -2120,6 +2187,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized country name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayCountry(ULocale displayLocale){
|
||||
return getDisplayCountryInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2132,6 +2200,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocaleID the id of the locale in which to display the name.
|
||||
* @return the localized country name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayCountry(String localeID, String displayLocaleID) {
|
||||
return getDisplayCountryInternal(localeID, getName(displayLocaleID));
|
||||
|
@ -2144,6 +2213,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized country name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayCountry(String localeID, ULocale displayLocale) {
|
||||
return getDisplayCountryInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2158,6 +2228,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns this locale's variant localized for display in the default locale.
|
||||
* @return the localized variant name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayVariant() {
|
||||
return getDisplayVariantInternal(localeID, getDefault().localeID);
|
||||
|
@ -2168,6 +2239,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized variant name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayVariant(ULocale displayLocale) {
|
||||
return getDisplayVariantInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2180,6 +2252,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocaleID the id of the locale in which to display the name.
|
||||
* @return the localized variant name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayVariant(String localeID, String displayLocaleID){
|
||||
return getDisplayVariantInternal(localeID, getName(displayLocaleID));
|
||||
|
@ -2192,6 +2265,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the name.
|
||||
* @return the localized variant name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayVariant(String localeID, ULocale displayLocale) {
|
||||
return getDisplayVariantInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2208,6 +2282,7 @@ public final class ULocale implements Serializable {
|
|||
* @return the localized keyword name.
|
||||
* @see #getKeywords
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayKeyword(String keyword) {
|
||||
return getDisplayKeywordInternal(keyword, getDefault().localeID);
|
||||
|
@ -2220,6 +2295,7 @@ public final class ULocale implements Serializable {
|
|||
* @return the localized keyword name.
|
||||
* @see #getKeywords
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayKeyword(String keyword, String displayLocaleID) {
|
||||
return getDisplayKeywordInternal(keyword, getName(displayLocaleID));
|
||||
|
@ -2232,6 +2308,7 @@ public final class ULocale implements Serializable {
|
|||
* @return the localized keyword name.
|
||||
* @see #getKeywords
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayKeyword(String keyword, ULocale displayLocale) {
|
||||
return getDisplayKeywordInternal(keyword, displayLocale.localeID);
|
||||
|
@ -2247,6 +2324,7 @@ public final class ULocale implements Serializable {
|
|||
* @param keyword the keyword whose value is to be displayed.
|
||||
* @return the localized value name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayKeywordValue(String keyword) {
|
||||
return getDisplayKeywordValueInternal(localeID, keyword, getDefault().localeID);
|
||||
|
@ -2258,6 +2336,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the value.
|
||||
* @return the localized value name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayKeywordValue(String keyword, ULocale displayLocale) {
|
||||
return getDisplayKeywordValueInternal(localeID, keyword, displayLocale.localeID);
|
||||
|
@ -2271,6 +2350,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocaleID the id of the locale in which to display the value.
|
||||
* @return the localized value name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayKeywordValue(String localeID, String keyword, String displayLocaleID) {
|
||||
return getDisplayKeywordValueInternal(localeID, keyword, getName(displayLocaleID));
|
||||
|
@ -2284,6 +2364,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the id of the locale in which to display the value.
|
||||
* @return the localized value name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayKeywordValue(String localeID, String keyword, ULocale displayLocale) {
|
||||
return getDisplayKeywordValueInternal(localeID, keyword, displayLocale.localeID);
|
||||
|
@ -2300,6 +2381,7 @@ public final class ULocale implements Serializable {
|
|||
* Returns this locale name localized for display in the default locale.
|
||||
* @return the localized locale name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayName() {
|
||||
return getDisplayNameInternal(localeID, getDefault().localeID);
|
||||
|
@ -2310,6 +2392,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the locale name.
|
||||
* @return the localized locale name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String getDisplayName(ULocale displayLocale) {
|
||||
return getDisplayNameInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2322,6 +2405,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocaleID the id of the locale in which to display the locale name.
|
||||
* @return the localized locale name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayName(String localeID, String displayLocaleID) {
|
||||
return getDisplayNameInternal(localeID, getName(displayLocaleID));
|
||||
|
@ -2334,6 +2418,7 @@ public final class ULocale implements Serializable {
|
|||
* @param displayLocale the locale in which to display the locale name.
|
||||
* @return the localized locale name.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static String getDisplayName(String localeID, ULocale displayLocale) {
|
||||
return getDisplayNameInternal(localeID, displayLocale.localeID);
|
||||
|
@ -2409,6 +2494,7 @@ public final class ULocale implements Serializable {
|
|||
* locale data, then the valid locale is <i>null</i>.
|
||||
*
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Type ACTUAL_LOCALE = new Type(0);
|
||||
|
||||
|
@ -2424,6 +2510,7 @@ public final class ULocale implements Serializable {
|
|||
* <p>Note: The valid locale will be returned correctly in ICU
|
||||
* 3.0 or later. In ICU 2.8, it is not returned correctly.
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static Type VALID_LOCALE = new Type(1);
|
||||
|
||||
|
@ -2433,6 +2520,7 @@ public final class ULocale implements Serializable {
|
|||
* @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE
|
||||
* @see com.ibm.icu.util.ULocale#VALID_LOCALE
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final class Type {
|
||||
private int localeType;
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* UResourceBundle bundle = UResourceBundle.getBundleInstance("com.ibm.icu.impl.data.LocaleElements", "en_US");
|
||||
* </code>
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @author ram
|
||||
*/
|
||||
public abstract class UResourceBundle extends ResourceBundle{
|
||||
|
@ -85,6 +86,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UResourceBundle getBundleInstance(String baseName, String localeName){
|
||||
return getBundleInstance(baseName, localeName, ICUResourceBundle.ICU_DATA_CLASS_LOADER, false);
|
||||
|
@ -100,6 +102,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UResourceBundle getBundleInstance(String baseName, String localeName, ClassLoader root){
|
||||
return getBundleInstance(baseName, localeName, root, false);
|
||||
|
@ -117,6 +120,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*
|
||||
*/
|
||||
protected static UResourceBundle getBundleInstance(String baseName, String localeName, ClassLoader root, boolean disableFallback){
|
||||
|
@ -128,6 +132,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* Sole constructor. (For invocation by subclass constructors, typically
|
||||
* implicit.)
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected UResourceBundle() { }
|
||||
|
||||
|
@ -139,6 +144,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* If null the bundle for default locale is opened.
|
||||
* @return a resource bundle for the given locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UResourceBundle getBundleInstance(ULocale locale){
|
||||
if(locale==null){
|
||||
|
@ -153,6 +159,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* If null the bundle for default locale is opened.
|
||||
* @return a resource bundle for the given base name and default locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UResourceBundle getBundleInstance(String baseName){
|
||||
return getBundleInstance( baseName, ULocale.getDefault().toString(), ICUResourceBundle.ICU_DATA_CLASS_LOADER );
|
||||
|
@ -166,6 +173,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* If null the bundle for default locale is opened.
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
|
||||
public static final UResourceBundle getBundleInstance(String baseName, Locale locale){
|
||||
|
@ -181,6 +189,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* If null the bundle for default locale is opened.
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final UResourceBundle getBundleInstance(String baseName, ULocale locale){
|
||||
return getBundleInstance(baseName, locale.toString(),ICUResourceBundle.ICU_DATA_CLASS_LOADER);
|
||||
|
@ -195,6 +204,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
*
|
||||
* @return the locale of this resource bundle
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public abstract ULocale getULocale();
|
||||
|
||||
|
@ -202,18 +212,21 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* Gets the localeID
|
||||
* @return The string representation of the localeID
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected abstract String getLocaleID();
|
||||
/**
|
||||
* Gets the base name of the resource bundle
|
||||
* @return The string representation of the base name
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected abstract String getBaseName();
|
||||
/**
|
||||
* Gets the parent bundle
|
||||
* @return The parent bundle
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected abstract UResourceBundle getParent();
|
||||
|
||||
|
@ -222,6 +235,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* Get the locale of this bundle
|
||||
* @return the locale of this resource bundle
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public Locale getLocale(){
|
||||
return getULocale().toLocale();
|
||||
|
@ -348,6 +362,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
protected static synchronized UResourceBundle instantiateBundle(String baseName, String localeName, ClassLoader root, boolean disableFallback){
|
||||
// first try to create an ICUResourceBundle
|
||||
|
@ -386,6 +401,7 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
// recursively build bundle
|
||||
protected static UResourceBundle instantiateICUResource(String baseName,String localeID, ClassLoader root){
|
||||
|
|
|
@ -12,6 +12,7 @@ package com.ibm.icu.util;
|
|||
* is not the same type as the available resource
|
||||
* @author ram
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public class UResourceTypeMismatchException extends RuntimeException {
|
||||
private String message;
|
||||
|
@ -20,6 +21,7 @@ public class UResourceTypeMismatchException extends RuntimeException {
|
|||
* Constuct the exception with the given message
|
||||
* @param msg the error message for this exception
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public UResourceTypeMismatchException(String msg){
|
||||
message = msg;
|
||||
|
@ -28,6 +30,7 @@ public class UResourceTypeMismatchException extends RuntimeException {
|
|||
* Returns the error message stored in this exception
|
||||
* @return String the error message string
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public String toString(){
|
||||
return message;
|
||||
|
|
|
@ -92,6 +92,7 @@ public final class VersionInfo
|
|||
/**
|
||||
* Unicode 4.0 version
|
||||
* @draft ICU 2.6
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final VersionInfo UNICODE_4_0;
|
||||
|
||||
|
@ -105,24 +106,28 @@ public final class VersionInfo
|
|||
* Data version string for ICU's internal data
|
||||
* @internal
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final String ICU_DATA_VERSION = "30b";
|
||||
|
||||
/**
|
||||
* ICU4J collator runtime version
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final VersionInfo UCOL_RUNTIME_VERSION;
|
||||
|
||||
/**
|
||||
* ICU4J collator builder version
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final VersionInfo UCOL_BUILDER_VERSION;
|
||||
|
||||
/**
|
||||
* ICU4J collator tailorings version
|
||||
* @draft ICU 2.8
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
*/
|
||||
public static final VersionInfo UCOL_TAILORINGS_VERSION;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue