ICU-1586
Synching with Java's properties X-SVN-Rev: 8370
This commit is contained in:
parent
b55b1ad264
commit
0cf1042886
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterCompare.java,v $
|
||||
* $Date: 2002/02/22 03:43:32 $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2002/04/04 00:52:31 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -41,6 +41,7 @@ public final class UCharacterCompare
|
||||
*/
|
||||
public static void main(String arg[])
|
||||
{
|
||||
System.out.println("Starting character compare");
|
||||
try
|
||||
{
|
||||
FileWriter f;
|
||||
@ -53,6 +54,7 @@ public final class UCharacterCompare
|
||||
p.println("method name ucharacter character");
|
||||
for (char i = Character.MIN_VALUE; i < Character.MAX_VALUE; i ++)
|
||||
{
|
||||
System.out.println("character \\u" + Integer.toHexString(i));
|
||||
if (UCharacter.isDefined(i) != Character.isDefined(i))
|
||||
trackDifference(p, i, "isDefined()", "" + UCharacter.isDefined(i),
|
||||
"" + Character.isDefined(i));
|
||||
@ -275,7 +277,7 @@ public final class UCharacterCompare
|
||||
StringBuffer s = new StringBuffer(temp);
|
||||
for (int i = 0; i < 6 - temp.length(); i ++)
|
||||
s.append(' ');
|
||||
temp = UCharacter.getName(ch);
|
||||
temp = UCharacter.getExtendedName(ch);
|
||||
if (temp == null)
|
||||
temp = " ";
|
||||
s.append(temp);
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
* $Source:
|
||||
* /usr/cvs/icu4j/icu4j/src/com/ibm/icu/text/UCharacterPropertyDB.java $
|
||||
* $Date: 2002/04/03 00:00:00 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2002/04/04 00:52:27 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -101,9 +101,21 @@ public final class UCharacterProperty implements Trie.DataManipulate
|
||||
*/
|
||||
public static final int EXC_COMBINING_CLASS_ = 9;
|
||||
/**
|
||||
* Numeric type for general numbers
|
||||
* Non numeric type
|
||||
*/
|
||||
public static final int GENERAL_NUMERIC_TYPE_ = 1;
|
||||
public static final int NON_NUMERIC_TYPE_ = 0;
|
||||
/**
|
||||
* Numeric type for decimal digits
|
||||
*/
|
||||
public static final int DECIMAL_DIGIT_NUMERIC_TYPE_ = 1;
|
||||
/**
|
||||
* Numeric type for digits
|
||||
*/
|
||||
public static final int DIGIT_NUMERIC_TYPE_ = 2;
|
||||
/**
|
||||
* Numeric type for non digits numbers
|
||||
*/
|
||||
public static final int NON_DIGIT_NUMERIC_TYPE_ = 3;
|
||||
/**
|
||||
* Maximum number of expansion for a case mapping
|
||||
*/
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/lang/UCharacter.java,v $
|
||||
* $Date: 2002/04/03 04:32:00 $
|
||||
* $Revision: 1.36 $
|
||||
* $Date: 2002/04/04 00:52:40 $
|
||||
* $Revision: 1.37 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -140,7 +140,7 @@ public final class UCharacter
|
||||
int numericType = UCharacterProperty.getNumericType(props);
|
||||
|
||||
int result = -1;
|
||||
if (numericType == UCharacterProperty.GENERAL_NUMERIC_TYPE_) {
|
||||
if (numericType == UCharacterProperty.DECIMAL_DIGIT_NUMERIC_TYPE_) {
|
||||
// if props == 0, it will just fall through and return -1
|
||||
if (!UCharacterProperty.isExceptionIndicator(props)) {
|
||||
// not contained in exception data
|
||||
@ -1797,18 +1797,19 @@ public final class UCharacter
|
||||
int numericType = UCharacterProperty.getNumericType(props);
|
||||
|
||||
int result = -1;
|
||||
if (numericType == UCharacterProperty.GENERAL_NUMERIC_TYPE_) {
|
||||
if (numericType != UCharacterProperty.NON_NUMERIC_TYPE_) {
|
||||
// if props == 0, it will just fall through and return -1
|
||||
if (numericType == UCharacterProperty.NON_DIGIT_NUMERIC_TYPE_
|
||||
/* && PROPERTY_.hasExceptionValue(index,
|
||||
UCharacterProperty.EXC_DENOMINATOR_VALUE_)*/) {
|
||||
return -2;
|
||||
}
|
||||
if (!UCharacterProperty.isExceptionIndicator(props)) {
|
||||
// not contained in exception data
|
||||
result = UCharacterProperty.getSignedValue(props);
|
||||
}
|
||||
else {
|
||||
int index = UCharacterProperty.getExceptionIndex(props);
|
||||
if (PROPERTY_.hasExceptionValue(index,
|
||||
UCharacterProperty.EXC_DENOMINATOR_VALUE_)) {
|
||||
return -2;
|
||||
}
|
||||
if (PROPERTY_.hasExceptionValue(index,
|
||||
UCharacterProperty.EXC_NUMERIC_VALUE_)) {
|
||||
result = PROPERTY_.getException(index,
|
||||
|
Loading…
Reference in New Issue
Block a user