ICU-2087 add "ICU 2.0" to versionless @stable tags

X-SVN-Rev: 10490
This commit is contained in:
Alan Liu 2002-12-05 01:25:51 +00:00
parent 15a6f10188
commit 3aae1fb522
35 changed files with 1123 additions and 1123 deletions

View file

@ -254,7 +254,7 @@ import com.ibm.icu.impl.Utility;
*
* @see MathContext
* @author Mike Cowlishaw
* @stable
* @stable ICU 2.0
*/
public class BigDecimal extends java.lang.Number implements java.io.Serializable,java.lang.Comparable{
@ -269,7 +269,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @see #ONE
* @see #TEN
* @stable
* @stable ICU 2.0
*/
public static final com.ibm.icu.math.BigDecimal ZERO=new com.ibm.icu.math.BigDecimal((long)0); // use long as we want the int constructor
// .. to be able to use this, for speed
@ -279,7 +279,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @see #TEN
* @see #ZERO
* @stable
* @stable ICU 2.0
*/
public static final com.ibm.icu.math.BigDecimal ONE=new com.ibm.icu.math.BigDecimal((long)1); // use long as we want the int constructor
// .. to be able to use this, for speed
@ -289,7 +289,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @see #ONE
* @see #ZERO
* @stable
* @stable ICU 2.0
*/
public static final com.ibm.icu.math.BigDecimal TEN=new com.ibm.icu.math.BigDecimal(10);
@ -297,21 +297,21 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
/**
* Rounding mode to round to a more positive number.
* @see MathContext#ROUND_CEILING
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_CEILING=com.ibm.icu.math.MathContext.ROUND_CEILING;
/**
* Rounding mode to round towards zero.
* @see MathContext#ROUND_DOWN
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_DOWN=com.ibm.icu.math.MathContext.ROUND_DOWN;
/**
* Rounding mode to round to a more negative number.
* @see MathContext#ROUND_FLOOR
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_FLOOR=com.ibm.icu.math.MathContext.ROUND_FLOOR;
@ -319,7 +319,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Rounding mode to round to nearest neighbor, where an equidistant
* value is rounded down.
* @see MathContext#ROUND_HALF_DOWN
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_HALF_DOWN=com.ibm.icu.math.MathContext.ROUND_HALF_DOWN;
@ -327,7 +327,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Rounding mode to round to nearest neighbor, where an equidistant
* value is rounded to the nearest even neighbor.
* @see MathContext#ROUND_HALF_EVEN
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_HALF_EVEN=com.ibm.icu.math.MathContext.ROUND_HALF_EVEN;
@ -335,21 +335,21 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Rounding mode to round to nearest neighbor, where an equidistant
* value is rounded up.
* @see MathContext#ROUND_HALF_UP
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_HALF_UP=com.ibm.icu.math.MathContext.ROUND_HALF_UP;
/**
* Rounding mode to assert that no rounding is necessary.
* @see MathContext#ROUND_UNNECESSARY
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_UNNECESSARY=com.ibm.icu.math.MathContext.ROUND_UNNECESSARY;
/**
* Rounding mode to round away from zero.
* @see MathContext#ROUND_UP
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_UP=com.ibm.icu.math.MathContext.ROUND_UP;
@ -465,7 +465,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* It would not be present in a <code>java.math</code> version.)</i>
*
* @param bd The <code>BigDecimal</code> to be translated.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(java.math.BigDecimal bd){
@ -489,7 +489,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* present only if the <code>BigInteger</code> is zero.
*
* @param bi The <code>BigInteger</code> to be converted.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(java.math.BigInteger bi){
@ -519,7 +519,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param bi The <code>BigInteger</code> to be converted.
* @param scale The <code>int</code> specifying the scale.
* @throws NumberFormatException if the scale is negative.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(java.math.BigInteger bi,int scale){
@ -545,7 +545,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* to be converted.
* @throws NumberFormatException if the parameter is not a valid
* number.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(char inchars[]){
@ -573,7 +573,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param length The <code>int</code> length of the number.
* @throws NumberFormatException if the parameter is not a valid
* number for any reason.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(char inchars[],int offset,int length){super();
@ -820,7 +820,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param num The <code>double</code> to be converted.
* @throws NumberFormatException if the parameter is infinite or
* not a number.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(double num){
@ -843,7 +843,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* A leading zero will be present only if the parameter is zero.
*
* @param num The <code>int</code> to be converted.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(int num){super();
@ -931,7 +931,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* A leading zero will be present only if the parameter is zero.
*
* @param num The <code>long</code> to be converted.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(long num){super();
@ -1025,7 +1025,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param string The <code>String</code> to be converted.
* @throws NumberFormatException if the parameter is not a valid
* number.
* @stable
* @stable ICU 2.0
*/
public BigDecimal(java.lang.String string){
@ -1054,7 +1054,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return A <code>BigDecimal</code> whose value is the absolute
* value of this <code>BigDecimal</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal abs(){
@ -1075,7 +1075,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is the absolute
* value of this <code>BigDecimal</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal abs(com.ibm.icu.math.MathContext set){
@ -1099,7 +1099,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* the addition.
* @return A <code>BigDecimal</code> whose value is
* <code>this+rhs</code>, using fixed point arithmetic.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal add(com.ibm.icu.math.BigDecimal rhs){
@ -1119,7 +1119,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* <code>this+rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal add(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1353,7 +1353,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>this</code> is numerically less than, equal to,
* or greater than <code>rhs</code>.
* @see #compareTo(Object)
* @stable
* @stable ICU 2.0
*/
public int compareTo(com.ibm.icu.math.BigDecimal rhs){
@ -1389,7 +1389,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>this</code> is numerically less than, equal to,
* or greater than <code>rhs</code>.
* @see #compareTo(Object)
* @stable
* @stable ICU 2.0
*/
public int compareTo(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1454,7 +1454,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A plain <code>BigDecimal</code> whose value is
* <code>this/rhs</code>, using fixed point arithmetic.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs){
@ -1489,7 +1489,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* MathContext#ROUND_UNNECESSARY} and
* <code>this.scale()</code> is insufficient to
* represent the result exactly.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs,int round){
@ -1529,7 +1529,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>round</code> is {@link
* MathContext#ROUND_UNNECESSARY} and <code>scale</code>
* is insufficient to represent the result exactly.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs,int scale,int round){
@ -1554,7 +1554,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A <code>BigDecimal</code> whose value is
* <code>this/rhs</code>.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1574,7 +1574,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A <code>BigDecimal</code> whose value is the integer
* part of <code>this/rhs</code>.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal divideInteger(com.ibm.icu.math.BigDecimal rhs){
@ -1599,7 +1599,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>rhs</code> is zero.
* @throws ArithmeticException if the result will not fit in the
* number of digits specified for the context.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal divideInteger(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1619,7 +1619,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* the comparison.
* @return A <code>BigDecimal</code> whose value is
* the maximum of <code>this</code> and <code>rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal max(com.ibm.icu.math.BigDecimal rhs){
@ -1646,7 +1646,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* the maximum of <code>this</code> and <code>rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal max(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1668,7 +1668,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* the comparison.
* @return A <code>BigDecimal</code> whose value is
* the minimum of <code>this</code> and <code>rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal min(com.ibm.icu.math.BigDecimal rhs){
@ -1695,7 +1695,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* the minimum of <code>this</code> and <code>rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal min(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1721,7 +1721,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* the multiplication.
* @return A <code>BigDecimal</code> whose value is
* <code>this*rhs</code>, using fixed point arithmetic.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal multiply(com.ibm.icu.math.BigDecimal rhs){
@ -1741,7 +1741,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* <code>this*rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal multiply(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -1848,7 +1848,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return A <code>BigDecimal</code> whose value is
* <code>-this</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal negate(){
@ -1866,7 +1866,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* <code>-this</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal negate(com.ibm.icu.math.MathContext set){
@ -1894,7 +1894,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return A <code>BigDecimal</code> whose value is
* <code>+this</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal plus(){
@ -1916,7 +1916,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* <code>+this</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal plus(com.ibm.icu.math.MathContext set){
@ -1960,7 +1960,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>this**rhs</code>, using fixed point arithmetic.
* @throws ArithmeticException if <code>rhs</code> is out of range or
* is not a whole number.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal pow(com.ibm.icu.math.BigDecimal rhs){
@ -1993,7 +1993,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>this**rhs</code>.
* @throws ArithmeticException if <code>rhs</code> is out of range or
* is not a whole number.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal pow(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -2077,7 +2077,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A <code>BigDecimal</code> whose value is the remainder
* of <code>this/rhs</code>, using fixed point arithmetic.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal remainder(com.ibm.icu.math.BigDecimal rhs){
@ -2104,7 +2104,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if the integer part of the result will
* not fit in the number of digits specified for the
* context.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal remainder(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -2126,7 +2126,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* the subtraction.
* @return A <code>BigDecimal</code> whose value is
* <code>this-rhs</code>, using fixed point arithmetic.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal subtract(com.ibm.icu.math.BigDecimal rhs){
@ -2146,7 +2146,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is
* <code>this-rhs</code>.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal subtract(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){
@ -2174,7 +2174,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A <code>byte</code> equal in value to <code>this</code>.
* @throws ArithmeticException if <code>this</code> has a non-zero
* decimal part, or will not fit in a <code>byte</code>.
* @stable
* @stable ICU 2.0
*/
public byte byteValueExact(){
@ -2205,7 +2205,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ClassCastException if <code>rhs</code> cannot be cast to
* a <code>BigDecimal</code> object.
* @see #compareTo(BigDecimal)
* @stable
* @stable ICU 2.0
*/
public int compareTo(java.lang.Object rhsobj){
@ -2226,7 +2226,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* or <code>Double.POSITIVE_INFINITY</code>.
*
* @return A <code>double</code> corresponding to <code>this</code>.
* @stable
* @stable ICU 2.0
*/
public double doubleValue(){
@ -2256,7 +2256,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* only if the operands have identical string representations.
* @throws ClassCastException if <code>rhs</code> cannot be cast to
* a <code>BigDecimal</code> object.
* @stable
* @stable ICU 2.0
* @see #compareTo(Object)
* @see #compareTo(BigDecimal)
* @see #compareTo(BigDecimal, MathContext)
@ -2314,7 +2314,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* or <code>Float.POSITIVE_INFINITY</code>.
*
* @return A <code>float</code> corresponding to <code>this</code>.
* @stable
* @stable ICU 2.0
*/
public float floatValue(){
@ -2378,7 +2378,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if the number cannot be laid out as
* requested.
* @throws IllegalArgumentException if a parameter is out of range.
* @stable
* @stable ICU 2.0
* @see #toString
* @see #toCharArray
*/
@ -2494,7 +2494,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws IllegalArgumentException if a parameter is out of range.
* @see #toString
* @see #toCharArray
* @stable
* @stable ICU 2.0
*/
public java.lang.String format(int before,int after,int explaces,int exdigits,int exformint,int exround){
@ -2723,7 +2723,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* characters in the same sequence).
*
* @return An <code>int</code> that is the hashcode for <code>this</code>.
* @stable
* @stable ICU 2.0
*/
public int hashCode(){
@ -2743,7 +2743,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return An <code>int</code> converted from <code>this</code>,
* truncated and decapitated if necessary.
* @stable
* @stable ICU 2.0
*/
public int intValue(){
@ -2760,7 +2760,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>this</code> has a non-zero
* decimal part, or will not fit in an
* <code>int</code>.
* @stable
* @stable ICU 2.0
*/
public int intValueExact(){
@ -2835,7 +2835,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return A <code>long</code> converted from <code>this</code>,
* truncated and decapitated if necessary.
* @stable
* @stable ICU 2.0
*/
public long longValue(){
@ -2852,7 +2852,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>this</code> has a non-zero
* decimal part, or will not fit in a
* <code>long</code>.
* @stable
* @stable ICU 2.0
*/
public long longValueExact(){
@ -2939,7 +2939,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A <code>BigDecimal</code> derived from
* <code>this</code>, with the decimal point moved
* <code>n</code> places to the left.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal movePointLeft(int n){
@ -2969,7 +2969,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return A <code>BigDecimal</code> derived from
* <code>this</code>, with the decimal point moved
* <code>n</code> places to the right.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal movePointRight(int n){
@ -2988,7 +2988,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return An <code>int</code> whose value is the scale of this
* <code>BigDecimal</code>.
* @stable
* @stable ICU 2.0
*/
public int scale(){
@ -3021,7 +3021,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>scale</code> is negative.
* @throws ArithmeticException if reducing scale would discard
* non-zero digits.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal setScale(int scale){
@ -3059,7 +3059,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>round</code> is
* <code>MathContext.ROUND_UNNECESSARY</code>, and
* reducing scale would discard non-zero digits.
* @stable
* @stable ICU 2.0
*/
public com.ibm.icu.math.BigDecimal setScale(int scale,int round){
@ -3113,7 +3113,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @throws ArithmeticException if <code>this</code> has a non-zero
* decimal part, or will not fit in a
* <code>short</code>.
* @stable
* @stable ICU 2.0
*/
public short shortValueExact(){
@ -3135,7 +3135,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return An <code>int</code> which is -1 if the
* <code>BigDecimal</code> is negative, 0 if it is
* numerically equal to zero, or 1 if it is positive.
* @stable
* @stable ICU 2.0
*/
public int signum(){
@ -3158,7 +3158,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return The <code>java.math.BigDecimal</code> equal in value
* to this <code>BigDecimal</code>.
* @stable
* @stable ICU 2.0
*/
public java.math.BigDecimal toBigDecimal(){
@ -3175,7 +3175,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return The <code>java.math.BigInteger</code> equal in value
* to the integer part of this <code>BigDecimal</code>.
* @stable
* @stable ICU 2.0
*/
public java.math.BigInteger toBigInteger(){
@ -3221,7 +3221,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* to the integer part of this <code>BigDecimal</code>.
* @throws ArithmeticException if <code>this</code> has a non-zero
* decimal part.
* @stable
* @stable ICU 2.0
*/
public java.math.BigInteger toBigIntegerExact(){
@ -3244,7 +3244,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
*
* @return The <code>char[]</code> array corresponding to this
* <code>BigDecimal</code>.
* @stable
* @stable ICU 2.0
*/
public char[] toCharArray(){
@ -3267,7 +3267,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @see #format(int, int)
* @see #format(int, int, int, int, int, int)
* @see #toCharArray()
* @stable
* @stable ICU 2.0
*/
public java.lang.String toString(){
@ -3284,7 +3284,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return The <code>java.math.BigInteger</code> equal in value to
* this <code>BigDecimal</code> multiplied by ten to the
* power of <code>this.scale()</code>.
* @stable
* @stable ICU 2.0
*/
public java.math.BigInteger unscaledValue(){
@ -3318,7 +3318,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>dub</code>.
* @throws NumberFormatException if the parameter is infinite or
* not a number.
* @stable
* @stable ICU 2.0
*/
public static com.ibm.icu.math.BigDecimal valueOf(double dub){
@ -3336,7 +3336,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @param lint The <code>long</code> to be translated.
* @return The <code>BigDecimal</code> equal in value to
* <code>lint</code>.
* @stable
* @stable ICU 2.0
*/
public static com.ibm.icu.math.BigDecimal valueOf(long lint){
@ -3363,7 +3363,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* @return The <code>BigDecimal</code> equal in value to
* <code>lint</code>.
* @throws NumberFormatException if the scale is negative.
* @stable
* @stable ICU 2.0
*/
public static com.ibm.icu.math.BigDecimal valueOf(long lint,int scale){

View file

@ -74,7 +74,7 @@ package com.ibm.icu.math;
*
* @see BigDecimal
* @author Mike Cowlishaw
* @stable
* @stable ICU 2.0
*/
public final class MathContext implements java.io.Serializable{
@ -91,7 +91,7 @@ public final class MathContext implements java.io.Serializable{
*
* @see #ENGINEERING
* @see #SCIENTIFIC
* @stable
* @stable ICU 2.0
*/
public static final int PLAIN=0; // [no exponent]
@ -105,7 +105,7 @@ public final class MathContext implements java.io.Serializable{
*
* @see #ENGINEERING
* @see #PLAIN
* @stable
* @stable ICU 2.0
*/
public static final int SCIENTIFIC=1; // 1 digit before .
@ -119,7 +119,7 @@ public final class MathContext implements java.io.Serializable{
*
* @see #PLAIN
* @see #SCIENTIFIC
* @stable
* @stable ICU 2.0
*/
public static final int ENGINEERING=2; // 1-3 digits before .
@ -131,7 +131,7 @@ public final class MathContext implements java.io.Serializable{
* <p>
* If any of the discarded digits are non-zero then the result
* should be rounded towards the next more positive digit.
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_CEILING=2;
@ -142,7 +142,7 @@ public final class MathContext implements java.io.Serializable{
* <p>
* All discarded digits are ignored (truncated). The result is
* neither incremented nor decremented.
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_DOWN=1;
@ -153,7 +153,7 @@ public final class MathContext implements java.io.Serializable{
* <p>
* If any of the discarded digits are non-zero then the result
* should be rounded towards the next more negative digit.
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_FLOOR=3;
@ -167,7 +167,7 @@ public final class MathContext implements java.io.Serializable{
* the value of a one in the next position then the result should be
* rounded up (away from zero). Otherwise the discarded digits are
* ignored.
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_HALF_DOWN=5;
@ -185,7 +185,7 @@ public final class MathContext implements java.io.Serializable{
* Otherwise (they represent exactly half) the result is rounded
* down if its rightmost digit is even, or rounded up if its
* rightmost digit is odd (to make an even digit).
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_HALF_EVEN=6;
@ -199,7 +199,7 @@ public final class MathContext implements java.io.Serializable{
* (0.5 times) the value of a one in the next position then the result
* should be rounded up (away from zero). Otherwise the discarded
* digits are ignored.
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_HALF_UP=4;
@ -211,7 +211,7 @@ public final class MathContext implements java.io.Serializable{
* Rounding (potential loss of information) is not permitted.
* If any of the discarded digits are non-zero then an
* <code>ArithmeticException</code> should be thrown.
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_UNNECESSARY=7;
@ -222,7 +222,7 @@ public final class MathContext implements java.io.Serializable{
* <p>
* If any of the discarded digits are non-zero then the result will
* be rounded up (away from zero).
* @stable
* @stable ICU 2.0
*/
public static final int ROUND_UP=0;
@ -330,7 +330,7 @@ public final class MathContext implements java.io.Serializable{
*
* @see #SCIENTIFIC
* @see #ROUND_HALF_UP
* @stable
* @stable ICU 2.0
*/
public static final com.ibm.icu.math.MathContext DEFAULT=new com.ibm.icu.math.MathContext(DEFAULT_DIGITS,DEFAULT_FORM,DEFAULT_LOSTDIGITS,DEFAULT_ROUNDINGMODE);
@ -352,7 +352,7 @@ public final class MathContext implements java.io.Serializable{
* @param setdigits The <code>int</code> digits setting
* for this <code>MathContext</code>.
* @throws IllegalArgumentException parameter out of range.
* @stable
* @stable ICU 2.0
*/
public MathContext(int setdigits){
@ -377,7 +377,7 @@ public final class MathContext implements java.io.Serializable{
* @param setform The <code>int</code> form setting
* for this <code>MathContext</code>.
* @throws IllegalArgumentException parameter out of range.
* @stable
* @stable ICU 2.0
*/
public MathContext(int setdigits,int setform){
@ -403,7 +403,7 @@ public final class MathContext implements java.io.Serializable{
* @param setlostdigits The <code>boolean</code> lostDigits
* setting for this <code>MathContext</code>.
* @throws IllegalArgumentException parameter out of range.
* @stable
* @stable ICU 2.0
*/
public MathContext(int setdigits,int setform,boolean setlostdigits){
@ -429,7 +429,7 @@ public final class MathContext implements java.io.Serializable{
* @param setroundingmode The <code>int</code> roundingMode setting
* for this <code>MathContext</code>.
* @throws IllegalArgumentException parameter out of range.
* @stable
* @stable ICU 2.0
*/
public MathContext(int setdigits,int setform,boolean setlostdigits,int setroundingmode){super();
@ -468,7 +468,7 @@ public final class MathContext implements java.io.Serializable{
*
* @return an <code>int</code> which is the value of the digits
* setting
* @stable
* @stable ICU 2.0
*/
public int getDigits(){
@ -483,7 +483,7 @@ public final class MathContext implements java.io.Serializable{
* {@link #SCIENTIFIC}.
*
* @return an <code>int</code> which is the value of the form setting
* @stable
* @stable ICU 2.0
*/
public int getForm(){
@ -497,7 +497,7 @@ public final class MathContext implements java.io.Serializable{
*
* @return a <code>boolean</code> which is the value of the lostDigits
* setting
* @stable
* @stable ICU 2.0
*/
public boolean getLostDigits(){
@ -518,7 +518,7 @@ public final class MathContext implements java.io.Serializable{
*
* @return an <code>int</code> which is the value of the roundingMode
* setting
* @stable
* @stable ICU 2.0
*/
public int getRoundingMode(){
@ -560,7 +560,7 @@ public final class MathContext implements java.io.Serializable{
* to the class.
*
* @return a <code>String</code> representing the context settings.
* @stable
* @stable ICU 2.0
*/
public java.lang.String toString(){

View file

@ -49,7 +49,7 @@ import com.ibm.icu.lang.*;
* length of the text to be constant. They expect extra spaces to be added
* or consumed either next to the affected character or at the end of the
* text.</p>
* @stable
* @stable ICU 2.0
*/
public final class ArabicShaping {
private final int options;
@ -78,7 +78,7 @@ public final class ArabicShaping {
* If an error occurs, then no output was written, or it may be
* incomplete.
* @throws ArabicShapingException if the text cannot be converted according to the options.
* @stable
* @stable ICU 2.0
*/
public int shape(char[] source, int sourceStart, int sourceLength,
char[] dest, int destStart, int destSize) throws ArabicShapingException {
@ -111,7 +111,7 @@ public final class ArabicShaping {
* @param start The start of the range of text to convert
* @param length The length of the range of text to convert
* @throws ArabicShapingException if the text cannot be converted according to the options.
* @stable
* @stable ICU 2.0
*/
public void shape(char[] source, int start, int length) throws ArabicShapingException {
if ((options & LENGTH_MASK) == LENGTH_GROW_SHRINK) {
@ -126,7 +126,7 @@ public final class ArabicShaping {
* @param source The string to convert.
* @return The converted string.
* @throws ArabicShapingException if the string cannot be converted according to the options.
* @stable
* @stable ICU 2.0
*/
public String shape(String text) throws ArabicShapingException {
char[] src = text.toCharArray();
@ -155,7 +155,7 @@ public final class ArabicShaping {
* European to Arabic-Indic or vice-versa.<br>
* 'DIGIT_TYPE' flags control whether standard or extended Arabic-Indic
* digits are used when performing digit conversion.
* @stable
* @stable ICU 2.0
*/
public ArabicShaping(int options) {
this.options = options;
@ -167,61 +167,61 @@ public final class ArabicShaping {
/**
* Memory option: allow the result to have a different length than the source.
* @stable
* @stable ICU 2.0
*/
public static final int LENGTH_GROW_SHRINK = 0;
/**
* Memory option: the result must have the same length as the source.
* If more room is necessary, then try to consume spaces next to modified characters.
* @stable
* @stable ICU 2.0
*/
public static final int LENGTH_FIXED_SPACES_NEAR = 1;
/**
* Memory option: the result must have the same length as the source.
* If more room is necessary, then try to consume spaces at the end of the text.
* @stable
* @stable ICU 2.0
*/
public static final int LENGTH_FIXED_SPACES_AT_END = 2;
/**
* Memory option: the result must have the same length as the source.
* If more room is necessary, then try to consume spaces at the beginning of the text.
* @stable
* @stable ICU 2.0
*/
public static final int LENGTH_FIXED_SPACES_AT_BEGINNING = 3;
/**
* Bit mask for memory options.
* @stable
* @stable ICU 2.0
*/
public static final int LENGTH_MASK = 3;
/**
* Direction indicator: the source is in logical (keyboard) order.
* @stable
* @stable ICU 2.0
*/
public static final int TEXT_DIRECTION_LOGICAL = 0;
/**
* Direction indicator: the source is in visual (display) order, that is,
* the leftmost displayed character is stored first.
* @stable
* @stable ICU 2.0
*/
public static final int TEXT_DIRECTION_VISUAL_LTR = 4;
/**
* Bit mask for direction indicators.
* @stable
* @stable ICU 2.0
*/
public static final int TEXT_DIRECTION_MASK = 4;
/**
* Letter shaping option: do not perform letter shaping.
* @stable
* @stable ICU 2.0
*/
public static final int LETTERS_NOOP = 0;
@ -229,7 +229,7 @@ public final class ArabicShaping {
* Letter shaping option: replace normative letter characters in the U+0600 (Arabic) block,
* by shaped ones in the U+FE70 (Presentation Forms B) block. Performs Lam-Alef ligature
* substitution.
* @stable
* @stable ICU 2.0
*/
public static final int LETTERS_SHAPE = 8;
@ -237,7 +237,7 @@ public final class ArabicShaping {
* Letter shaping option: replace shaped letter characters in the U+FE70 (Presentation Forms B) block
* by normative ones in the U+0600 (Arabic) block. Converts Lam-Alef ligatures to pairs of Lam and
* Alef characters, consuming spaces if required.
* @stable
* @stable ICU 2.0
*/
public static final int LETTERS_UNSHAPE = 0x10;
@ -246,32 +246,32 @@ public final class ArabicShaping {
* except for the TASHKEEL characters at U+064B...U+0652, by shaped ones in the U+Fe70
* (Presentation Forms B) block. The TASHKEEL characters will always be converted to
* the isolated forms rather than to their correct shape.
* @stable
* @stable ICU 2.0
*/
public static final int LETTERS_SHAPE_TASHKEEL_ISOLATED = 0x18;
/**
* Bit mask for letter shaping options.
* @stable
* @stable ICU 2.0
*/
public static final int LETTERS_MASK = 0x18;
/**
* Digit shaping option: do not perform digit shaping.
* @stable
* @stable ICU 2.0
*/
public static final int DIGITS_NOOP = 0;
/**
* Digit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits.
* @stable
* @stable ICU 2.0
*/
public static final int DIGITS_EN2AN = 0x20;
/**
* Digit shaping option: Replace Arabic-Indic digits by European digits (U+0030...U+0039).
* @stable
* @stable ICU 2.0
*/
public static final int DIGITS_AN2EN = 0x40;
@ -283,7 +283,7 @@ public final class ArabicShaping {
* The initial state at the start of the text is assumed to be not an Arabic,
* letter, so European digits at the start of the text will not change.
* Compare to DIGITS_ALEN2AN_INIT_AL.
* @stable
* @stable ICU 2.0
*/
public static final int DIGITS_EN2AN_INIT_LR = 0x60;
@ -295,7 +295,7 @@ public final class ArabicShaping {
* The initial state at the start of the text is assumed to be an Arabic,
* letter, so European digits at the start of the text will change.
* Compare to DIGITS_ALEN2AN_INT_LR.
* @stable
* @stable ICU 2.0
*/
public static final int DIGITS_EN2AN_INIT_AL = 0x80;
@ -304,30 +304,30 @@ public final class ArabicShaping {
/**
* Bit mask for digit shaping options.
* @stable
* @stable ICU 2.0
*/
public static final int DIGITS_MASK = 0xe0;
/**
* Digit type option: Use Arabic-Indic digits (U+0660...U+0669).
* @stable
* @stable ICU 2.0
*/
public static final int DIGIT_TYPE_AN = 0;
/**
* Digit type option: Use Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).
* @stable
* @stable ICU 2.0
*/
public static final int DIGIT_TYPE_AN_EXTENDED = 0x100;
/**
* Bit mask for digit type options.
* @stable
* @stable ICU 2.0
*/
public static final int DIGIT_TYPE_MASK = 0x0100; // 0x3f00?
/**
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object rhs) {
return rhs != null &&
@ -336,14 +336,14 @@ public final class ArabicShaping {
}
/**
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
return options;
}
/**
* @stable
* @stable ICU 2.0
*/
public String toString() {
StringBuffer buf = new StringBuffer(super.toString());

View file

@ -9,7 +9,7 @@ package com.ibm.icu.text;
/**
* Thrown by ArabicShaping when there is a shaping error.
* @stable
* @stable ICU 2.0
*/
public final class ArabicShapingException extends Exception {
ArabicShapingException(String message) {

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/BreakIterator.java,v $
* $Date: 2002/12/04 01:45:52 $
* $Revision: 1.12 $
* $Date: 2002/12/05 01:21:28 $
* $Revision: 1.13 $
*
*****************************************************************************************
*/
@ -211,7 +211,7 @@ import java.util.Vector;
* </blockquote>
*
* @see CharacterIterator
* @stable
* @stable ICU 2.0
*
*/
@ -220,7 +220,7 @@ public abstract class BreakIterator implements Cloneable
/**
* Default constructor. There is no state that is carried by this abstract
* base class.
* @stable
* @stable ICU 2.0
*/
protected BreakIterator()
{
@ -230,7 +230,7 @@ public abstract class BreakIterator implements Cloneable
* Clone method. Creates another BreakIterator with the same behavior and
* current state as this one.
* @return The clone.
* @stable
* @stable ICU 2.0
*/
public Object clone()
{
@ -245,7 +245,7 @@ public abstract class BreakIterator implements Cloneable
/**
* DONE is returned by previous() and next() after all valid
* boundaries have been returned.
* @stable
* @stable ICU 2.0
*/
public static final int DONE = -1;
@ -257,7 +257,7 @@ public abstract class BreakIterator implements Cloneable
* to point to the beginning of the text.
* @return The character offset of the beginning of the stretch of text
* being broken.
* @stable
* @stable ICU 2.0
*/
public abstract int first();
@ -269,7 +269,7 @@ public abstract class BreakIterator implements Cloneable
* iteration position to point to the end of the text.
* @return The character offset of the end of the stretch of text
* being broken.
* @stable
* @stable ICU 2.0
*/
public abstract int last();
@ -285,7 +285,7 @@ public abstract class BreakIterator implements Cloneable
* @return The position of the boundary n boundaries from the current
* iteration position, or DONE if moving n boundaries causes the iterator
* to advance off either end of the text.
* @stable
* @stable ICU 2.0
*/
public abstract int next(int n);
@ -298,7 +298,7 @@ public abstract class BreakIterator implements Cloneable
* DONE.
* @return The position of the first boundary position following the
* iteration position.
* @stable
* @stable ICU 2.0
*/
public abstract int next();
@ -311,7 +311,7 @@ public abstract class BreakIterator implements Cloneable
* DONE.
* @return The position of the last boundary position preceding the
* iteration position.
* @stable
* @stable ICU 2.0
*/
public abstract int previous();
@ -326,7 +326,7 @@ public abstract class BreakIterator implements Cloneable
* @return The position of the first boundary position following
* "offset" (whether or not "offset" itself is a boundary position),
* or DONE if "offset" is the past-the-end offset.
* @stable
* @stable ICU 2.0
*/
public abstract int following(int offset);
@ -341,7 +341,7 @@ public abstract class BreakIterator implements Cloneable
* @return The position of the last boundary position preceding
* "offset" (whether of not "offset" itself is a boundary position),
* or DONE if "offset" is the starting offset of the iterator.
* @stable
* @stable ICU 2.0
*/
public int preceding(int offset) {
// NOTE: This implementation is here solely because we can't add new
@ -360,7 +360,7 @@ public abstract class BreakIterator implements Cloneable
* iteration position is set as though following() had been called.
* @param offset the offset to check.
* @return True if "offset" is a boundary position.
* @stable
* @stable ICU 2.0
*/
public boolean isBoundary(int offset) {
// Again, this is the default implementation, which is provided solely because
@ -376,7 +376,7 @@ public abstract class BreakIterator implements Cloneable
/**
* Return the iterator's current position.
* @return The iterator's current position.
* @stable
* @stable ICU 2.0
*/
public abstract int current();
@ -389,7 +389,7 @@ public abstract class BreakIterator implements Cloneable
* of this iterator when it is returned. If you need to move that
* position to examine the text, clone this function's return value first.
* @return A CharacterIterator over the text being analyzed.
* @stable
* @stable ICU 2.0
*/
public abstract CharacterIterator getText();
@ -400,7 +400,7 @@ public abstract class BreakIterator implements Cloneable
* (The old text is dropped.)
* @param newText A String containing the text to analyze with
* this BreakIterator.
* @stable
* @stable ICU 2.0
*/
public void setText(String newText)
{
@ -416,19 +416,19 @@ public abstract class BreakIterator implements Cloneable
* @param newText A CharacterIterator referring to the text
* to analyze with this BreakIterator (the iterator's current
* position is ignored, but its other state is significant).
* @stable
* @stable ICU 2.0
*/
public abstract void setText(CharacterIterator newText);
/** @stable */
/** @stable ICU 2.0 */
public static final int KIND_CHARACTER = 0;
/** @stable */
/** @stable ICU 2.0 */
public static final int KIND_WORD = 1;
/** @stable */
/** @stable ICU 2.0 */
public static final int KIND_LINE = 2;
/** @stable */
/** @stable ICU 2.0 */
public static final int KIND_SENTENCE = 3;
/** @stable */
/** @stable ICU 2.0 */
public static final int KIND_TITLE = 4;
/*
private static final int CHARACTER_INDEX = 0;
@ -445,7 +445,7 @@ public abstract class BreakIterator implements Cloneable
* This function assumes that the text being analyzed is in the default
* locale's language.
* @return An instance of BreakIterator that locates word boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getWordInstance()
{
@ -457,7 +457,7 @@ public abstract class BreakIterator implements Cloneable
* @param where A locale specifying the language of the text to be
* analyzed.
* @return An instance of BreakIterator that locates word boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getWordInstance(Locale where)
{
@ -470,7 +470,7 @@ public abstract class BreakIterator implements Cloneable
* is in the default locale's language.
* @return A new instance of BreakIterator that locates legal
* line-wrapping positions.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getLineInstance()
{
@ -483,7 +483,7 @@ public abstract class BreakIterator implements Cloneable
* @param where A Locale specifying the language of the text being broken.
* @return A new instance of BreakIterator that locates legal
* line-wrapping positions.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getLineInstance(Locale where)
{
@ -496,7 +496,7 @@ public abstract class BreakIterator implements Cloneable
* in the default locale's language.
* @return A new instance of BreakIterator that locates logical-character
* boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getCharacterInstance()
{
@ -509,7 +509,7 @@ public abstract class BreakIterator implements Cloneable
* @param where A Locale specifying the language of the text being analyzed.
* @return A new instance of BreakIterator that locates logical-character
* boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getCharacterInstance(Locale where)
{
@ -521,7 +521,7 @@ public abstract class BreakIterator implements Cloneable
* This function assumes the text being analyzed is in the default locale's
* language.
* @return A new instance of BreakIterator that locates sentence boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getSentenceInstance()
{
@ -532,7 +532,7 @@ public abstract class BreakIterator implements Cloneable
* Returns a new instance of BreakIterator that locates sentence boundaries.
* @param where A Locale specifying the language of the text being analyzed.
* @return A new instance of BreakIterator that locates sentence boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getSentenceInstance(Locale where)
{
@ -544,7 +544,7 @@ public abstract class BreakIterator implements Cloneable
* This function assumes the text being analyzed is in the default locale's
* language.
* @return A new instance of BreakIterator that locates sentence boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getTitleInstance()
{
@ -555,7 +555,7 @@ public abstract class BreakIterator implements Cloneable
* Returns a new instance of BreakIterator that locates sentence boundaries.
* @param where A Locale specifying the language of the text being analyzed.
* @return A new instance of BreakIterator that locates sentence boundaries.
* @stable
* @stable ICU 2.0
*/
public static BreakIterator getTitleInstance(Locale where)
{

View file

@ -3,8 +3,8 @@
* others. All Rights Reserved.
*********************************************************************
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/ChineseDateFormat.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.6 $
* $Date: 2002/12/05 01:21:29 $
* $Revision: 1.7 $
*/
package com.ibm.icu.text;
import com.ibm.icu.util.*;
@ -38,7 +38,7 @@ import java.util.Locale;
* @see com.ibm.icu.util.ChineseCalendar
* @see ChineseDateFormatSymbols
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class ChineseDateFormat extends SimpleDateFormat {
@ -48,14 +48,14 @@ public class ChineseDateFormat extends SimpleDateFormat {
* Construct a ChineseDateFormat from a date format pattern and locale
* @param pattern the pattern
* @param locale the locale
* @stable
* @stable ICU 2.0
*/
public ChineseDateFormat(String pattern, Locale locale) {
super(pattern, new ChineseDateFormatSymbols(locale));
}
/**
* @stable
* @stable ICU 2.0
*/
protected String subFormat(char ch, int count, int beginOffset,
FieldPosition pos, DateFormatSymbols formatData,
@ -76,7 +76,7 @@ public class ChineseDateFormat extends SimpleDateFormat {
}
/**
* @stable
* @stable ICU 2.0
*/
protected int subParse(String text, int start, char ch, int count,
boolean obeyCount, boolean[] ambiguousYear, Calendar cal) {

View file

@ -3,8 +3,8 @@
* others. All Rights Reserved.
*********************************************************************
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/ChineseDateFormatSymbols.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.3 $
* $Date: 2002/12/05 01:21:31 $
* $Revision: 1.4 $
*/
package com.ibm.icu.text;
import com.ibm.icu.util.*;
@ -20,7 +20,7 @@ import java.util.MissingResourceException;
* @see ChineseDateFormat
* @see com.ibm.icu.util.ChineseCalendar
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class ChineseDateFormatSymbols extends DateFormatSymbols {
@ -32,7 +32,7 @@ public class ChineseDateFormatSymbols extends DateFormatSymbols {
/**
* Construct a ChineseDateFormatSymbols for the default locale.
* @stable
* @stable ICU 2.0
*/
public ChineseDateFormatSymbols() {
this(Locale.getDefault());
@ -41,7 +41,7 @@ public class ChineseDateFormatSymbols extends DateFormatSymbols {
/**
* Construct a ChineseDateFormatSymbols for the provided locale.
* @param locale the locale
* @stable
* @stable ICU 2.0
*/
public ChineseDateFormatSymbols(Locale locale) {
super(ChineseCalendar.class, locale);
@ -51,7 +51,7 @@ public class ChineseDateFormatSymbols extends DateFormatSymbols {
* Construct a ChineseDateFormatSymbols for the provided calendar and locale.
* @param cal the Calendar
* @param locale the locale
* @stable
* @stable ICU 2.0
*/
public ChineseDateFormatSymbols(Calendar cal, Locale locale) {
super(cal==null?null:cal.getClass(), locale);
@ -59,7 +59,7 @@ public class ChineseDateFormatSymbols extends DateFormatSymbols {
// New API
/**
* @stable
* @stable ICU 2.0
*/
public String getLeapMonth(int isLeapMonth) {
return this.isLeapMonth[isLeapMonth];
@ -67,7 +67,7 @@ public class ChineseDateFormatSymbols extends DateFormatSymbols {
/**
* Override DateFormatSymbols.
* @stable
* @stable ICU 2.0
*/
protected void constructCalendarSpecific(ResourceBundle bundle) {
super.constructCalendarSpecific(bundle);

View file

@ -104,7 +104,7 @@ import java.util.ResourceBundle;
* @see com.ibm.icu.util.GregorianCalendar
* @see com.ibm.icu.util.TimeZone
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
* @stable
* @stable ICU 2.0
*/
public abstract class DateFormat extends Format {
@ -114,7 +114,7 @@ public abstract class DateFormat extends Format {
* initialize this to a calendar appropriate for the locale associated with
* this <code>DateFormat</code>.
* @serial
* @stable
* @stable ICU 2.0
*/
protected Calendar calendar;
@ -123,35 +123,35 @@ public abstract class DateFormat extends Format {
* in dates and times. Subclasses should initialize this to a number format
* appropriate for the locale associated with this <code>DateFormat</code>.
* @serial
* @stable
* @stable ICU 2.0
*/
protected NumberFormat numberFormat;
/**
* Useful constant for ERA field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int ERA_FIELD = 0;
/**
* Useful constant for YEAR field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int YEAR_FIELD = 1;
/**
* Useful constant for MONTH field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int MONTH_FIELD = 2;
/**
* Useful constant for DATE field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int DATE_FIELD = 3;
@ -160,7 +160,7 @@ public abstract class DateFormat extends Format {
* Used in FieldPosition of date/time formatting.
* HOUR_OF_DAY1_FIELD is used for the one-based 24-hour clock.
* For example, 23:59 + 01:00 results in 24:59.
* @stable
* @stable ICU 2.0
*/
public final static int HOUR_OF_DAY1_FIELD = 4;
@ -169,70 +169,70 @@ public abstract class DateFormat extends Format {
* Used in FieldPosition of date/time formatting.
* HOUR_OF_DAY0_FIELD is used for the zero-based 24-hour clock.
* For example, 23:59 + 01:00 results in 00:59.
* @stable
* @stable ICU 2.0
*/
public final static int HOUR_OF_DAY0_FIELD = 5;
/**
* Useful constant for MINUTE field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int MINUTE_FIELD = 6;
/**
* Useful constant for SECOND field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int SECOND_FIELD = 7;
/**
* Useful constant for MILLISECOND field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int MILLISECOND_FIELD = 8;
/**
* Useful constant for DAY_OF_WEEK field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int DAY_OF_WEEK_FIELD = 9;
/**
* Useful constant for DAY_OF_YEAR field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int DAY_OF_YEAR_FIELD = 10;
/**
* Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int DAY_OF_WEEK_IN_MONTH_FIELD = 11;
/**
* Useful constant for WEEK_OF_YEAR field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int WEEK_OF_YEAR_FIELD = 12;
/**
* Useful constant for WEEK_OF_MONTH field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int WEEK_OF_MONTH_FIELD = 13;
/**
* Useful constant for AM_PM field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int AM_PM_FIELD = 14;
@ -241,7 +241,7 @@ public abstract class DateFormat extends Format {
* Used in FieldPosition of date/time formatting.
* HOUR1_FIELD is used for the one-based 12-hour clock.
* For example, 11:30 PM + 1 hour results in 12:30 AM.
* @stable
* @stable ICU 2.0
*/
public final static int HOUR1_FIELD = 15;
@ -250,14 +250,14 @@ public abstract class DateFormat extends Format {
* Used in FieldPosition of date/time formatting.
* HOUR0_FIELD is used for the zero-based 12-hour clock.
* For example, 11:30 PM + 1 hour results in 00:30 AM.
* @stable
* @stable ICU 2.0
*/
public final static int HOUR0_FIELD = 16;
/**
* Useful constant for TIMEZONE field alignment.
* Used in FieldPosition of date/time formatting.
* @stable
* @stable ICU 2.0
*/
public final static int TIMEZONE_FIELD = 17;
@ -288,7 +288,7 @@ public abstract class DateFormat extends Format {
* 5 and 8, respectively, for the first occurence of the timezone
* pattern character 'z'.
* @see java.text.Format
* @stable
* @stable ICU 2.0
*/
public final StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition fieldPosition)
@ -326,7 +326,7 @@ public abstract class DateFormat extends Format {
* 5 and 8, respectively, for the first occurence of the timezone
* pattern character 'z'.
* @return the formatted date/time string.
* @stable
* @stable ICU 2.0
*/
public abstract StringBuffer format(Calendar cal, StringBuffer toAppendTo,
FieldPosition fieldPosition);
@ -352,7 +352,7 @@ public abstract class DateFormat extends Format {
* 5 and 8, respectively, for the first occurence of the timezone
* pattern character 'z'.
* @return the formatted date/time string.
* @stable
* @stable ICU 2.0
*/
public final StringBuffer format(Date date, StringBuffer toAppendTo,
FieldPosition fieldPosition) {
@ -365,7 +365,7 @@ public abstract class DateFormat extends Format {
* Formats a Date into a date/time string.
* @param date the time value to be formatted into a time string.
* @return the formatted time string.
* @stable
* @stable ICU 2.0
*/
public final String format(Date date)
{
@ -382,7 +382,7 @@ public abstract class DateFormat extends Format {
* @exception ParseException If the given string cannot be parsed as a date.
*
* @see #parse(String, ParsePosition)
* @stable
* @stable ICU 2.0
*/
public Date parse(String text) throws ParseException
{
@ -418,7 +418,7 @@ public abstract class DateFormat extends Format {
* @param pos On input, the position at which to start parsing; on
* output, the position at which parsing terminated, or the
* start position if the parse failed.
* @stable
* @stable ICU 2.0
*/
public abstract void parse(String text, Calendar cal, ParsePosition pos);
@ -441,7 +441,7 @@ public abstract class DateFormat extends Format {
* start position if the parse failed.
*
* @return A Date, or null if the input could not be parsed
* @stable
* @stable ICU 2.0
*/
public final Date parse(String text, ParsePosition pos) {
int start = pos.getIndex();
@ -466,7 +466,7 @@ public abstract class DateFormat extends Format {
* calls parse(String, ParsePosition).
*
* @see #parse(String, ParsePosition)
* @stable
* @stable ICU 2.0
*/
public Object parseObject (String source, ParsePosition pos)
{
@ -475,31 +475,31 @@ public abstract class DateFormat extends Format {
/**
* Constant for full style pattern.
* @stable
* @stable ICU 2.0
*/
public static final int FULL = 0;
/**
* Constant for long style pattern.
* @stable
* @stable ICU 2.0
*/
public static final int LONG = 1;
/**
* Constant for medium style pattern.
* @stable
* @stable ICU 2.0
*/
public static final int MEDIUM = 2;
/**
* Constant for short style pattern.
* @stable
* @stable ICU 2.0
*/
public static final int SHORT = 3;
/**
* Constant for default style pattern. Its value is MEDIUM.
* @stable
* @stable ICU 2.0
*/
public static final int DEFAULT = MEDIUM;
@ -507,7 +507,7 @@ public abstract class DateFormat extends Format {
* Gets the time formatter with the default formatting style
* for the default locale.
* @return a time formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getTimeInstance()
{
@ -520,7 +520,7 @@ public abstract class DateFormat extends Format {
* @param style the given formatting style. For example,
* SHORT for "h:mm a" in the US locale.
* @return a time formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getTimeInstance(int style)
{
@ -534,7 +534,7 @@ public abstract class DateFormat extends Format {
* SHORT for "h:mm a" in the US locale.
* @param aLocale the given locale.
* @return a time formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getTimeInstance(int style,
Locale aLocale)
@ -546,7 +546,7 @@ public abstract class DateFormat extends Format {
* Gets the date formatter with the default formatting style
* for the default locale.
* @return a date formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getDateInstance()
{
@ -559,7 +559,7 @@ public abstract class DateFormat extends Format {
* @param style the given formatting style. For example,
* SHORT for "M/d/yy" in the US locale.
* @return a date formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getDateInstance(int style)
{
@ -573,7 +573,7 @@ public abstract class DateFormat extends Format {
* SHORT for "M/d/yy" in the US locale.
* @param aLocale the given locale.
* @return a date formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getDateInstance(int style,
Locale aLocale)
@ -585,7 +585,7 @@ public abstract class DateFormat extends Format {
* Gets the date/time formatter with the default formatting style
* for the default locale.
* @return a date/time formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getDateTimeInstance()
{
@ -600,7 +600,7 @@ public abstract class DateFormat extends Format {
* @param timeStyle the given time formatting style. For example,
* SHORT for "h:mm a" in the US locale.
* @return a date/time formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getDateTimeInstance(int dateStyle,
int timeStyle)
@ -615,7 +615,7 @@ public abstract class DateFormat extends Format {
* @param timeStyle the given time formatting style.
* @param aLocale the given locale.
* @return a date/time formatter.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat
getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale)
@ -626,7 +626,7 @@ public abstract class DateFormat extends Format {
/**
* Get a default date/time formatter that uses the SHORT style for both the
* date and the time.
* @stable
* @stable ICU 2.0
*/
public final static DateFormat getInstance() {
return getDateTimeInstance(SHORT, SHORT);
@ -635,7 +635,7 @@ public abstract class DateFormat extends Format {
/**
* Gets the set of locales for which DateFormats are installed.
* @return the set of locales for which DateFormats are installed.
* @stable
* @stable ICU 2.0
*/
public static Locale[] getAvailableLocales()
{
@ -646,7 +646,7 @@ public abstract class DateFormat extends Format {
* Set the calendar to be used by this date format. Initially, the default
* calendar for the specified or default locale is used.
* @param newCalendar the new Calendar to be used by the date format
* @stable
* @stable ICU 2.0
*/
public void setCalendar(Calendar newCalendar)
{
@ -656,7 +656,7 @@ public abstract class DateFormat extends Format {
/**
* Gets the calendar associated with this date/time formatter.
* @return the calendar associated with this date/time formatter.
* @stable
* @stable ICU 2.0
*/
public Calendar getCalendar()
{
@ -666,7 +666,7 @@ public abstract class DateFormat extends Format {
/**
* Allows you to set the number formatter.
* @param newNumberFormat the given new NumberFormat.
* @stable
* @stable ICU 2.0
*/
public void setNumberFormat(NumberFormat newNumberFormat)
{
@ -681,7 +681,7 @@ public abstract class DateFormat extends Format {
* Gets the number formatter which this date/time formatter uses to
* format and parse a time.
* @return the number formatter which this date/time formatter uses.
* @stable
* @stable ICU 2.0
*/
public NumberFormat getNumberFormat()
{
@ -691,7 +691,7 @@ public abstract class DateFormat extends Format {
/**
* Sets the time zone for the calendar of this DateFormat object.
* @param zone the given new time zone.
* @stable
* @stable ICU 2.0
*/
public void setTimeZone(TimeZone zone)
{
@ -701,7 +701,7 @@ public abstract class DateFormat extends Format {
/**
* Gets the time zone.
* @return the time zone associated with the calendar of DateFormat.
* @stable
* @stable ICU 2.0
*/
public TimeZone getTimeZone()
{
@ -715,7 +715,7 @@ public abstract class DateFormat extends Format {
* inputs must match this object's format.
* @param lenient when true, parsing is lenient
* @see com.ibm.icu.util.Calendar#setLenient
* @stable
* @stable ICU 2.0
*/
public void setLenient(boolean lenient)
{
@ -724,7 +724,7 @@ public abstract class DateFormat extends Format {
/**
* Tell whether date/time parsing is to be lenient.
* @stable
* @stable ICU 2.0
*/
public boolean isLenient()
{
@ -733,7 +733,7 @@ public abstract class DateFormat extends Format {
/**
* Overrides hashCode
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
return numberFormat.hashCode();
@ -742,7 +742,7 @@ public abstract class DateFormat extends Format {
/**
* Overrides equals
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj) {
if (this == obj) return true;
@ -754,7 +754,7 @@ public abstract class DateFormat extends Format {
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone()
{
@ -789,7 +789,7 @@ public abstract class DateFormat extends Format {
/**
* Create a new date format.
* @stable
* @stable ICU 2.0
*/
protected DateFormat() {}
@ -811,7 +811,7 @@ public abstract class DateFormat extends Format {
* etc.
*
* @param locale The locale for which the date format is desired.
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getDateInstance(Calendar cal, int dateStyle, Locale locale)
{
@ -834,7 +834,7 @@ public abstract class DateFormat extends Format {
* @param locale The locale for which the time format is desired.
*
* @see DateFormat#getTimeInstance
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getTimeInstance(Calendar cal, int timeStyle, Locale locale)
{
@ -861,7 +861,7 @@ public abstract class DateFormat extends Format {
* @param locale The locale for which the date/time format is desired.
*
* @see DateFormat#getDateTimeInstance
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle,
int timeStyle, Locale locale)
@ -871,7 +871,7 @@ public abstract class DateFormat extends Format {
/**
* Convenience overload
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getInstance(Calendar cal, Locale locale) {
return getDateTimeInstance(cal, SHORT, SHORT, locale);
@ -879,7 +879,7 @@ public abstract class DateFormat extends Format {
/**
* Convenience overload
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getInstance(Calendar cal) {
return getInstance(cal, Locale.getDefault());
@ -887,7 +887,7 @@ public abstract class DateFormat extends Format {
/**
* Convenience overload
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getDateInstance(Calendar cal, int dateStyle) {
return getDateInstance(cal, dateStyle, Locale.getDefault());
@ -895,7 +895,7 @@ public abstract class DateFormat extends Format {
/**
* Convenience overload
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getTimeInstance(Calendar cal, int timeStyle) {
return getTimeInstance(cal, timeStyle, Locale.getDefault());
@ -903,7 +903,7 @@ public abstract class DateFormat extends Format {
/**
* Convenience overload
* @stable
* @stable ICU 2.0
*/
static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle) {
return getDateTimeInstance(cal, dateStyle, timeStyle, Locale.getDefault());

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/DateFormatSymbols.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.13 $
* $Date: 2002/12/05 01:21:36 $
* $Revision: 1.14 $
*
*****************************************************************************************
*/
@ -72,7 +72,7 @@ import java.util.Vector;
* @see SimpleDateFormat
* @see com.ibm.icu.util.SimpleTimeZone
* @author Chen-Lieh Huang
* @stable
* @stable ICU 2.0
*/
public class DateFormatSymbols implements Serializable, Cloneable {
@ -83,7 +83,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @throws java.util.MissingResourceException
* if the resources for the default locale cannot be
* found or cannot be loaded.
* @stable
* @stable ICU 2.0
*/
public DateFormatSymbols()
{
@ -97,7 +97,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @throws java.util.MissingResourceException
* if the resources for the specified locale cannot be
* found or cannot be loaded.
* @stable
* @stable ICU 2.0
*/
public DateFormatSymbols(Locale locale)
{
@ -205,7 +205,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Gets era strings. For example: "AD" and "BC".
* @return the era strings.
* @stable
* @stable ICU 2.0
*/
public String[] getEras() {
return duplicate(eras);
@ -214,7 +214,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Sets era strings. For example: "AD" and "BC".
* @param newEras the new era strings.
* @stable
* @stable ICU 2.0
*/
public void setEras(String[] newEras) {
eras = duplicate(newEras);
@ -223,7 +223,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Gets month strings. For example: "January", "February", etc.
* @return the month strings.
* @stable
* @stable ICU 2.0
*/
public String[] getMonths() {
return duplicate(months);
@ -232,7 +232,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Sets month strings. For example: "January", "February", etc.
* @param newMonths the new month strings.
* @stable
* @stable ICU 2.0
*/
public void setMonths(String[] newMonths) {
months = duplicate(newMonths);
@ -241,7 +241,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Gets short month strings. For example: "Jan", "Feb", etc.
* @return the short month strings.
* @stable
* @stable ICU 2.0
*/
public String[] getShortMonths() {
return duplicate(shortMonths);
@ -250,7 +250,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Sets short month strings. For example: "Jan", "Feb", etc.
* @param newShortMonths the new short month strings.
* @stable
* @stable ICU 2.0
*/
public void setShortMonths(String[] newShortMonths) {
shortMonths = duplicate(newShortMonths);
@ -260,7 +260,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Gets weekday strings. For example: "Sunday", "Monday", etc.
* @return the weekday strings. Use <code>Calendar.SUNDAY</code>,
* <code>Calendar.MONDAY</code>, etc. to index the result array.
* @stable
* @stable ICU 2.0
*/
public String[] getWeekdays() {
return duplicate(weekdays);
@ -271,7 +271,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param newWeekdays the new weekday strings. The array should
* be indexed by <code>Calendar.SUNDAY</code>,
* <code>Calendar.MONDAY</code>, etc.
* @stable
* @stable ICU 2.0
*/
public void setWeekdays(String[] newWeekdays) {
weekdays = duplicate(newWeekdays);
@ -281,7 +281,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Gets short weekday strings. For example: "Sun", "Mon", etc.
* @return the short weekday strings. Use <code>Calendar.SUNDAY</code>,
* <code>Calendar.MONDAY</code>, etc. to index the result array.
* @stable
* @stable ICU 2.0
*/
public String[] getShortWeekdays() {
return duplicate(shortWeekdays);
@ -292,7 +292,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param newShortWeekdays the new short weekday strings. The array should
* be indexed by <code>Calendar.SUNDAY</code>,
* <code>Calendar.MONDAY</code>, etc.
* @stable
* @stable ICU 2.0
*/
public void setShortWeekdays(String[] newShortWeekdays) {
shortWeekdays = duplicate(newShortWeekdays);
@ -301,7 +301,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Gets ampm strings. For example: "AM" and "PM".
* @return the weekday strings.
* @stable
* @stable ICU 2.0
*/
public String[] getAmPmStrings() {
return duplicate(ampms);
@ -310,7 +310,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Sets ampm strings. For example: "AM" and "PM".
* @param newAmpms the new ampm strings.
* @stable
* @stable ICU 2.0
*/
public void setAmPmStrings(String[] newAmpms) {
ampms = duplicate(newAmpms);
@ -319,7 +319,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Gets timezone strings.
* @return the timezone strings.
* @stable
* @stable ICU 2.0
*/
public String[][] getZoneStrings() {
return duplicate(zoneStrings);
@ -328,7 +328,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Sets timezone strings.
* @param newZoneStrings the new timezone strings.
* @stable
* @stable ICU 2.0
*/
public void setZoneStrings(String[][] newZoneStrings) {
zoneStrings = duplicate(newZoneStrings);
@ -337,7 +337,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Gets localized date-time pattern characters. For example: 'u', 't', etc.
* @return the localized date-time pattern characters.
* @stable
* @stable ICU 2.0
*/
public String getLocalPatternChars() {
return new String(localPatternChars);
@ -347,7 +347,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Sets localized date-time pattern characters. For example: 'u', 't', etc.
* @param newLocalPatternChars the new localized date-time
* pattern characters.
* @stable
* @stable ICU 2.0
*/
public void setLocalPatternChars(String newLocalPatternChars) {
localPatternChars = newLocalPatternChars;
@ -355,7 +355,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone()
{
@ -371,7 +371,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Override hashCode.
* Generates a hash code for the DateFormatSymbols object.
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
int hashcode = 0;
@ -382,7 +382,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Override equals
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj)
{
@ -600,7 +600,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param locale The locale whose symbols are desired.
*
* @see DateFormatSymbols#DateFormatSymbols(java.util.Locale)
* @stable
* @stable ICU 2.0
*/
public DateFormatSymbols(Calendar cal, Locale locale) {
this(cal==null?null:cal.getClass(), locale);
@ -635,7 +635,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* bundle. Symbols that are not overridden are inherited from the
* default DateFormatSymbols for the locale.
* @see DateFormatSymbols#DateFormatSymbols
* @stable
* @stable ICU 2.0
*/
public DateFormatSymbols(ResourceBundle bundle, Locale locale) {
// Get the default symbols for the locale, since most
@ -654,7 +654,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* <code>super.constructCalendarSpecific(bundle)</code> as needed to
* handle the "DayNames", "DayAbbreviations", "MonthNames",
* "MonthAbbreviations", and "Eras" resource data.
* @stable
* @stable ICU 2.0
*/
protected void constructCalendarSpecific(ResourceBundle bundle) {
@ -698,7 +698,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* (just before the class name) and "Symbols" appended to the end.
* For example, the bundle corresponding to "com.ibm.icu.util.HebrewCalendar"
* is "com.ibm.icu.impl.data.HebrewCalendarSymbols".
* @stable
* @stable ICU 2.0
*/
static public ResourceBundle getDateFormatBundle(Class calendarClass, Locale locale)
throws MissingResourceException {

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/DecimalFormat.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.19 $
* $Date: 2002/12/05 01:21:38 $
* $Revision: 1.20 $
*
*****************************************************************************************
*/
@ -371,7 +371,7 @@ import java.io.InvalidObjectException; //Bug 4185761 [Richard/GCL]
* @see NumberFormat
* @author Mark Davis
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class DecimalFormat extends NumberFormat {
@ -388,7 +388,7 @@ public class DecimalFormat extends NumberFormat {
* @see NumberFormat#getNumberInstance
* @see NumberFormat#getCurrencyInstance
* @see NumberFormat#getPercentInstance
* @stable
* @stable ICU 2.0
*/
public DecimalFormat() {
// [NEW]
@ -416,7 +416,7 @@ public class DecimalFormat extends NumberFormat {
* @see NumberFormat#getNumberInstance
* @see NumberFormat#getCurrencyInstance
* @see NumberFormat#getPercentInstance
* @stable
* @stable ICU 2.0
*/
public DecimalFormat(String pattern) {
// Always applyPattern after the symbols are set
@ -445,7 +445,7 @@ public class DecimalFormat extends NumberFormat {
* @see NumberFormat#getCurrencyInstance
* @see NumberFormat#getPercentInstance
* @see DecimalFormatSymbols
* @stable
* @stable ICU 2.0
*/
public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// Always applyPattern after the symbols are set
@ -456,7 +456,7 @@ public class DecimalFormat extends NumberFormat {
/**
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(double number, StringBuffer result,
FieldPosition fieldPosition)
@ -575,7 +575,7 @@ public class DecimalFormat extends NumberFormat {
}
/**
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(long number, StringBuffer result,
FieldPosition fieldPosition)
@ -627,7 +627,7 @@ public class DecimalFormat extends NumberFormat {
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Format a BigInteger number.
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(BigInteger number, StringBuffer result,
FieldPosition fieldPosition) {
@ -654,7 +654,7 @@ public class DecimalFormat extends NumberFormat {
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Format a BigDecimal number.
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(java.math.BigDecimal number, StringBuffer result,
FieldPosition fieldPosition) {
@ -682,7 +682,7 @@ public class DecimalFormat extends NumberFormat {
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Format a BigDecimal number.
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(com.ibm.icu.math.BigDecimal number, StringBuffer result,
FieldPosition fieldPosition) {
@ -1059,7 +1059,7 @@ public class DecimalFormat extends NumberFormat {
* has not changed upon return, then parsing failed.
* @return a <code>Number</code> object with the parsed value or
* <code>null</code> if the parse failed
* @stable
* @stable ICU 2.0
*/
public Number parse(String text, ParsePosition parsePosition)
{
@ -1384,7 +1384,7 @@ public class DecimalFormat extends NumberFormat {
* by the programmer or user.
* @return desired DecimalFormatSymbols
* @see DecimalFormatSymbols
* @stable
* @stable ICU 2.0
*/
public DecimalFormatSymbols getDecimalFormatSymbols() {
try {
@ -1401,7 +1401,7 @@ public class DecimalFormat extends NumberFormat {
* by the programmer or user.
* @param newSymbols desired DecimalFormatSymbols
* @see DecimalFormatSymbols
* @stable
* @stable ICU 2.0
*/
public void setDecimalFormatSymbols(DecimalFormatSymbols newSymbols) {
symbols = (DecimalFormatSymbols) newSymbols.clone();
@ -1443,7 +1443,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Get the positive prefix.
* <P>Examples: +123, $123, sFr123
* @stable
* @stable ICU 2.0
*/
public String getPositivePrefix () {
return positivePrefix;
@ -1452,7 +1452,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the positive prefix.
* <P>Examples: +123, $123, sFr123
* @stable
* @stable ICU 2.0
*/
public void setPositivePrefix (String newValue) {
positivePrefix = newValue;
@ -1461,7 +1461,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Get the negative prefix.
* <P>Examples: -123, ($123) (with negative suffix), sFr-123
* @stable
* @stable ICU 2.0
*/
public String getNegativePrefix () {
return negativePrefix;
@ -1470,7 +1470,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the negative prefix.
* <P>Examples: -123, ($123) (with negative suffix), sFr-123
* @stable
* @stable ICU 2.0
*/
public void setNegativePrefix (String newValue) {
negativePrefix = newValue;
@ -1479,7 +1479,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Get the positive suffix.
* <P>Example: 123%
* @stable
* @stable ICU 2.0
*/
public String getPositiveSuffix () {
return positiveSuffix;
@ -1488,7 +1488,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the positive suffix.
* <P>Example: 123%
* @stable
* @stable ICU 2.0
*/
public void setPositiveSuffix (String newValue) {
positiveSuffix = newValue;
@ -1497,7 +1497,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Get the negative suffix.
* <P>Examples: -123%, ($123) (with positive suffixes)
* @stable
* @stable ICU 2.0
*/
public String getNegativeSuffix () {
return negativeSuffix;
@ -1506,7 +1506,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the positive suffix.
* <P>Examples: 123%
* @stable
* @stable ICU 2.0
*/
public void setNegativeSuffix (String newValue) {
negativeSuffix = newValue;
@ -1518,7 +1518,7 @@ public class DecimalFormat extends NumberFormat {
* (For Arabic, use arabic percent symbol).
* For a permill, set the suffixes to have "\u2031" and the multiplier to be 1000.
* <P>Examples: with 100, 1.23 -> "123", and "123" -> 1.23
* @stable
* @stable ICU 2.0
*/
public int getMultiplier () {
return multiplier;
@ -1530,7 +1530,7 @@ public class DecimalFormat extends NumberFormat {
* (For Arabic, use arabic percent symbol).
* For a permill, set the suffixes to have "\u2031" and the multiplier to be 1000.
* <P>Examples: with 100, 1.23 -> "123", and "123" -> 1.23
* @stable
* @stable ICU 2.0
*/
public void setMultiplier (int newValue) {
if (newValue <= 0) {
@ -1547,7 +1547,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setRoundingIncrement
* @see #getRoundingMode
* @see #setRoundingMode
* @stable
* @stable ICU 2.0
*/
public java.math.BigDecimal getRoundingIncrement() {
return roundingIncrement;
@ -1563,7 +1563,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getRoundingIncrement
* @see #getRoundingMode
* @see #setRoundingMode
* @stable
* @stable ICU 2.0
*/
public void setRoundingIncrement(java.math.BigDecimal newValue) {
int i = newValue == null
@ -1590,7 +1590,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getRoundingIncrement
* @see #getRoundingMode
* @see #setRoundingMode
* @stable
* @stable ICU 2.0
*/
public void setRoundingIncrement(double newValue) {
if (newValue < 0.0) {
@ -1610,7 +1610,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getRoundingIncrement
* @see #setRoundingMode
* @see java.math.BigDecimal
* @stable
* @stable ICU 2.0
*/
public int getRoundingMode() {
return roundingMode;
@ -1629,7 +1629,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getRoundingIncrement
* @see #getRoundingMode
* @see java.math.BigDecimal
* @stable
* @stable ICU 2.0
*/
public void setRoundingMode(int roundingMode) {
if (roundingMode < java.math.BigDecimal.ROUND_UP
@ -1649,7 +1649,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setPadCharacter
* @see #getPadPosition
* @see #setPadPosition
* @stable
* @stable ICU 2.0
*/
public int getFormatWidth() {
return formatWidth;
@ -1667,7 +1667,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setPadCharacter
* @see #getPadPosition
* @see #setPadPosition
* @stable
* @stable ICU 2.0
*/
public void setFormatWidth(int width) {
if (width < 0) {
@ -1685,7 +1685,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setPadCharacter
* @see #getPadPosition
* @see #setPadPosition
* @stable
* @stable ICU 2.0
*/
public char getPadCharacter() {
return pad;
@ -1701,7 +1701,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getPadCharacter
* @see #getPadPosition
* @see #setPadPosition
* @stable
* @stable ICU 2.0
*/
public void setPadCharacter(char padChar) {
pad = padChar;
@ -1724,7 +1724,7 @@ public class DecimalFormat extends NumberFormat {
* @see #PAD_AFTER_PREFIX
* @see #PAD_BEFORE_SUFFIX
* @see #PAD_AFTER_SUFFIX
* @stable
* @stable ICU 2.0
*/
public int getPadPosition() {
return padPosition;
@ -1750,7 +1750,7 @@ public class DecimalFormat extends NumberFormat {
* @see #PAD_AFTER_PREFIX
* @see #PAD_BEFORE_SUFFIX
* @see #PAD_AFTER_SUFFIX
* @stable
* @stable ICU 2.0
*/
public void setPadPosition(int padPos) {
if (padPos < PAD_BEFORE_PREFIX || padPos > PAD_AFTER_SUFFIX) {
@ -1768,7 +1768,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setMinimumExponentDigits
* @see #isExponentSignAlwaysShown
* @see #setExponentSignAlwaysShown
* @stable
* @stable ICU 2.0
*/
public boolean isScientificNotation() {
return useExponentialNotation;
@ -1784,7 +1784,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setMinimumExponentDigits
* @see #isExponentSignAlwaysShown
* @see #setExponentSignAlwaysShown
* @stable
* @stable ICU 2.0
*/
public void setScientificNotation(boolean useScientific) {
useExponentialNotation = useScientific;
@ -1802,7 +1802,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setMinimumExponentDigits
* @see #isExponentSignAlwaysShown
* @see #setExponentSignAlwaysShown
* @stable
* @stable ICU 2.0
*/
public byte getMinimumExponentDigits() {
return minExponentDigits;
@ -1820,7 +1820,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getMinimumExponentDigits
* @see #isExponentSignAlwaysShown
* @see #setExponentSignAlwaysShown
* @stable
* @stable ICU 2.0
*/
public void setMinimumExponentDigits(byte minExpDig) {
if (minExpDig < 1) {
@ -1840,7 +1840,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setMinimumExponentDigits
* @see #getMinimumExponentDigits
* @see #setExponentSignAlwaysShown
* @stable
* @stable ICU 2.0
*/
public boolean isExponentSignAlwaysShown() {
return exponentSignAlwaysShown;
@ -1858,7 +1858,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setMinimumExponentDigits
* @see #getMinimumExponentDigits
* @see #isExponentSignAlwaysShown
* @stable
* @stable ICU 2.0
*/
public void setExponentSignAlwaysShown(boolean expSignAlways) {
exponentSignAlwaysShown = expSignAlways;
@ -1871,7 +1871,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setGroupingSize
* @see NumberFormat#isGroupingUsed
* @see DecimalFormatSymbols#getGroupingSeparator
* @stable
* @stable ICU 2.0
*/
public int getGroupingSize () {
return groupingSize;
@ -1884,7 +1884,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getGroupingSize
* @see NumberFormat#setGroupingUsed
* @see DecimalFormatSymbols#setGroupingSeparator
* @stable
* @stable ICU 2.0
*/
public void setGroupingSize (int newValue) {
groupingSize = (byte)newValue;
@ -1907,7 +1907,7 @@ public class DecimalFormat extends NumberFormat {
* @see #setSecondaryGroupingSize
* @see NumberFormat#isGroupingUsed
* @see DecimalFormatSymbols#getGroupingSeparator
* @stable
* @stable ICU 2.0
*/
public int getSecondaryGroupingSize () {
return groupingSize2;
@ -1921,7 +1921,7 @@ public class DecimalFormat extends NumberFormat {
* @see #getSecondaryGroupingSize
* @see NumberFormat#setGroupingUsed
* @see DecimalFormatSymbols#setGroupingSeparator
* @stable
* @stable ICU 2.0
*/
public void setSecondaryGroupingSize (int newValue) {
groupingSize2 = (byte)newValue;
@ -1931,7 +1931,7 @@ public class DecimalFormat extends NumberFormat {
* Allows you to get the behavior of the decimal separator with integers.
* (The decimal separator will always appear with decimals.)
* <P>Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
* @stable
* @stable ICU 2.0
*/
public boolean isDecimalSeparatorAlwaysShown() {
return decimalSeparatorAlwaysShown;
@ -1941,7 +1941,7 @@ public class DecimalFormat extends NumberFormat {
* Allows you to set the behavior of the decimal separator with integers.
* (The decimal separator will always appear with decimals.)
* <P>Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
* @stable
* @stable ICU 2.0
*/
public void setDecimalSeparatorAlwaysShown(boolean newValue) {
decimalSeparatorAlwaysShown = newValue;
@ -1949,7 +1949,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Standard override; no change in semantics.
* @stable
* @stable ICU 2.0
*/
public Object clone() {
try {
@ -1963,7 +1963,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Overrides equals
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj)
{
@ -2002,7 +2002,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Overrides hashCode
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
return super.hashCode() * 37 + positivePrefix.hashCode();
@ -2013,7 +2013,7 @@ public class DecimalFormat extends NumberFormat {
* Synthesizes a pattern string that represents the current state
* of this Format object.
* @see #applyPattern
* @stable
* @stable ICU 2.0
*/
public String toPattern() {
return toPattern( false );
@ -2023,7 +2023,7 @@ public class DecimalFormat extends NumberFormat {
* Synthesizes a localized pattern string that represents the current
* state of this Format object.
* @see #applyPattern
* @stable
* @stable ICU 2.0
*/
public String toLocalizedPattern() {
return toPattern( true );
@ -2318,7 +2318,7 @@ public class DecimalFormat extends NumberFormat {
* <p>Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
* <p>In negative patterns, the minimum and maximum counts are ignored;
* these are presumed to be set in the positive pattern.
* @stable
* @stable ICU 2.0
*/
public void applyPattern( String pattern ) {
applyPattern( pattern, false );
@ -2341,7 +2341,7 @@ public class DecimalFormat extends NumberFormat {
* <p>Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
* <p>In negative patterns, the minimum and maximum counts are ignored;
* these are presumed to be set in the positive pattern.
* @stable
* @stable ICU 2.0
*/
public void applyLocalizedPattern( String pattern ) {
applyPattern( pattern, true );
@ -2855,7 +2855,7 @@ public class DecimalFormat extends NumberFormat {
* Sets the maximum number of digits allowed in the integer portion of a
* number. This override limits the integer digit count to 309.
* @see NumberFormat#setMaximumIntegerDigits
* @stable
* @stable ICU 2.0
*/
public void setMaximumIntegerDigits(int newValue) {
super.setMaximumIntegerDigits(Math.min(newValue, DOUBLE_INTEGER_DIGITS));
@ -2865,7 +2865,7 @@ public class DecimalFormat extends NumberFormat {
* Sets the minimum number of digits allowed in the integer portion of a
* number. This override limits the integer digit count to 309.
* @see NumberFormat#setMinimumIntegerDigits
* @stable
* @stable ICU 2.0
*/
public void setMinimumIntegerDigits(int newValue) {
super.setMinimumIntegerDigits(Math.min(newValue, DOUBLE_INTEGER_DIGITS));
@ -2917,7 +2917,7 @@ public class DecimalFormat extends NumberFormat {
* Sets the maximum number of digits allowed in the fraction portion of a
* number. This override limits the fraction digit count to 340.
* @see NumberFormat#setMaximumFractionDigits
* @stable
* @stable ICU 2.0
*/
public void setMaximumFractionDigits(int newValue) {
super.setMaximumFractionDigits(Math.min(newValue, DOUBLE_FRACTION_DIGITS));
@ -2927,7 +2927,7 @@ public class DecimalFormat extends NumberFormat {
* Sets the minimum number of digits allowed in the fraction portion of a
* number. This override limits the fraction digit count to 340.
* @see NumberFormat#setMinimumFractionDigits
* @stable
* @stable ICU 2.0
*/
public void setMinimumFractionDigits(int newValue) {
super.setMinimumFractionDigits(Math.min(newValue, DOUBLE_FRACTION_DIGITS));
@ -3271,7 +3271,7 @@ public class DecimalFormat extends NumberFormat {
* @see #PAD_AFTER_PREFIX
* @see #PAD_BEFORE_SUFFIX
* @see #PAD_AFTER_SUFFIX
* @stable
* @stable ICU 2.0
*/
public static final int PAD_BEFORE_PREFIX = 0;
@ -3285,7 +3285,7 @@ public class DecimalFormat extends NumberFormat {
* @see #PAD_BEFORE_PREFIX
* @see #PAD_BEFORE_SUFFIX
* @see #PAD_AFTER_SUFFIX
* @stable
* @stable ICU 2.0
*/
public static final int PAD_AFTER_PREFIX = 1;
@ -3299,7 +3299,7 @@ public class DecimalFormat extends NumberFormat {
* @see #PAD_BEFORE_PREFIX
* @see #PAD_AFTER_PREFIX
* @see #PAD_AFTER_SUFFIX
* @stable
* @stable ICU 2.0
*/
public static final int PAD_BEFORE_SUFFIX = 2;
@ -3313,7 +3313,7 @@ public class DecimalFormat extends NumberFormat {
* @see #PAD_BEFORE_PREFIX
* @see #PAD_AFTER_PREFIX
* @see #PAD_BEFORE_SUFFIX
* @stable
* @stable ICU 2.0
*/
public static final int PAD_AFTER_SUFFIX = 3;

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/DecimalFormatSymbols.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.7 $
* $Date: 2002/12/05 01:21:42 $
* $Revision: 1.8 $
*
*****************************************************************************************
*/
@ -39,14 +39,14 @@ import java.util.ResourceBundle;
* @see DecimalFormat
* @author Mark Davis
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Create a DecimalFormatSymbols object for the default locale.
* @stable
* @stable ICU 2.0
*/
public DecimalFormatSymbols() {
initialize( Locale.getDefault() );
@ -55,7 +55,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Create a DecimalFormatSymbols object for the given locale.
* @param locale the locale
* @stable
* @stable ICU 2.0
*/
public DecimalFormatSymbols( Locale locale ) {
initialize( locale );
@ -64,7 +64,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the character used for zero. Different for Arabic, etc.
* @return the character
* @stable
* @stable ICU 2.0
*/
public char getZeroDigit() {
return zeroDigit;
@ -73,7 +73,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the character used for zero.
* @param zeroDigit the zero character.
* @stable
* @stable ICU 2.0
*/
public void setZeroDigit(char zeroDigit) {
this.zeroDigit = zeroDigit;
@ -82,7 +82,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the character used for thousands separator. Different for French, etc.
* @return the thousands character
* @stable
* @stable ICU 2.0
*/
public char getGroupingSeparator() {
return groupingSeparator;
@ -91,7 +91,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the character used for thousands separator. Different for French, etc.
* @param groupingSeparator the thousands character
* @stable
* @stable ICU 2.0
*/
public void setGroupingSeparator(char groupingSeparator) {
this.groupingSeparator = groupingSeparator;
@ -100,7 +100,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the character used for decimal sign. Different for French, etc.
* @return the decimal character
* @stable
* @stable ICU 2.0
*/
public char getDecimalSeparator() {
return decimalSeparator;
@ -109,7 +109,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the character used for decimal sign. Different for French, etc.
* @param decimalSeparator the decimal character
* @stable
* @stable ICU 2.0
*/
public void setDecimalSeparator(char decimalSeparator) {
this.decimalSeparator = decimalSeparator;
@ -118,7 +118,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the character used for mille percent sign. Different for Arabic, etc.
* @return the mille percent character
* @stable
* @stable ICU 2.0
*/
public char getPerMill() {
return perMill;
@ -127,7 +127,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the character used for mille percent sign. Different for Arabic, etc.
* @param perMill the mille percent character
* @stable
* @stable ICU 2.0
*/
public void setPerMill(char perMill) {
this.perMill = perMill;
@ -136,7 +136,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the character used for percent sign. Different for Arabic, etc.
* @return the percent character
* @stable
* @stable ICU 2.0
*/
public char getPercent() {
return percent;
@ -145,7 +145,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the character used for percent sign. Different for Arabic, etc.
* @param percent the percent character
* @stable
* @stable ICU 2.0
*/
public void setPercent(char percent) {
this.percent = percent;
@ -154,7 +154,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the character used for a digit in a pattern.
* @return the digit pattern character
* @stable
* @stable ICU 2.0
*/
public char getDigit() {
return digit;
@ -163,7 +163,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the character used for a digit in a pattern.
* @param digit the digit pattern character
* @stable
* @stable ICU 2.0
*/
public void setDigit(char digit) {
this.digit = digit;
@ -173,7 +173,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* Return the character used to separate positive and negative subpatterns
* in a pattern.
* @return the pattern separator character
* @stable
* @stable ICU 2.0
*/
public char getPatternSeparator() {
return patternSeparator;
@ -183,7 +183,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* Set the character used to separate positive and negative subpatterns
* in a pattern.
* @param patternSeparator the pattern separator character
* @stable
* @stable ICU 2.0
*/
public void setPatternSeparator(char patternSeparator) {
this.patternSeparator = patternSeparator;
@ -193,7 +193,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* Return the String used to represent infinity. Almost always left
* unchanged.
* @return the Infinity string
* @stable
* @stable ICU 2.0
*/
//Bug 4194173 [Richard/GCL]
@ -205,7 +205,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* Set the String used to represent infinity. Almost always left
* unchanged.
* @param infinity the Infinity String
* @stable
* @stable ICU 2.0
*/
public void setInfinity(String infinity) {
this.infinity = infinity;
@ -215,7 +215,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* Return the String used to represent NaN. Almost always left
* unchanged.
* @return the NaN String
* @stable
* @stable ICU 2.0
*/
//Bug 4194173 [Richard/GCL]
public String getNaN() {
@ -226,7 +226,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* Set the String used to represent NaN. Almost always left
* unchanged.
* @param NaN the NaN String
* @stable
* @stable ICU 2.0
*/
public void setNaN(String NaN) {
this.NaN = NaN;
@ -237,7 +237,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* negative format is specified, one is formed by prefixing
* minusSign to the positive format.
* @return the minus sign character
* @stable
* @stable ICU 2.0
*/
public char getMinusSign() {
return minusSign;
@ -248,7 +248,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* negative format is specified, one is formed by prefixing
* minusSign to the positive format.
* @param minusSign the minus sign character
* @stable
* @stable ICU 2.0
*/
public void setMinusSign(char minusSign) {
this.minusSign = minusSign;
@ -257,7 +257,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the string denoting the local currency.
* @return the local currency String.
* @stable
* @stable ICU 2.0
*/
public String getCurrencySymbol()
{
@ -267,7 +267,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the string denoting the local currency.
* @param currency the local currency String.
* @stable
* @stable ICU 2.0
*/
public void setCurrencySymbol(String currency)
{
@ -277,7 +277,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the international string denoting the local currency.
* @return the international string denoting the local currency
* @stable
* @stable ICU 2.0
*/
public String getInternationalCurrencySymbol()
{
@ -287,7 +287,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the international string denoting the local currency.
* @param currency the international string denoting the local currency.
* @stable
* @stable ICU 2.0
*/
public void setInternationalCurrencySymbol(String currency)
{
@ -297,7 +297,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Return the monetary decimal separator.
* @return the monetary decimal separator character
* @stable
* @stable ICU 2.0
*/
public char getMonetaryDecimalSeparator()
{
@ -307,7 +307,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Set the monetary decimal separator.
* @param sep the monetary decimal separator character
* @stable
* @stable ICU 2.0
*/
public void setMonetaryDecimalSeparator(char sep)
{
@ -321,7 +321,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* @return the localized exponent symbol, used in localized patterns
* and formatted strings
* @see #setExponentSeparator
* @stable
* @stable ICU 2.0
*/
public String getExponentSeparator()
{
@ -335,7 +335,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* @param exp the localized exponent symbol, used in localized patterns
* and formatted strings
* @see #getExponentSeparator
* @stable
* @stable ICU 2.0
*/
public void setExponentSeparator(String exp)
{
@ -350,7 +350,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* @see #setPlusSign
* @see #setMinusSign
* @see #getMinusSign
* @stable
* @stable ICU 2.0
*/
public char getPlusSign() {
return plusSign;
@ -364,7 +364,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* @see #getPlusSign
* @see #setMinusSign
* @see #getMinusSign
* @stable
* @stable ICU 2.0
*/
public void setPlusSign(char plus) {
plusSign = plus;
@ -381,7 +381,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* @see DecimalFormat#getFormatWidth
* @see DecimalFormat#getPadPosition
* @see DecimalFormat#getPadCharacter
* @stable
* @stable ICU 2.0
*/
public char getPadEscape() {
return padEscape;
@ -397,7 +397,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
* @see DecimalFormat#setFormatWidth
* @see DecimalFormat#setPadPosition
* @see DecimalFormat#setPadCharacter
* @stable
* @stable ICU 2.0
*/
public void setPadEscape(char c) {
padEscape = c;
@ -406,7 +406,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Returns the locale for which this object was constructed.
* @return the locale for which this object was constructed
* @stable
* @stable ICU 2.0
*/
public Locale getLocale() {
return locale;
@ -414,7 +414,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Standard override.
* @stable
* @stable ICU 2.0
*/
public Object clone() {
try {
@ -427,7 +427,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Override equals.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj) {
if (obj == null) return false;
@ -454,7 +454,7 @@ final public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Override hashCode
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
int result = zeroDigit;

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/DictionaryBasedBreakIterator.java,v $
* $Date: 2002/12/04 01:45:51 $
* $Revision: 1.10 $
* $Date: 2002/12/05 01:21:42 $
* $Revision: 1.11 $
*
*****************************************************************************************
*/
@ -45,7 +45,7 @@ import java.io.*;
* slow) BuildDictionaryFile utility for creating dictionary files, but aren't
* currently making it public. Contact us for help.
*
* @stable
* @stable ICU 2.0
*/
public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
@ -93,7 +93,7 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
* except for the special meaning of DICTIONARY_VAR. This parameter is just
* passed through to RuleBasedBreakIterator's constructor.
* @param dictionaryFilename The filename of the dictionary file to use
* @stable
* @stable ICU 2.0
*/
public DictionaryBasedBreakIterator(String description,
InputStream dictionaryStream) throws IOException {
@ -131,7 +131,7 @@ switch (categoryFlags.length % 4) {
}
}
/** @stable */
/** @stable ICU 2.0 */
public void setText(CharacterIterator newText) {
super.setText(newText);
cachedBreakPositions = null;
@ -143,7 +143,7 @@ switch (categoryFlags.length % 4) {
* Sets the current iteration position to the beginning of the text.
* (i.e., the CharacterIterator's starting offset).
* @return The offset of the beginning of the text.
* @stable
* @stable ICU 2.0
*/
public int first() {
cachedBreakPositions = null;
@ -156,7 +156,7 @@ switch (categoryFlags.length % 4) {
* 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
* @stable ICU 2.0
*/
public int last() {
cachedBreakPositions = null;
@ -169,7 +169,7 @@ switch (categoryFlags.length % 4) {
* Advances the iterator one step backwards.
* @return The position of the last boundary position before the
* current iteration position
* @stable
* @stable ICU 2.0
*/
public int previous() {
CharacterIterator text = getText();
@ -199,7 +199,7 @@ switch (categoryFlags.length % 4) {
* before the specified position.
* @param offset The position to begin searching from
* @return The position of the last boundary before "offset"
* @stable
* @stable ICU 2.0
*/
public int preceding(int offset) {
CharacterIterator text = getText();
@ -234,7 +234,7 @@ switch (categoryFlags.length % 4) {
* the specified position.
* @param offset The position to begin searching forward from
* @return The position of the first boundary after "offset"
* @stable
* @stable ICU 2.0
*/
public int following(int offset) {
CharacterIterator text = getText();

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/NumberFormat.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.20 $
* $Date: 2002/12/05 01:21:42 $
* $Revision: 1.21 $
*
*****************************************************************************************
*/
@ -162,7 +162,7 @@ import com.ibm.icu.impl.LocaleUtility;
* @author Mark Davis
* @author Helena Shih
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public abstract class NumberFormat extends Format{
@ -177,7 +177,7 @@ public abstract class NumberFormat extends Format{
* Field constant used to construct a FieldPosition object. Signifies that
* the position of the integer part of a formatted number should be returned.
* @see java.text.FieldPosition
* @stable
* @stable ICU 2.0
*/
public static final int INTEGER_FIELD = 0;
@ -185,7 +185,7 @@ public abstract class NumberFormat extends Format{
* Field constant used to construct a FieldPosition object. Signifies that
* the position of the fraction part of a formatted number should be returned.
* @see java.text.FieldPosition
* @stable
* @stable ICU 2.0
*/
public static final int FRACTION_FIELD = 1;
@ -193,7 +193,7 @@ public abstract class NumberFormat extends Format{
* <strong><font face=helvetica color=red>CHANGED</font></strong>
* Format an object. Change: recognizes <code>BigInteger</code>
* and <code>BigDecimal</code> objects now.
* @stable
* @stable ICU 2.0
*/
public final StringBuffer format(Object number,
StringBuffer toAppendTo,
@ -215,7 +215,7 @@ public abstract class NumberFormat extends Format{
}
/**
* @stable
* @stable ICU 2.0
*/
public final Object parseObject(String source,
ParsePosition parsePosition)
@ -226,7 +226,7 @@ public abstract class NumberFormat extends Format{
/**
* Specialization of format.
* @see java.text.Format#format(Object)
* @stable
* @stable ICU 2.0
*/
public final String format (double number) {
return format(number,new StringBuffer(),
@ -236,7 +236,7 @@ public abstract class NumberFormat extends Format{
/**
* Specialization of format.
* @see java.text.Format#format(Object)
* @stable
* @stable ICU 2.0
*/
public final String format (long number) {
return format(number,new StringBuffer(),
@ -246,7 +246,7 @@ public abstract class NumberFormat extends Format{
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Convenience method to format a BigInteger.
* @stable
* @stable ICU 2.0
*/
public final String format(BigInteger number) {
return format(number, new StringBuffer(),
@ -256,7 +256,7 @@ public abstract class NumberFormat extends Format{
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Convenience method to format a BigDecimal.
* @stable
* @stable ICU 2.0
*/
public final String format(java.math.BigDecimal number) {
return format(number, new StringBuffer(),
@ -266,7 +266,7 @@ public abstract class NumberFormat extends Format{
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Convenience method to format a BigDecimal.
* @stable
* @stable ICU 2.0
*/
public final String format(com.ibm.icu.math.BigDecimal number) {
return format(number, new StringBuffer(),
@ -276,7 +276,7 @@ public abstract class NumberFormat extends Format{
/**
* Specialization of format.
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
* @stable
* @stable ICU 2.0
*/
public abstract StringBuffer format(double number,
StringBuffer toAppendTo,
@ -285,7 +285,7 @@ public abstract class NumberFormat extends Format{
/**
* Specialization of format.
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
* @stable
* @stable ICU 2.0
*/
public abstract StringBuffer format(long number,
StringBuffer toAppendTo,
@ -295,7 +295,7 @@ public abstract class NumberFormat extends Format{
* <strong><font face=helvetica color=red>NEW</font></strong>
* Format a BigInteger.
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
* @stable
* @stable ICU 2.0
*/
public abstract StringBuffer format(BigInteger number,
StringBuffer toAppendTo,
@ -305,7 +305,7 @@ public abstract class NumberFormat extends Format{
* <strong><font face=helvetica color=red>NEW</font></strong>
* Format a BigDecimal.
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
* @stable
* @stable ICU 2.0
*/
public abstract StringBuffer format(java.math.BigDecimal number,
StringBuffer toAppendTo,
@ -315,7 +315,7 @@ public abstract class NumberFormat extends Format{
* <strong><font face=helvetica color=red>NEW</font></strong>
* Format a BigDecimal.
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
* @stable
* @stable ICU 2.0
*/
public abstract StringBuffer format(com.ibm.icu.math.BigDecimal number,
StringBuffer toAppendTo,
@ -331,7 +331,7 @@ public abstract class NumberFormat extends Format{
* unchanged!
* @see #isParseIntegerOnly
* @see java.text.Format#parseObject(String, ParsePosition)
* @stable
* @stable ICU 2.0
*/
public abstract Number parse(String text, ParsePosition parsePosition);
@ -344,7 +344,7 @@ public abstract class NumberFormat extends Format{
* @exception ParseException if the beginning of the specified string
* cannot be parsed.
* @see #format
* @stable
* @stable ICU 2.0
*/
//Bug 4375399 [Richard/GCL]
public Number parse(String text) throws ParseException {
@ -365,7 +365,7 @@ public abstract class NumberFormat extends Format{
* would stop at the "." character. Of course, the exact format accepted
* by the parse operation is locale dependant and determined by sub-classes
* of NumberFormat.
* @stable
* @stable ICU 2.0
*/
public boolean isParseIntegerOnly() {
return parseIntegerOnly;
@ -374,7 +374,7 @@ public abstract class NumberFormat extends Format{
/**
* Sets whether or not numbers should be parsed as integers only.
* @see #isParseIntegerOnly
* @stable
* @stable ICU 2.0
*/
public void setParseIntegerOnly(boolean value) {
parseIntegerOnly = value;
@ -388,7 +388,7 @@ public abstract class NumberFormat extends Format{
* factory methods: getNumberInstance, getIntegerInstance,
* getCurrencyInstance or getPercentInstance.
* Exactly which one is locale dependant.
* @stable
* @stable ICU 2.0
*/
//Bug 4408066 [Richard/GCL]
public final static NumberFormat getInstance() {
@ -400,7 +400,7 @@ public abstract class NumberFormat extends Format{
* The default format is one of the styles provided by the other
* factory methods: getNumberInstance, getCurrencyInstance or getPercentInstance.
* Exactly which one is locale dependant.
* @stable
* @stable ICU 2.0
*/
public static NumberFormat getInstance(Locale inLocale) {
return getInstance(inLocale, NUMBERSTYLE);
@ -408,7 +408,7 @@ public abstract class NumberFormat extends Format{
/**
* Returns a general-purpose number format for the current default locale.
* @stable
* @stable ICU 2.0
*/
public final static NumberFormat getNumberInstance() {
return getInstance(Locale.getDefault(), NUMBERSTYLE);
@ -416,7 +416,7 @@ public abstract class NumberFormat extends Format{
/**
* Returns a general-purpose number format for the specified locale.
* @stable
* @stable ICU 2.0
*/
public static NumberFormat getNumberInstance(Locale inLocale) {
return getInstance(inLocale, NUMBERSTYLE);
@ -431,7 +431,7 @@ public abstract class NumberFormat extends Format{
* #isParseIntegerOnly isParseIntegerOnly}).
*
* @return a number format for integer values
* @stable
* @stable ICU 2.0
*/
//Bug 4408066 [Richard/GCL]
public final static NumberFormat getIntegerInstance() {
@ -448,7 +448,7 @@ public abstract class NumberFormat extends Format{
*
* @param inLocale the locale for which a number format is needed
* @return a number format for integer values
* @stable
* @stable ICU 2.0
*/
//Bug 4408066 [Richard/GCL]
public static NumberFormat getIntegerInstance(Locale inLocale) {
@ -457,7 +457,7 @@ public abstract class NumberFormat extends Format{
/**
* Returns a currency format for the current default locale.
* @stable
* @stable ICU 2.0
*/
public final static NumberFormat getCurrencyInstance() {
return getInstance(Locale.getDefault(), CURRENCYSTYLE);
@ -465,7 +465,7 @@ public abstract class NumberFormat extends Format{
/**
* Returns a currency format for the specified locale.
* @stable
* @stable ICU 2.0
*/
public static NumberFormat getCurrencyInstance(Locale inLocale) {
return getInstance(inLocale, CURRENCYSTYLE);
@ -473,7 +473,7 @@ public abstract class NumberFormat extends Format{
/**
* Returns a percentage format for the current default locale.
* @stable
* @stable ICU 2.0
*/
public final static NumberFormat getPercentInstance() {
return getInstance(Locale.getDefault(), PERCENTSTYLE);
@ -481,7 +481,7 @@ public abstract class NumberFormat extends Format{
/**
* Returns a percentage format for the specified locale.
* @stable
* @stable ICU 2.0
*/
public static NumberFormat getPercentInstance(Locale inLocale) {
return getInstance(inLocale, PERCENTSTYLE);
@ -490,7 +490,7 @@ public abstract class NumberFormat extends Format{
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Returns a scientific format for the current default locale.
* @stable
* @stable ICU 2.0
*/
public final static NumberFormat getScientificInstance() {
return getInstance(Locale.getDefault(), SCIENTIFICSTYLE);
@ -499,7 +499,7 @@ public abstract class NumberFormat extends Format{
/**
* <strong><font face=helvetica color=red>NEW</font></strong>
* Returns a scientific format for the specified locale.
* @stable
* @stable ICU 2.0
*/
public static NumberFormat getScientificInstance(Locale inLocale) {
return getInstance(inLocale, SCIENTIFICSTYLE);
@ -579,7 +579,7 @@ public abstract class NumberFormat extends Format{
/**
* Get the set of Locales for which NumberFormats are installed
* @return available locales
* @stable
* @stable ICU 2.0
*/
public static Locale[] getAvailableLocales() {
if (service == null) {
@ -640,7 +640,7 @@ public abstract class NumberFormat extends Format{
/**
* Overrides hashCode
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
return maximumIntegerDigits * 37 + maxFractionDigits;
@ -649,7 +649,7 @@ public abstract class NumberFormat extends Format{
/**
* Overrides equals
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj) {
if (obj == null) return false;
@ -668,7 +668,7 @@ public abstract class NumberFormat extends Format{
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone()
{
@ -682,7 +682,7 @@ public abstract class NumberFormat extends Format{
* as "1,234,567". The grouping separator as well as the size of each group
* is locale dependant and is determined by sub-classes of NumberFormat.
* @see #setGroupingUsed
* @stable
* @stable ICU 2.0
*/
public boolean isGroupingUsed() {
return groupingUsed;
@ -691,7 +691,7 @@ public abstract class NumberFormat extends Format{
/**
* Set whether or not grouping will be used in this format.
* @see #isGroupingUsed
* @stable
* @stable ICU 2.0
*/
public void setGroupingUsed(boolean newValue) {
groupingUsed = newValue;
@ -701,7 +701,7 @@ public abstract class NumberFormat extends Format{
* Returns the maximum number of digits allowed in the integer portion of a
* number.
* @see #setMaximumIntegerDigits
* @stable
* @stable ICU 2.0
*/
public int getMaximumIntegerDigits() {
return maximumIntegerDigits;
@ -717,7 +717,7 @@ public abstract class NumberFormat extends Format{
* less than zero, then zero is used. The concrete subclass may enforce an
* upper limit to this value appropriate to the numeric type being formatted.
* @see #getMaximumIntegerDigits
* @stable
* @stable ICU 2.0
*/
public void setMaximumIntegerDigits(int newValue) {
maximumIntegerDigits = Math.max(0,newValue);
@ -729,7 +729,7 @@ public abstract class NumberFormat extends Format{
* Returns the minimum number of digits allowed in the integer portion of a
* number.
* @see #setMinimumIntegerDigits
* @stable
* @stable ICU 2.0
*/
public int getMinimumIntegerDigits() {
return minimumIntegerDigits;
@ -745,7 +745,7 @@ public abstract class NumberFormat extends Format{
* less than zero, then zero is used. The concrete subclass may enforce an
* upper limit to this value appropriate to the numeric type being formatted.
* @see #getMinimumIntegerDigits
* @stable
* @stable ICU 2.0
*/
public void setMinimumIntegerDigits(int newValue) {
minimumIntegerDigits = Math.max(0,newValue);
@ -757,7 +757,7 @@ public abstract class NumberFormat extends Format{
* Returns the maximum number of digits allowed in the fraction portion of a
* number.
* @see #setMaximumFractionDigits
* @stable
* @stable ICU 2.0
*/
public int getMaximumFractionDigits() {
return maximumFractionDigits;
@ -773,7 +773,7 @@ public abstract class NumberFormat extends Format{
* less than zero, then zero is used. The concrete subclass may enforce an
* upper limit to this value appropriate to the numeric type being formatted.
* @see #getMaximumFractionDigits
* @stable
* @stable ICU 2.0
*/
public void setMaximumFractionDigits(int newValue) {
maximumFractionDigits = Math.max(0,newValue);
@ -785,7 +785,7 @@ public abstract class NumberFormat extends Format{
* Returns the minimum number of digits allowed in the fraction portion of a
* number.
* @see #setMinimumFractionDigits
* @stable
* @stable ICU 2.0
*/
public int getMinimumFractionDigits() {
return minimumFractionDigits;
@ -801,7 +801,7 @@ public abstract class NumberFormat extends Format{
* less than zero, then zero is used. The concrete subclass may enforce an
* upper limit to this value appropriate to the numeric type being formatted.
* @see #getMinimumFractionDigits
* @stable
* @stable ICU 2.0
*/
public void setMinimumFractionDigits(int newValue) {
minimumFractionDigits = Math.max(0,newValue);

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Replaceable.java,v $
* $Date: 2002/12/04 00:04:15 $
* $Revision: 1.10 $
* $Date: 2002/12/05 01:22:00 $
* $Revision: 1.11 $
*
*****************************************************************************************
*/
@ -56,13 +56,13 @@ package com.ibm.icu.text;
* <p>Copyright &copy; IBM Corporation 1999. All rights reserved.
*
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public interface Replaceable {
/**
* Returns the number of 16-bit code units in the text.
* @return number of 16-bit code units in text
* @stable
* @stable ICU 2.0
*/
int length();
@ -71,7 +71,7 @@ public interface Replaceable {
* @param offset an integer between 0 and <code>length()</code>-1
* inclusive
* @return 16-bit code unit of text at given offset
* @stable
* @stable ICU 2.0
*/
char charAt(int offset);
@ -87,7 +87,7 @@ public interface Replaceable {
* @param offset an integer between 0 and <code>length()</code>-1
* inclusive
* @return 32-bit code point of text at given offset
* @stable
* @stable ICU 2.0
*/
int char32At(int offset);
@ -107,7 +107,7 @@ public interface Replaceable {
* <code>start <= limit <= length()</code>.
* @param dst the destination array.
* @param dstStart the start offset in the destination array.
* @stable
* @stable ICU 2.0
*/
void getChars(int srcStart, int srcLimit, char dst[], int dstStart);
@ -127,7 +127,7 @@ public interface Replaceable {
* <= length()</code>.
* @param text the text to replace characters <code>start</code>
* to <code>limit - 1</code>
* @stable
* @stable ICU 2.0
*/
void replace(int start, int limit, String text);
@ -150,7 +150,7 @@ public interface Replaceable {
* @param charsStart the beginning index into <code>chars</code>,
* inclusive; <code>0 <= start <= limit</code>.
* @param charsLen the number of characters of <code>chars</code>.
* @stable
* @stable ICU 2.0
*/
void replace(int start, int limit, char[] chars,
int charsStart, int charsLen);
@ -176,7 +176,7 @@ public interface Replaceable {
* <code>start..limit-1</code> will be copied to <code>dest</code>.
* Implementations of this method may assume that <code>dest <= start ||
* dest >= limit</code>.
* @stable
* @stable ICU 2.0
*/
void copy(int start, int limit, int dest);

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/ReplaceableString.java,v $
* $Date: 2002/12/03 18:56:30 $
* $Revision: 1.12 $
* $Date: 2002/12/05 01:22:04 $
* $Revision: 1.13 $
*
*****************************************************************************************
*/
@ -26,7 +26,7 @@ import com.ibm.icu.impl.Utility;
*
* @see Replaceable
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class ReplaceableString implements Replaceable {
private StringBuffer buf;
@ -37,7 +37,7 @@ public class ReplaceableString implements Replaceable {
/**
* Construct a new object with the given initial contents.
* @param str initial contents
* @stable
* @stable ICU 2.0
*/
public ReplaceableString(String str) {
buf = new StringBuffer(str);
@ -50,7 +50,7 @@ public class ReplaceableString implements Replaceable {
* Modifications to <code>buf</code> will modify this object, and
* vice versa.</em>
* @param buf object to be used as internal storage
* @stable
* @stable ICU 2.0
*/
public ReplaceableString(StringBuffer buf) {
this.buf = buf;
@ -58,7 +58,7 @@ public class ReplaceableString implements Replaceable {
/**
* Construct a new empty object.
* @stable
* @stable ICU 2.0
*/
public ReplaceableString() {
buf = new StringBuffer();
@ -67,7 +67,7 @@ public class ReplaceableString implements Replaceable {
/**
* Return the contents of this object as a <code>String</code>.
* @return string contents of this object
* @stable
* @stable ICU 2.0
*/
public String toString() {
return buf.toString();
@ -75,7 +75,7 @@ public class ReplaceableString implements Replaceable {
/**
* Return a substring of the given string.
* @stable
* @stable ICU 2.0
*/
public String substring(int start, int limit) {
return buf.substring(start, limit);
@ -84,7 +84,7 @@ public class ReplaceableString implements Replaceable {
/**
* Return the number of characters contained in this object.
* <code>Replaceable</code> API.
* @stable
* @stable ICU 2.0
*/
public int length() {
return buf.length();
@ -95,7 +95,7 @@ public class ReplaceableString implements Replaceable {
* <code>Replaceable</code> API.
* @param offset offset into the contents, from 0 to
* <code>length()</code> - 1
* @stable
* @stable ICU 2.0
*/
public char charAt(int offset) {
return buf.charAt(offset);
@ -110,7 +110,7 @@ public class ReplaceableString implements Replaceable {
* @param offset an integer between 0 and <code>length()</code>-1
* inclusive
* @return 32-bit code point of text at given offset
* @stable
* @stable ICU 2.0
*/
public int char32At(int offset) {
return UTF16.charAt(buf, offset);
@ -132,7 +132,7 @@ public class ReplaceableString implements Replaceable {
* <code>start <= limit <= length()</code>.
* @param dst the destination array.
* @param dstStart the start offset in the destination array.
* @stable
* @stable ICU 2.0
*/
public void getChars(int srcStart, int srcLimit, char dst[], int dstStart) {
Utility.getChars(buf, srcStart, srcLimit, dst, dstStart);
@ -147,7 +147,7 @@ public class ReplaceableString implements Replaceable {
* <= length()</code>.
* @param text new text to replace characters <code>start</code> to
* <code>limit - 1</code>
* @stable
* @stable ICU 2.0
*/
public void replace(int start, int limit, String text) {
buf.replace(start, limit, text);
@ -164,7 +164,7 @@ public class ReplaceableString implements Replaceable {
* @param charsStart the beginning index into <code>chars</code>,
* inclusive; <code>0 <= start <= limit</code>.
* @param charsLen the number of characters of <code>chars</code>.
* @stable
* @stable ICU 2.0
*/
public void replace(int start, int limit, char[] chars,
int charsStart, int charsLen) {
@ -185,7 +185,7 @@ public class ReplaceableString implements Replaceable {
* <code>start..limit-1</code> will be copied to <code>dest</code>.
* Implementations of this method may assume that <code>dest <= start ||
* dest >= limit</code>.
* @stable
* @stable ICU 2.0
*/
public void copy(int start, int limit, int dest) {
if (start == limit && start >= 0 && start <= buf.length()) {
@ -198,7 +198,7 @@ public class ReplaceableString implements Replaceable {
/**
* Implements Replaceable
* @stable
* @stable ICU 2.0
*/
public boolean hasMetaData() {
return false;

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/RuleBasedBreakIterator.java,v $
* $Date: 2002/12/04 01:45:51 $
* $Revision: 1.22 $
* $Date: 2002/12/05 01:22:11 $
* $Revision: 1.23 $
*
*****************************************************************************************
*/
@ -229,20 +229,20 @@ import java.io.*;
* &nbsp; For examples, see the resource data (which is annotated).</p>
*
* @author Richard Gillam
* @stable
* $RCSfile: RuleBasedBreakIterator.java,v $ $Revision: 1.22 $ $Date: 2002/12/04 01:45:51 $
* @stable ICU 2.0
* $RCSfile: RuleBasedBreakIterator.java,v $ $Revision: 1.23 $ $Date: 2002/12/05 01:22:11 $
*/
public class RuleBasedBreakIterator extends BreakIterator {
/**
* A token used as a character-category value to identify ignore characters
* @stable
* @stable ICU 2.0
*/
protected static final byte IGNORE = -1;
/**
* Special variable used to define ignore characters
* @stable
* @stable ICU 2.0
*/
private static final String IGNORE_VAR = "_ignore_";
@ -312,7 +312,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
* on BreakIterator to create one indirectly from a description
* in the framework's resource files. You'd use this when you want
* special behavior not provided by the built-in iterators.
* @stable
* @stable ICU 2.0
*/
public RuleBasedBreakIterator(String description) {
//System.out.println(">>>RBBI constructor");
@ -326,7 +326,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
/**
* Creates a Builder.
* @stable
* @stable ICU 2.0
*/
protected Builder makeBuilder() {
return new Builder();
@ -339,7 +339,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
* Clones this iterator.
* @return A newly-constructed RuleBasedBreakIterator with the same
* behavior as this one.
* @stable
* @stable ICU 2.0
*/
public Object clone()
{
@ -353,7 +353,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
/**
* Returns true if both BreakIterators are of the same class, have the same
* rules, and iterate over the same text.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object that) {
try {
@ -375,7 +375,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
/**
* Returns the description used to create this iterator
* @stable
* @stable ICU 2.0
*/
public String toString() {
return description;
@ -384,7 +384,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
/**
* Compute a hashcode for this BreakIterator
* @return A hash code
* @stable
* @stable ICU 2.0
*/
public int hashCode()
{
@ -634,7 +634,7 @@ throws IOException {
* Sets the current iteration position to the beginning of the text.
* (i.e., the CharacterIterator's starting offset).
* @return The offset of the beginning of the text.
* @stable
* @stable ICU 2.0
*/
public int first() {
CharacterIterator t = getText();
@ -647,7 +647,7 @@ throws IOException {
* 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
* @stable ICU 2.0
*/
public int last() {
CharacterIterator t = getText();
@ -666,7 +666,7 @@ throws IOException {
* (negative is backwards, and positive is forwards).
* @return The character offset of the boundary position n boundaries away from
* the current one.
* @stable
* @stable ICU 2.0
*/
public int next(int n) {
int result = current();
@ -684,7 +684,7 @@ throws IOException {
/**
* Advances the iterator to the next boundary position.
* @return The position of the first boundary after this one.
* @stable
* @stable ICU 2.0
*/
public int next() {
return handleNext();
@ -693,7 +693,7 @@ throws IOException {
/**
* Advances the iterator backwards, to the last boundary preceding this one.
* @return The position of the last boundary position preceding this one.
* @stable
* @stable ICU 2.0
*/
public int previous() {
// if we're already sitting at the beginning of the text, return DONE
@ -728,7 +728,7 @@ throws IOException {
/**
* Throw IllegalArgumentException unless begin <= offset < end.
* @stable
* @stable ICU 2.0
*/
protected static final void checkOffset(int offset, CharacterIterator text) {
if (offset < text.getBeginIndex() || offset > text.getEndIndex()) {
@ -741,7 +741,7 @@ throws IOException {
* the specified position.
* @param offset The position from which to begin searching for a break position.
* @return The position of the first break after the current position.
* @stable
* @stable ICU 2.0
*/
public int following(int offset) {
// if the offset passed in is already past the end of the text,
@ -779,7 +779,7 @@ throws IOException {
* specified position.
* @param offset The position to begin searching for a break from.
* @return The position of the last boundary before the starting position.
* @stable
* @stable ICU 2.0
*/
public int preceding(int offset) {
// if we start by updating the current iteration position to the
@ -797,7 +797,7 @@ throws IOException {
* or after "offset".
* @param offset the offset to check.
* @return True if "offset" is a boundary position.
* @stable
* @stable ICU 2.0
*/
public boolean isBoundary(int offset) {
CharacterIterator text = getText();
@ -817,7 +817,7 @@ throws IOException {
/**
* Returns the current iteration position.
* @return The current iteration position.
* @stable
* @stable ICU 2.0
*/
public int current() {
return getText().getIndex();
@ -829,7 +829,7 @@ throws IOException {
* 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
* @stable ICU 2.0
*/
public CharacterIterator getText() {
// The iterator is initialized pointing to no text at all, so if this
@ -845,7 +845,7 @@ throws IOException {
* Set the iterator to analyze a new piece of text. This function resets
* the current iteration position to the beginning of the text.
* @param newText An iterator over the text to analyze.
* @stable
* @stable ICU 2.0
*/
public void setText(CharacterIterator newText) {
// Test text to see if we need to wrap it in a SafeCharIterator:
@ -872,7 +872,7 @@ throws IOException {
* and advances through the text character by character until we reach the end
* of the text or the state machine transitions to state 0. We update our return
* value every time the state machine passes through a possible end state.
* @stable
* @stable ICU 2.0
*/
protected int handleNext() {
// if we're already at the end of the text, return DONE.
@ -980,7 +980,7 @@ throws IOException {
* The various calling methods then iterate forward from this safe position to
* the appropriate position to return. (For more information, see the description
* of buildBackwardsStateTable() in RuleBasedBreakIterator.Builder.)
* @stable
* @stable ICU 2.0
*/
protected int handlePrevious() {
CharacterIterator text = getText();

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/RuleBasedNumberFormat.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.10 $
* $Date: 2002/12/05 01:22:20 $
* $Revision: 1.11 $
*
*****************************************************************************************
*/
@ -472,10 +472,10 @@ import java.util.Vector;
* using these features.</p>
*
* @author Richard Gillam
* $RCSfile: RuleBasedNumberFormat.java,v $ $Revision: 1.10 $ $Date: 2002/12/03 19:45:38 $
* $RCSfile: RuleBasedNumberFormat.java,v $ $Revision: 1.11 $ $Date: 2002/12/05 01:22:20 $
* @see NumberFormat
* @see DecimalFormat
* @stable
* @stable ICU 2.0
*/
public final class RuleBasedNumberFormat extends NumberFormat {
@ -491,19 +491,19 @@ public final class RuleBasedNumberFormat extends NumberFormat {
/**
* Selector code that tells the constructor to create a spellout formatter
* @stable
* @stable ICU 2.0
*/
public static final int SPELLOUT = 1;
/**
* Selector code that tells the constructor to create an ordinal formatter
* @stable
* @stable ICU 2.0
*/
public static final int ORDINAL = 2;
/**
* Selector code that tells the constructor to create a duration formatter
* @stable
* @stable ICU 2.0
*/
public static final int DURATION = 3;
@ -563,7 +563,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* @param description A description of the formatter's desired behavior.
* See the class documentation for a complete explanation of the description
* syntax.
* @stable
* @stable ICU 2.0
*/
public RuleBasedNumberFormat(String description) {
locale = Locale.getDefault();
@ -581,7 +581,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* @param locale A locale, which governs which characters are used for
* formatting values in numerals, and which characters are equivalent in
* lenient parsing.
* @stable
* @stable ICU 2.0
*/
public RuleBasedNumberFormat(String description, Locale locale) {
this.locale = locale;
@ -598,7 +598,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* spells out a value in words in the desired language, ORDINAL, which attaches
* an ordinal suffix from the desired language to the end of a number (e.g. "123rd"),
* and DURATION, which formats a duration in seconds as hours, minutes, and seconds.
* @stable
* @stable ICU 2.0
*/
public RuleBasedNumberFormat(Locale locale, int format) {
this.locale = locale;
@ -637,7 +637,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* out a value in words in the default locale's langyage, ORDINAL, which attaches
* an ordinal suffix from the default locale's language to a numeral, and
* DURATION, which formats a duration in seconds as hours, minutes, and seconds.
* @stable
* @stable ICU 2.0
*/
public RuleBasedNumberFormat(int format) {
this(Locale.getDefault(), format);
@ -650,7 +650,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
/**
* Duplicates this formatter.
* @return A RuleBasedNumberFormat that is equal to this one.
* @stable
* @stable ICU 2.0
*/
public Object clone() {
return super.clone();
@ -660,7 +660,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* Tests two RuleBasedNumberFormats for equality.
* @param that The formatter to compare against this one.
* @return true if the two formatters have identical behavior.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object that) {
// if the other object isn't a RuleBasedNumberFormat, that's
@ -697,7 +697,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* with identical behavior to this one. This won't necessarily be identical
* to the rule set description that was originally passed in, but will produce
* the same result.
* @stable
* @stable ICU 2.0
*/
public String toString() {
@ -748,7 +748,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
/**
* Returns a list of the names of all of this formatter's public rule sets.
* @return A list of the names of all of this formatter's public rule sets.
* @stable
* @stable ICU 2.0
*/
public String[] getRuleSetNames() {
// preflight the iteration, counting the number of public rule sets
@ -778,7 +778,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* @param ruleSet The name of the rule set to format the number with.
* This must be the name of a valid public rule set for this formatter.
* @return A textual representation of the number.
* @stable
* @stable ICU 2.0
*/
public String format(double number, String ruleSet) throws IllegalArgumentException {
if (ruleSet.startsWith("%%")) {
@ -797,7 +797,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* @param ruleSet The name of the rule set to format the number with.
* This must be the name of a valid public rule set for this formatter.
* @return A textual representation of the number.
* @stable
* @stable ICU 2.0
*/
public String format(long number, String ruleSet) throws IllegalArgumentException {
if (ruleSet.startsWith("%%")) {
@ -813,7 +813,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* @param toAppendTo A StringBuffer that the result should be appended to.
* @param ignore This function doesn't examine or update the field position.
* @return toAppendTo
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(double number,
StringBuffer toAppendTo,
@ -836,7 +836,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* @param toAppendTo A StringBuffer that the result should be appended to.
* @param ignore This function doesn't examine or update the field position.
* @return toAppendTo
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(long number,
StringBuffer toAppendTo,
@ -852,7 +852,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* <strong><font face=helvetica color=red>NEW</font></strong>
* Implement com.ibm.icu.text.NumberFormat:
* Format a BigInteger.
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(BigInteger number,
StringBuffer toAppendTo,
@ -864,7 +864,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* <strong><font face=helvetica color=red>NEW</font></strong>
* Implement com.ibm.icu.text.NumberFormat:
* Format a BigDecimal.
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(java.math.BigDecimal number,
StringBuffer toAppendTo,
@ -876,7 +876,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* <strong><font face=helvetica color=red>NEW</font></strong>
* Implement com.ibm.icu.text.NumberFormat:
* Format a BigDecimal.
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(com.ibm.icu.math.BigDecimal number,
StringBuffer toAppendTo,
@ -899,7 +899,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* instance of either Long or Double, depending on whether the result has a
* fractional part.
* @see #setLenientParseMode
* @stable
* @stable ICU 2.0
*/
public Number parse(String text, ParsePosition parsePosition) {
@ -990,7 +990,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
*
* @param enabled If true, turns lenient-parse mode on; if false, turns it off.
* @see java.text.RuleBasedCollator
* @stable
* @stable ICU 2.0
*/
public void setLenientParseMode(boolean enabled) {
lenientParse = enabled;
@ -1007,7 +1007,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* by default.
* @return true if lenient-parse mode is turned on.
* @see #setLenientParseMode
* @stable
* @stable ICU 2.0
*/
public boolean lenientParseEnabled() {
return lenientParse;
@ -1018,7 +1018,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
* to the initial default rule set.
* @param ruleSetName the name of the rule set, or null to reset the initial default.
* @throws IllegalArgumentException if ruleSetName is not the name of a public ruleset.
* @stable
* @stable ICU 2.0
*/
public void setDefaultRuleSet(String ruleSetName) {
if (ruleSetName == null) {

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/SimpleDateFormat.java,v $
* $Date: 2002/12/03 19:45:38 $
* $Revision: 1.16 $
* $Date: 2002/12/05 01:22:28 $
* $Revision: 1.17 $
*
*****************************************************************************************
*/
@ -183,7 +183,7 @@ import java.util.ResourceBundle;
* @see DateFormatSymbols
* @see DecimalFormat
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
* @stable
* @stable ICU 2.0
*/
public class SimpleDateFormat extends DateFormat {
@ -257,7 +257,7 @@ public class SimpleDateFormat extends DateFormat {
* generality, use the factory methods in the DateFormat class.
*
* @see DateFormat
* @stable
* @stable ICU 2.0
*/
public SimpleDateFormat() {
this(SHORT, SHORT, Locale.getDefault());
@ -267,7 +267,7 @@ public class SimpleDateFormat extends DateFormat {
* Construct a SimpleDateFormat using the given pattern in the default
* locale. <b>Note:</b> Not all locales support SimpleDateFormat; for full
* generality, use the factory methods in the DateFormat class.
* @stable
* @stable ICU 2.0
*/
public SimpleDateFormat(String pattern)
{
@ -278,7 +278,7 @@ public class SimpleDateFormat extends DateFormat {
* Construct a SimpleDateFormat using the given pattern and locale.
* <b>Note:</b> Not all locales support SimpleDateFormat; for full
* generality, use the factory methods in the DateFormat class.
* @stable
* @stable ICU 2.0
*/
public SimpleDateFormat(String pattern, Locale loc)
{
@ -290,7 +290,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Construct a SimpleDateFormat using the given pattern and
* locale-specific symbol data.
* @stable
* @stable ICU 2.0
*/
public SimpleDateFormat(String pattern, DateFormatSymbols formatData)
{
@ -368,7 +368,7 @@ public class SimpleDateFormat extends DateFormat {
* to begin on the date the user specifies.
* @param startDate During parsing, two digit years will be placed in the range
* <code>startDate</code> to <code>startDate + 100 years</code>.
* @stable
* @stable ICU 2.0
*/
public void set2DigitYearStart(Date startDate) {
parseAmbiguousDatesAsAfter(startDate);
@ -379,7 +379,7 @@ public class SimpleDateFormat extends DateFormat {
* as being within.
* @return the start of the 100-year period into which two digit years are
* parsed
* @stable
* @stable ICU 2.0
*/
public Date get2DigitYearStart() {
return defaultCenturyStart;
@ -397,7 +397,7 @@ public class SimpleDateFormat extends DateFormat {
* if desired. On output: the offsets of the alignment field.
* @return the formatted date-time string.
* @see DateFormat
* @stable
* @stable ICU 2.0
*/
public StringBuffer format(Calendar cal, StringBuffer toAppendTo,
FieldPosition pos)
@ -481,7 +481,7 @@ public class SimpleDateFormat extends DateFormat {
* this field; used to set pos when appropriate
* @param pos receives the position of a field, when appropriate
* @param formatData the symbols for this formatter
* @stable
* @stable ICU 2.0
*/
protected String subFormat(char ch, int count, int beginOffset,
FieldPosition pos, DateFormatSymbols formatData,
@ -626,7 +626,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Formats a number with the specified minimum and maximum number of digits.
* @stable
* @stable ICU 2.0
*/
protected String zeroPaddingNumber(long value, int minDigits, int maxDigits)
{
@ -639,7 +639,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Overrides DateFormat
* @see DateFormat
* @stable
* @stable ICU 2.0
*/
public void parse(String text, Calendar cal, ParsePosition pos)
{
@ -872,7 +872,7 @@ public class SimpleDateFormat extends DateFormat {
* number indicating matching failure, otherwise. As a side effect,
* sets the <code>cal</code> field <code>field</code> to the index
* of the best match, if matching succeeded.
* @stable
* @stable ICU 2.0
*/
protected int matchString(String text, int start, int field, String[] data, Calendar cal)
{
@ -980,7 +980,7 @@ public class SimpleDateFormat extends DateFormat {
* number indicating matching failure, otherwise. As a side effect,
* set the appropriate field of <code>cal</code> with the parsed
* value.
* @stable
* @stable ICU 2.0
*/
protected int subParse(String text, int start, char ch, int count,
boolean obeyCount, boolean[] ambiguousYear, Calendar cal)
@ -1308,7 +1308,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Return a pattern string describing this date format.
* @stable
* @stable ICU 2.0
*/
public String toPattern() {
return pattern;
@ -1316,7 +1316,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Return a localized pattern string describing this date format.
* @stable
* @stable ICU 2.0
*/
public String toLocalizedPattern() {
return translatePattern(pattern,
@ -1326,7 +1326,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Apply the given unlocalized pattern string to this date format.
* @stable
* @stable ICU 2.0
*/
public void applyPattern (String pattern)
{
@ -1335,7 +1335,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Apply the given localized pattern string to this date format.
* @stable
* @stable ICU 2.0
*/
public void applyLocalizedPattern(String pattern) {
this.pattern = translatePattern(pattern,
@ -1347,7 +1347,7 @@ public class SimpleDateFormat extends DateFormat {
* Gets the date/time formatting data.
* @return a copy of the date-time formatting data associated
* with this date-time formatter.
* @stable
* @stable ICU 2.0
*/
public DateFormatSymbols getDateFormatSymbols()
{
@ -1357,7 +1357,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Allows you to set the date/time formatting data.
* @param newFormatData the given date-time formatting data.
* @stable
* @stable ICU 2.0
*/
public void setDateFormatSymbols(DateFormatSymbols newFormatSymbols)
{
@ -1366,7 +1366,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Method for subclasses to access the DateFormatSymbols.
* @stable
* @stable ICU 2.0
*/
protected DateFormatSymbols getSymbols() {
return formatData;
@ -1374,7 +1374,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone() {
SimpleDateFormat other = (SimpleDateFormat) super.clone();
@ -1385,7 +1385,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Override hashCode.
* Generates the hash code for the SimpleDateFormat object
* @stable
* @stable ICU 2.0
*/
public int hashCode()
{
@ -1395,7 +1395,7 @@ public class SimpleDateFormat extends DateFormat {
/**
* Override equals.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj)
{

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Transliterator.java,v $
* $Date: 2002/12/04 00:03:28 $
* $Revision: 1.85 $
* $Date: 2002/12/05 01:22:35 $
* $Revision: 1.86 $
*
*****************************************************************************************
*/
@ -251,7 +251,7 @@ import java.util.Vector;
* <p>Copyright &copy; IBM Corporation 1999. All rights reserved.
*
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public abstract class Transliterator {
/**
@ -261,7 +261,7 @@ public abstract class Transliterator {
* direction, and B to A when operating in the reverse direction.
* @see RuleBasedTransliterator
* @see CompoundTransliterator
* @stable
* @stable ICU 2.0
*/
public static final int FORWARD = 0;
@ -272,7 +272,7 @@ public abstract class Transliterator {
* direction, and B to A when operating in the reverse direction.
* @see RuleBasedTransliterator
* @see CompoundTransliterator
* @stable
* @stable ICU 2.0
*/
public static final int REVERSE = 1;
@ -295,7 +295,7 @@ public abstract class Transliterator {
* boundaries. That is, none of them may occur between two code units
* of a surrogate pair. If any index does split a surrogate pair,
* results are unspecified.
* @stable
* @stable ICU 2.0
*/
public static class Position {
@ -305,7 +305,7 @@ public abstract class Transliterator {
* anything before this index. INPUT/OUTPUT parameter: This parameter
* is updated by a transliteration operation to reflect the maximum
* amount of antecontext needed by a transliterator.
* @stable
* @stable ICU 2.0
*/
public int contextStart;
@ -315,7 +315,7 @@ public abstract class Transliterator {
* anything at or after this index. INPUT/OUTPUT parameter: This
* parameter is updated to reflect changes in the length of the
* text, but points to the same logical position in the text.
* @stable
* @stable ICU 2.0
*/
public int contextLimit;
@ -324,7 +324,7 @@ public abstract class Transliterator {
* INPUT/OUTPUT parameter: This parameter is advanced past
* characters that have already been transliterated by a
* transliteration operation.
* @stable
* @stable ICU 2.0
*/
public int start;
@ -333,14 +333,14 @@ public abstract class Transliterator {
* INPUT/OUTPUT parameter: This parameter is updated to reflect
* changes in the length of the text, but points to the same
* logical position in the text.
* @stable
* @stable ICU 2.0
*/
public int limit;
/**
* Constructs a Position object with start, limit,
* contextStart, and contextLimit all equal to zero.
* @stable
* @stable ICU 2.0
*/
public Position() {
this(0, 0, 0, 0);
@ -350,7 +350,7 @@ public abstract class Transliterator {
* Constructs a Position object with the given start,
* contextStart, and contextLimit. The limit is set to the
* contextLimit.
* @stable
* @stable ICU 2.0
*/
public Position(int contextStart, int contextLimit, int start) {
this(contextStart, contextLimit, start, contextLimit);
@ -359,7 +359,7 @@ public abstract class Transliterator {
/**
* Constructs a Position object with the given start, limit,
* contextStart, and contextLimit.
* @stable
* @stable ICU 2.0
*/
public Position(int contextStart, int contextLimit,
int start, int limit) {
@ -374,7 +374,7 @@ public abstract class Transliterator {
* @param length the length of the string this object applies to
* @exception IllegalArgumentException if any indices are out
* of bounds
* @stable
* @stable ICU 2.0
*/
public final void validate(int length) {
if (contextStart < 0 ||
@ -478,7 +478,7 @@ public abstract class Transliterator {
* <tt>filter.contains()</tt> returns <tt>false</tt> will not be
* altered by this transliterator. If <tt>filter</tt> is
* <tt>null</tt> then no filtering is applied.
* @stable
* @stable ICU 2.0
*/
protected Transliterator(String ID, UnicodeFilter filter) {
if (ID == null) {
@ -501,7 +501,7 @@ public abstract class Transliterator {
* length, at <code>[start, </code><em>new-limit</em><code>)</code>, where
* <em>new-limit</em> is the return value. If the input offsets are out of bounds,
* the returned value is -1 and the input string remains unchanged.
* @stable
* @stable ICU 2.0
*/
public final int transliterate(Replaceable text, int start, int limit) {
if (start < 0 ||
@ -518,7 +518,7 @@ public abstract class Transliterator {
/**
* Transliterates an entire string in place. Convenience method.
* @param text the string to be transliterated
* @stable
* @stable ICU 2.0
*/
public final void transliterate(Replaceable text) {
transliterate(text, 0, text.length());
@ -529,7 +529,7 @@ public abstract class Transliterator {
*
* @param text the string to be transliterated
* @return The transliterated text
* @stable
* @stable ICU 2.0
*/
public final String transliterate(String text) {
ReplaceableString result = new ReplaceableString(text);
@ -583,7 +583,7 @@ public abstract class Transliterator {
* @see #handleTransliterate
* @exception IllegalArgumentException if <code>index</code>
* is invalid
* @stable
* @stable ICU 2.0
*/
public final void transliterate(Replaceable text, Position index,
String insertion) {
@ -629,7 +629,7 @@ public abstract class Transliterator {
* transliterated into the translation buffer at
* <code>index.contextLimit</code>.
* @see #transliterate(Replaceable, Transliterator.Position, String)
* @stable
* @stable ICU 2.0
*/
public final void transliterate(Replaceable text, Position index,
int insertion) {
@ -646,7 +646,7 @@ public abstract class Transliterator {
* @param index the start and limit of the text, the position
* of the cursor, and the start and limit of transliteration.
* @see #transliterate(Replaceable, Transliterator.Position, String)
* @stable
* @stable ICU 2.0
*/
public final void transliterate(Replaceable text, Position index) {
transliterate(text, index, null);
@ -661,7 +661,7 @@ public abstract class Transliterator {
* untransliterated text.
* @param index the array of indices previously passed to {@link
* #transliterate}
* @stable
* @stable ICU 2.0
*/
public final void finishTransliteration(Replaceable text,
Position index) {
@ -746,7 +746,7 @@ public abstract class Transliterator {
* <code>pos.limit</code>.
*
* @see #transliterate
* @stable
* @stable ICU 2.0
*/
protected abstract void handleTransliterate(Replaceable text,
Position pos, boolean incremental);
@ -1090,7 +1090,7 @@ public abstract class Transliterator {
* @param incremental if TRUE, then assume more characters may be inserted
* at index.limit, and postpone processing to accomodate future incoming
* characters
* @stable
* @stable ICU 2.0
*/
protected void filteredTransliterate(Replaceable text,
Position index,
@ -1108,7 +1108,7 @@ public abstract class Transliterator {
*
* @return The maximum number of preceding context characters this
* transliterator needs to examine
* @stable
* @stable ICU 2.0
*/
protected final int getMaximumContextLength() {
return maximumContextLength;
@ -1117,7 +1117,7 @@ public abstract class Transliterator {
/**
* Method for subclasses to use to set the maximum context length.
* @see #getMaximumContextLength
* @stable
* @stable ICU 2.0
*/
protected void setMaximumContextLength(int a) {
if (a < 0) {
@ -1132,7 +1132,7 @@ public abstract class Transliterator {
* will return this object, if it has been registered.
* @see #registerClass
* @see #getAvailableIDs
* @stable
* @stable ICU 2.0
*/
public final String getID() {
return ID;
@ -1141,7 +1141,7 @@ public abstract class Transliterator {
/**
* Set the programmatic identifier for this transliterator. Only
* for use by subclasses.
* @stable
* @stable ICU 2.0
*/
protected final void setID(String id) {
ID = id;
@ -1151,7 +1151,7 @@ public abstract class Transliterator {
* Returns a name for this transliterator that is appropriate for
* display to the user in the default locale. See {@link
* #getDisplayName(String,Locale)} for details.
* @stable
* @stable ICU 2.0
*/
public final static String getDisplayName(String ID) {
return getDisplayName(ID, Locale.getDefault());
@ -1174,7 +1174,7 @@ public abstract class Transliterator {
* @param inLocale the Locale in which the display name should be
* localized.
* @see java.text.MessageFormat
* @stable
* @stable ICU 2.0
*/
public static String getDisplayName(String id, Locale inLocale) {
@ -1240,7 +1240,7 @@ public abstract class Transliterator {
/**
* Returns the filter used by this transliterator, or <tt>null</tt>
* if this transliterator uses no filter.
* @stable
* @stable ICU 2.0
*/
public final UnicodeFilter getFilter() {
return filter;
@ -1253,7 +1253,7 @@ public abstract class Transliterator {
* <p>Callers must take care if a transliterator is in use by
* multiple threads. The filter should not be changed by one
* thread while another thread may be transliterating.
* @stable
* @stable ICU 2.0
*/
public void setFilter(UnicodeFilter filter) {
this.filter = filter;
@ -1267,7 +1267,7 @@ public abstract class Transliterator {
* @param ID a valid ID, as enumerated by <code>getAvailableIDs()</code>
* @return A <code>Transliterator</code> object with the given ID
* @exception IllegalArgumentException if the given ID is invalid.
* @stable
* @stable ICU 2.0
*/
public static final Transliterator getInstance(String ID) {
return getInstance(ID, FORWARD);
@ -1286,7 +1286,7 @@ public abstract class Transliterator {
* @see #registerClass
* @see #getAvailableIDs
* @see #getID
* @stable
* @stable ICU 2.0
*/
public static Transliterator getInstance(String ID,
int dir) {
@ -1347,7 +1347,7 @@ public abstract class Transliterator {
* CompoundTransliterator, if it contains ID blocks, or a
* NullTransliterator, if it contains ID blocks which parse as
* empty for the given direction.
* @stable
* @stable ICU 2.0
*/
public static final Transliterator createFromRules(String ID, String rules, int dir) {
Transliterator t = null;
@ -1396,7 +1396,7 @@ public abstract class Transliterator {
* @param escapeUnprintable if true, then unprintable characters
* will be converted to escape form backslash-'u' or
* backslash-'U'.
* @stable
* @stable ICU 2.0
*/
public String toRules(boolean escapeUnprintable) {
return baseToRules(escapeUnprintable);
@ -1410,7 +1410,7 @@ public abstract class Transliterator {
* @param escapeUnprintable if true, then unprintable characters
* will be converted to escape form backslash-'u' or
* backslash-'U'.
* @stable
* @stable ICU 2.0
*/
protected final String baseToRules(boolean escapeUnprintable) {
// The base class implementation of toRules munges the ID into
@ -1511,7 +1511,7 @@ public abstract class Transliterator {
* exact, of this transliterator, or <code>null</code> if no such
* transliterator is registered.
* @see #registerClass
* @stable
* @stable ICU 2.0
*/
public final Transliterator getInverse() {
return getInstance(ID, REVERSE);
@ -1528,7 +1528,7 @@ public abstract class Transliterator {
* transliterator
* @param transClass a subclass of <code>Transliterator</code>
* @see #unregister
* @stable
* @stable ICU 2.0
*/
public static void registerClass(String ID, Class transClass, String displayName) {
registry.put(ID, transClass, true);
@ -1542,7 +1542,7 @@ public abstract class Transliterator {
* method should return a new instance of the given transliterator.
* @param ID the ID of this transliterator
* @param factory the factory object
* @stable
* @stable ICU 2.0
*/
public static void registerFactory(String ID, Factory factory) {
registry.put(ID, factory, true);
@ -1611,7 +1611,7 @@ public abstract class Transliterator {
*
* @param ID the ID of the transliterator or class
* @see #registerClass
* @stable
* @stable ICU 2.0
*/
public static void unregister(String ID) {
displayNameCache.remove(new CaseInsensitiveString(ID));
@ -1628,7 +1628,7 @@ public abstract class Transliterator {
* @return An <code>Enumeration</code> over <code>String</code> objects
* @see #getInstance
* @see #registerClass
* @stable
* @stable ICU 2.0
*/
public static final Enumeration getAvailableIDs() {
return registry.getAvailableIDs();
@ -1639,7 +1639,7 @@ public abstract class Transliterator {
* transliterators. Source names may be passed to
* getAvailableTargets() to obtain available targets for each
* source.
* @stable
* @stable ICU 2.0
*/
public static final Enumeration getAvailableSources() {
return registry.getAvailableSources();
@ -1650,7 +1650,7 @@ public abstract class Transliterator {
* transliterators having a given source name. Target names may
* be passed to getAvailableVariants() to obtain available
* variants for each source and target pair.
* @stable
* @stable ICU 2.0
*/
public static final Enumeration getAvailableTargets(String source) {
return registry.getAvailableTargets(source);
@ -1659,7 +1659,7 @@ public abstract class Transliterator {
/**
* Returns an enumeration over the variant names of registered
* transliterators having a given source name and target name.
* @stable
* @stable ICU 2.0
*/
public static final Enumeration getAvailableVariants(String source,
String target) {
@ -1788,12 +1788,12 @@ public abstract class Transliterator {
* makes it possible to register one factory method to more than
* one ID, or for a factory method to parameterize its result
* based on the variant.
* @stable
* @stable ICU 2.0
*/
public static interface Factory {
/**
* Return a transliterator for the given ID.
* @stable
* @stable ICU 2.0
*/
Transliterator getInstance(String ID);
}

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/UnicodeFilter.java,v $
* $Date: 2002/12/03 21:07:56 $
* $Revision: 1.13 $
* $Date: 2002/12/05 01:23:06 $
* $Revision: 1.14 $
*
*****************************************************************************************
*/
@ -18,7 +18,7 @@ package com.ibm.icu.text;
* Currently, filters are used in conjunction with classes like {@link
* Transliterator} to only process selected characters through a
* transformation.
* @stable
* @stable ICU 2.0
*/
public abstract class UnicodeFilter implements UnicodeMatcher {
@ -27,14 +27,14 @@ public abstract class UnicodeFilter implements UnicodeMatcher {
* subset. In other words, if a character is <b>to be
* filtered</b>, then <tt>contains()</tt> returns
* <b><tt>false</tt></b>.
* @stable
* @stable ICU 2.0
*/
public abstract boolean contains(int c);
/**
* Default implementation of UnicodeMatcher::matches() for Unicode
* filters. Matches a single 16-bit code unit at offset.
* @stable
* @stable ICU 2.0
*/
public int matches(Replaceable text,
int[] offset,

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/UnicodeMatcher.java,v $
* $Date: 2002/12/04 00:11:17 $
* $Revision: 1.7 $
* $Date: 2002/12/05 01:23:15 $
* $Revision: 1.8 $
*
*****************************************************************************************
*/
@ -15,7 +15,7 @@ package com.ibm.icu.text;
/**
* <code>UnicodeMatcher</code> defines a protocol for objects that can
* match a range of characters in a Replaceable string.
* @stable
* @stable ICU 2.0
*/
public interface UnicodeMatcher {
@ -24,7 +24,7 @@ public interface UnicodeMatcher {
* mismatch between the text and this matcher. The text contains
* a character which does not match, or the text does not contain
* all desired characters for a non-incremental match.
* @stable
* @stable ICU 2.0
*/
public static final int U_MISMATCH = 0;
@ -36,7 +36,7 @@ public interface UnicodeMatcher {
* complete match. Alternatively, for variable-length matchers,
* all characters of the text match, and if more characters were
* supplied at limit, they might also match.
* @stable
* @stable ICU 2.0
*/
public static final int U_PARTIAL_MATCH = 1;
@ -46,7 +46,7 @@ public interface UnicodeMatcher {
* incremental variable-length match, this value is returned if
* the given text matches, and it is known that additional
* characters would not alter the extent of the match.
* @stable
* @stable ICU 2.0
*/
public static final int U_MATCH = 2;
@ -91,7 +91,7 @@ public interface UnicodeMatcher {
* @return a match degree value indicating a full match, a partial
* match, or a mismatch. If incremental is FALSE then
* U_PARTIAL_MATCH should never be returned.
* @stable
* @stable ICU 2.0
*/
public abstract int matches(Replaceable text,
int[] offset,
@ -106,7 +106,7 @@ public interface UnicodeMatcher {
* character to their hex escape representations, \\uxxxx or
* \\Uxxxxxxxx. Unprintable characters are those other than
* U+000A, U+0020..U+007E.
* @stable
* @stable ICU 2.0
*/
public abstract String toPattern(boolean escapeUnprintable);
@ -119,7 +119,7 @@ public interface UnicodeMatcher {
* <p>Note: This API uses an int even though the value will be
* restricted to 8 bits in order to avoid complications with
* signedness (bytes convert to ints in the range -128..127).
* @stable
* @stable ICU 2.0
*/
public abstract boolean matchesIndexValue(int v);

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/UnicodeSet.java,v $
* $Date: 2002/12/04 00:25:51 $
* $Revision: 1.81 $
* $Date: 2002/12/05 01:23:18 $
* $Revision: 1.82 $
*
*****************************************************************************************
*/
@ -250,7 +250,7 @@ import java.util.Iterator;
* </blockquote>
*
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class UnicodeSet extends UnicodeFilter {
@ -260,13 +260,13 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Minimum value that can be stored in a UnicodeSet.
* @stable
* @stable ICU 2.0
*/
public static final int MIN_VALUE = LOW;
/**
* Maximum value that can be stored in a UnicodeSet.
* @stable
* @stable ICU 2.0
*/
public static final int MAX_VALUE = HIGH - 1;
@ -314,7 +314,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Constructs an empty set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet() {
list = new int[1 + START_EXTRA];
@ -323,7 +323,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Constructs a copy of an existing set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet(UnicodeSet other) {
set(other);
@ -335,7 +335,7 @@ public class UnicodeSet extends UnicodeFilter {
*
* @param start first character, inclusive, of range
* @param end last character, inclusive, of range
* @stable
* @stable ICU 2.0
*/
public UnicodeSet(int start, int end) {
this();
@ -348,7 +348,7 @@ public class UnicodeSet extends UnicodeFilter {
* @param pattern a string specifying what characters are in the set
* @exception java.lang.IllegalArgumentException if the pattern contains
* a syntax error.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet(String pattern) {
this(pattern, true);
@ -362,7 +362,7 @@ public class UnicodeSet extends UnicodeFilter {
* UCharacterProperty.isRuleWhiteSpace() returns true
* @exception java.lang.IllegalArgumentException if the pattern contains
* a syntax error.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet(String pattern, boolean ignoreWhitespace) {
this();
@ -379,7 +379,7 @@ public class UnicodeSet extends UnicodeFilter {
* and chars to UnicodeSets
* @exception java.lang.IllegalArgumentException if the pattern
* contains a syntax error.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet(String pattern, ParsePosition pos, SymbolTable symbols) {
this();
@ -413,7 +413,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Return a new set that is equivalent to this one.
* @stable
* @stable ICU 2.0
*/
public Object clone() {
return new UnicodeSet(this);
@ -426,7 +426,7 @@ public class UnicodeSet extends UnicodeFilter {
*
* @param start first character in the set, inclusive
* @param end last character in the set, inclusive
* @stable
* @stable ICU 2.0
*/
public UnicodeSet set(int start, int end) {
clear();
@ -438,7 +438,7 @@ public class UnicodeSet extends UnicodeFilter {
* Make this object represent the same set as <code>other</code>.
* @param other a <code>UnicodeSet</code> whose value will be
* copied to this object
* @stable
* @stable ICU 2.0
*/
public UnicodeSet set(UnicodeSet other) {
list = (int[]) other.list.clone();
@ -455,7 +455,7 @@ public class UnicodeSet extends UnicodeFilter {
* @param pattern a string specifying what characters are in the set
* @exception java.lang.IllegalArgumentException if the pattern
* contains a syntax error.
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet applyPattern(String pattern) {
return applyPattern(pattern, true);
@ -470,7 +470,7 @@ public class UnicodeSet extends UnicodeFilter {
* UCharacterProperty.isRuleWhiteSpace() returns true are ignored
* @exception java.lang.IllegalArgumentException if the pattern
* contains a syntax error.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet applyPattern(String pattern, boolean ignoreWhitespace) {
ParsePosition pos = new ParsePosition(0);
@ -493,7 +493,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Return true if the given position, in the given pattern, appears
* to be the start of a UnicodeSet pattern.
* @stable
* @stable ICU 2.0
*/
public static boolean resemblesPattern(String pattern, int pos) {
return ((pos+1) < pattern.length() &&
@ -551,7 +551,7 @@ public class UnicodeSet extends UnicodeFilter {
* Returns a string representation of this set. If the result of
* calling this function is passed to a UnicodeSet constructor, it
* will produce another set that is equal to this one.
* @stable
* @stable ICU 2.0
*/
public String toPattern(boolean escapeUnprintable) {
StringBuffer result = new StringBuffer();
@ -600,7 +600,7 @@ public class UnicodeSet extends UnicodeFilter {
* Generate and append a string representation of this set to result.
* This does not use this.pat, the cleaned up copy of the string
* passed to applyPattern().
* @stable
* @stable ICU 2.0
*/
public StringBuffer _generatePattern(StringBuffer result,
boolean escapeUnprintable) {
@ -668,7 +668,7 @@ public class UnicodeSet extends UnicodeFilter {
* <em>n</em>, where <code>0 <= </code><em>n</em><code> <= 65536</code>.
*
* @return the number of elements in this set (its cardinality).
* @stable
* @stable ICU 2.0
*/
public int size() {
int n = 0;
@ -683,7 +683,7 @@ public class UnicodeSet extends UnicodeFilter {
* Returns <tt>true</tt> if this set contains no elements.
*
* @return <tt>true</tt> if this set contains no elements.
* @stable
* @stable ICU 2.0
*/
public boolean isEmpty() {
return len == 1 && strings.size() == 0;
@ -694,7 +694,7 @@ public class UnicodeSet extends UnicodeFilter {
* this set contains any character whose low byte is the given
* value. This is used by <tt>RuleBasedTransliterator</tt> for
* indexing.
* @stable
* @stable ICU 2.0
*/
public boolean matchesIndexValue(int v) {
/* The index value v, in the range [0,255], is contained in this set if
@ -737,7 +737,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Implementation of UnicodeMatcher.matches(). Always matches the
* longest possible multichar string.
* @stable
* @stable ICU 2.0
*/
public int matches(Replaceable text,
int[] offset,
@ -884,7 +884,7 @@ public class UnicodeSet extends UnicodeFilter {
* is not in this set, return -1. The inverse of this method is
* <code>charAt()</code>.
* @return an index from 0..size()-1, or -1
* @stable
* @stable ICU 2.0
*/
public int indexOf(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
@ -912,7 +912,7 @@ public class UnicodeSet extends UnicodeFilter {
* <code>indexOf()</code>.
* @param index an index from 0..size()-1
* @return the character at the given index, or -1.
* @stable
* @stable ICU 2.0
*/
public int charAt(int index) {
if (index >= 0) {
@ -942,7 +942,7 @@ public class UnicodeSet extends UnicodeFilter {
* to this set.
* @param end last character, inclusive, of range to be added
* to this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet add(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
@ -982,7 +982,7 @@ public class UnicodeSet extends UnicodeFilter {
* Adds the specified character to this set if it is not already
* present. If this set already contains the specified character,
* the call leaves this set unchanged.
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet add(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
@ -1076,7 +1076,7 @@ public class UnicodeSet extends UnicodeFilter {
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet add(String s) {
@ -1115,7 +1115,7 @@ public class UnicodeSet extends UnicodeFilter {
* If this set already any particular character, it has no effect on that character.
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet addAll(String s) {
int cp;
@ -1131,7 +1131,7 @@ public class UnicodeSet extends UnicodeFilter {
* If this set already any particular character, it has no effect on that character.
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet retainAll(String s) {
return retainAll(fromAll(s));
@ -1142,7 +1142,7 @@ public class UnicodeSet extends UnicodeFilter {
* If this set already any particular character, it has no effect on that character.
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet complementAll(String s) {
return complementAll(fromAll(s));
@ -1153,7 +1153,7 @@ public class UnicodeSet extends UnicodeFilter {
* If this set already any particular character, it has no effect on that character.
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet removeAll(String s) {
return removeAll(fromAll(s));
@ -1164,7 +1164,7 @@ public class UnicodeSet extends UnicodeFilter {
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* @param s the source string
* @return a newly created set containing the given string
* @stable
* @stable ICU 2.0
*/
public static UnicodeSet from(String s) {
return new UnicodeSet().add(s);
@ -1175,7 +1175,7 @@ public class UnicodeSet extends UnicodeFilter {
* Makes a set from each of the characters in the string. Thus "ch" => {"c", "h"}
* @param s the source string
* @return a newly created set containing the given characters
* @stable
* @stable ICU 2.0
*/
public static UnicodeSet fromAll(String s) {
return new UnicodeSet().addAll(s);
@ -1191,7 +1191,7 @@ public class UnicodeSet extends UnicodeFilter {
* to this set.
* @param end last character, inclusive, of range to be retained
* to this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet retain(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
@ -1210,7 +1210,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Retain the specified character from this set if it is present.
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet retain(int c) {
return retain(c, c);
@ -1222,7 +1222,7 @@ public class UnicodeSet extends UnicodeFilter {
* returns.
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet retain(String s) {
int cp = getSingleCP(s);
@ -1247,7 +1247,7 @@ public class UnicodeSet extends UnicodeFilter {
* from this set.
* @param end last character, inclusive, of range to be removed
* from this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet remove(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
@ -1266,7 +1266,7 @@ public class UnicodeSet extends UnicodeFilter {
* Removes the specified character from this set if it is present.
* The set will not contain the specified character once the call
* returns.
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet remove(int c) {
return remove(c, c);
@ -1278,7 +1278,7 @@ public class UnicodeSet extends UnicodeFilter {
* returns.
* @param s the source string
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet remove(String s) {
int cp = getSingleCP(s);
@ -1301,7 +1301,7 @@ public class UnicodeSet extends UnicodeFilter {
* from this set.
* @param end last character, inclusive, of range to be removed
* from this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet complement(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
@ -1321,7 +1321,7 @@ public class UnicodeSet extends UnicodeFilter {
* Complements the specified character in this set. The character
* will be removed if it is in this set, or will be added if it is
* not in this set.
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet complement(int c) {
return complement(c, c);
@ -1330,7 +1330,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* This is equivalent to
* <code>complement(MIN_VALUE, MAX_VALUE)</code>.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet complement() {
if (list[0] == LOW) {
@ -1353,7 +1353,7 @@ public class UnicodeSet extends UnicodeFilter {
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* @param s the string to complement
* @return this object, for chaining
* @stable
* @stable ICU 2.0
*/
public final UnicodeSet complement(String s) {
int cp = getSingleCP(s);
@ -1371,7 +1371,7 @@ public class UnicodeSet extends UnicodeFilter {
* Returns true if this set contains the given character.
* @param c character to be checked for containment
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean contains(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
@ -1554,7 +1554,7 @@ public class UnicodeSet extends UnicodeFilter {
* @param start first character, inclusive, of the range
* @param end last character, inclusive, of the range
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean contains(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
@ -1576,7 +1576,7 @@ public class UnicodeSet extends UnicodeFilter {
* multicharacter string.
* @param s string to be checked for containment
* @return <tt>true</tt> if this set contains the specified string
* @stable
* @stable ICU 2.0
*/
public final boolean contains(String s) {
@ -1593,7 +1593,7 @@ public class UnicodeSet extends UnicodeFilter {
* of the given set.
* @param c set to be checked for containment
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean containsAll(UnicodeSet c) {
// The specified set is a subset if all of its pairs are contained in
@ -1614,7 +1614,7 @@ public class UnicodeSet extends UnicodeFilter {
* of the given string.
* @param s string containing characters to be checked for containment
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean containsAll(String s) {
int cp;
@ -1631,7 +1631,7 @@ public class UnicodeSet extends UnicodeFilter {
* @param start first character, inclusive, of the range
* @param end last character, inclusive, of the range
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean containsNone(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
@ -1652,7 +1652,7 @@ public class UnicodeSet extends UnicodeFilter {
* of the given set.
* @param c set to be checked for containment
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean containsNone(UnicodeSet c) {
// The specified set is a subset if all of its pairs are contained in
@ -1673,7 +1673,7 @@ public class UnicodeSet extends UnicodeFilter {
* of the given string.
* @param s string containing characters to be checked for containment
* @return true if the test condition is met
* @stable
* @stable ICU 2.0
*/
public boolean containsNone(String s) {
int cp;
@ -1690,7 +1690,7 @@ public class UnicodeSet extends UnicodeFilter {
* @param start first character, inclusive, of the range
* @param end last character, inclusive, of the range
* @return true if the condition is met
* @stable
* @stable ICU 2.0
*/
public final boolean containsSome(int start, int end) {
return !containsNone(start, end);
@ -1701,7 +1701,7 @@ public class UnicodeSet extends UnicodeFilter {
* and strings of the given set.
* @param c set to be checked for containment
* @return true if the condition is met
* @stable
* @stable ICU 2.0
*/
public final boolean containsSome(UnicodeSet s) {
return !containsNone(s);
@ -1712,7 +1712,7 @@ public class UnicodeSet extends UnicodeFilter {
* of the given string.
* @param s string containing characters to be checked for containment
* @return true if the condition is met
* @stable
* @stable ICU 2.0
*/
public final boolean containsSome(String s) {
return !containsNone(s);
@ -1727,7 +1727,7 @@ public class UnicodeSet extends UnicodeFilter {
* collection is modified while the operation is in progress.
*
* @param c set whose elements are to be added to this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet addAll(UnicodeSet c) {
add(c.list, c.len, 0);
@ -1743,7 +1743,7 @@ public class UnicodeSet extends UnicodeFilter {
* the <i>intersection</i> of the two sets.
*
* @param c set that defines which elements this set will retain.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet retainAll(UnicodeSet c) {
retain(c.list, c.len, 0);
@ -1759,7 +1759,7 @@ public class UnicodeSet extends UnicodeFilter {
*
* @param c set that defines which elements will be removed from
* this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet removeAll(UnicodeSet c) {
retain(c.list, c.len, 2);
@ -1774,7 +1774,7 @@ public class UnicodeSet extends UnicodeFilter {
*
* @param c set that defines which elements will be complemented from
* this set.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet complementAll(UnicodeSet c) {
xor(c.list, c.len, 0);
@ -1785,7 +1785,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Removes all of the elements from this set. This set will be
* empty after this call returns.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet clear() {
list[0] = HIGH;
@ -1800,7 +1800,7 @@ public class UnicodeSet extends UnicodeFilter {
* this set.
* @see #getRangeStart
* @see #getRangeEnd
* @stable
* @stable ICU 2.0
*/
public int getRangeCount() {
return len/2;
@ -1813,7 +1813,7 @@ public class UnicodeSet extends UnicodeFilter {
* the range <code>0..getRangeCount()-1</code>
* @see #getRangeCount
* @see #getRangeEnd
* @stable
* @stable ICU 2.0
*/
public int getRangeStart(int index) {
return list[index*2];
@ -1826,7 +1826,7 @@ public class UnicodeSet extends UnicodeFilter {
* the range <code>0..getRangeCount()-1</code>
* @see #getRangeStart
* @see #getRangeEnd
* @stable
* @stable ICU 2.0
*/
public int getRangeEnd(int index) {
return (list[index*2 + 1] - 1);
@ -1835,7 +1835,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Reallocate this objects internal structures to take up the least
* possible space, without changing this object's value.
* @stable
* @stable ICU 2.0
*/
public UnicodeSet compact() {
if (len != list.length) {
@ -1857,7 +1857,7 @@ public class UnicodeSet extends UnicodeFilter {
*
* @param o Object to be compared for equality with this set.
* @return <tt>true</tt> if the specified Object is equal to this set.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object o) {
try {
@ -1878,7 +1878,7 @@ public class UnicodeSet extends UnicodeFilter {
*
* @return the hash code value for this set.
* @see java.lang.Object#hashCode()
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
int result = len;
@ -1891,7 +1891,7 @@ public class UnicodeSet extends UnicodeFilter {
/**
* Return a programmer-readable string representation of this object.
* @stable
* @stable ICU 2.0
*/
public String toString() {
return toPattern(true);

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java,v $
* $Date: 2002/12/03 21:48:03 $
* $Revision: 1.10 $
* $Date: 2002/12/05 01:24:02 $
* $Revision: 1.11 $
*
*****************************************************************************************
*/
@ -46,7 +46,7 @@ import java.io.*;
* }
* </pre>
* @author M. Davis
* @stable
* @stable ICU 2.0
*/
public final class UnicodeSetIterator {
@ -54,14 +54,14 @@ public final class UnicodeSetIterator {
* Value of <tt>codepoint</tt> if the iterator points to a string.
* If <tt>codepoint == IS_STRING</tt>, then examine
* <tt>string</tt> for the current iteration result.
* @stable
* @stable ICU 2.0
*/
public static int IS_STRING = -1;
/**
* Current code point, or the special value <tt>IS_STRING</tt>, if
* the iterator points to a string.
* @stable
* @stable ICU 2.0
*/
public int codepoint;
@ -72,7 +72,7 @@ public final class UnicodeSetIterator {
* iterating over code points using <tt>next()</tt>, or if
* <tt>codepoint == IS_STRING</tt>, then the value of
* <tt>codepointEnd</tt> is undefined.
* @stable
* @stable ICU 2.0
*/
public int codepointEnd;
@ -80,14 +80,14 @@ public final class UnicodeSetIterator {
* If <tt>codepoint == IS_STRING</tt>, then <tt>string</tt> points
* to the current string. If <tt>codepoint != IS_STRING</tt>, the
* value of <tt>string</tt> is undefined.
* @stable
* @stable ICU 2.0
*/
public String string;
/**
* Create an iterator over the given set.
* @param set set to iterate over
* @stable
* @stable ICU 2.0
*/
public UnicodeSetIterator(UnicodeSet set) {
reset(set);
@ -97,7 +97,7 @@ public final class UnicodeSetIterator {
* Create an iterator over nothing. <tt>next()</tt> and
* <tt>nextRange()</tt> return false. This is a convenience
* constructor allowing the target to be set later.
* @stable
* @stable ICU 2.0
*/
public UnicodeSetIterator() {
reset(new UnicodeSet());
@ -120,7 +120,7 @@ public final class UnicodeSetIterator {
*
* @return true if there was another element in the set and this
* object contains the element.
* @stable
* @stable ICU 2.0
*/
public boolean next() {
if (nextElement <= endElement) {
@ -160,7 +160,7 @@ public final class UnicodeSetIterator {
*
* @return true if there was another element in the set and this
* object contains the element.
* @stable
* @stable ICU 2.0
*/
public boolean nextRange() {
if (nextElement <= endElement) {
@ -191,7 +191,7 @@ public final class UnicodeSetIterator {
* resets it to the start of that set. The iterator is valid only
* so long as <tt>set</tt> is valid.
* @param set the set to iterate over.
* @stable
* @stable ICU 2.0
*/
public void reset(UnicodeSet set) {
this.set = set;
@ -200,7 +200,7 @@ public final class UnicodeSetIterator {
/**
* Resets this iterator to the start of the set.
* @stable
* @stable ICU 2.0
*/
public void reset() {
endRange = set.getRangeCount() - 1;

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/BuddhistCalendar.java,v $
* $Date: 2002/12/04 16:38:53 $
* $Revision: 1.10 $
* $Date: 2002/12/05 01:24:54 $
* $Revision: 1.11 $
*
*****************************************************************************************
*/
@ -36,7 +36,7 @@ import java.util.Locale;
*
* @author Laura Werner
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class BuddhistCalendar extends GregorianCalendar {
@ -51,14 +51,14 @@ public class BuddhistCalendar extends GregorianCalendar {
* value for the Buddhist calendar.
*
* @see com.ibm.icu.util.Calendar#ERA
* @stable
* @stable ICU 2.0
*/
public static final int BE = 0;
/**
* Constructs a <code>BuddhistCalendar</code> using the current time
* in the default time zone with the default locale.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar() {
super();
@ -69,7 +69,7 @@ public class BuddhistCalendar extends GregorianCalendar {
* in the given time zone with the default locale.
*
* @param zone the given time zone.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar(TimeZone zone) {
super(zone);
@ -80,7 +80,7 @@ public class BuddhistCalendar extends GregorianCalendar {
* in the default time zone with the given locale.
*
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar(Locale aLocale) {
super(aLocale);
@ -93,7 +93,7 @@ public class BuddhistCalendar extends GregorianCalendar {
* @param zone the given time zone.
*
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar(TimeZone zone, Locale aLocale) {
super(zone, aLocale);
@ -104,7 +104,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar(Date date) {
this();
@ -121,7 +121,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar(int year, int month, int date) {
super(year, month, date);
@ -143,7 +143,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public BuddhistCalendar(int year, int month, int date, int hour,
int minute, int second)
@ -162,7 +162,7 @@ public class BuddhistCalendar extends GregorianCalendar {
private static final int BUDDHIST_ERA_START = -543;
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetExtendedYear() {
int year;
@ -177,14 +177,14 @@ public class BuddhistCalendar extends GregorianCalendar {
// Return JD of start of given month/year
/**
* @stable
* @stable ICU 2.0
*/
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
return super.handleComputeMonthStart(eyear + BUDDHIST_ERA_START, month, useMonth);
}
/**
* @stable
* @stable ICU 2.0
*/
protected void handleComputeFields(int julianDay) {
super.handleComputeFields(julianDay);
@ -198,7 +198,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected int handleGetLimit(int field, int limitType) {
if (field == ERA) {

File diff suppressed because it is too large Load diff

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/Attic/CalendarAstronomer.java,v $
* $Date: 2002/12/04 16:38:52 $
* $Revision: 1.9 $
* $Date: 2002/12/05 01:25:10 $
* $Revision: 1.10 $
*
*****************************************************************************************
*/
@ -46,7 +46,7 @@ import java.util.*;
*
* @author Laura Werner
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class CalendarAstronomer {
@ -57,14 +57,14 @@ public class CalendarAstronomer {
/**
* The number of standard hours in one sidereal day.
* Approximately 24.93.
* @stable
* @stable ICU 2.0
*/
public static final double SIDEREAL_DAY = 23.93446960027;
/**
* The number of sidereal hours in one mean solar day.
* Approximately 24.07.
* @stable
* @stable ICU 2.0
*/
public static final double SOLAR_DAY = 24.065709816;
@ -76,7 +76,7 @@ public class CalendarAstronomer {
* Approximately 29.53.
*
* @see #SIDEREAL_MONTH
* @stable
* @stable ICU 2.0
*/
public static final double SYNODIC_MONTH = 29.530588853;
@ -89,7 +89,7 @@ public class CalendarAstronomer {
* Approximately 27.32.
*
* @see #SYNODIC_MONTH
* @stable
* @stable ICU 2.0
*/
public static final double SIDEREAL_MONTH = 27.32166;
@ -100,7 +100,7 @@ public class CalendarAstronomer {
* Approximately 365.24
*
* @see #SIDEREAL_YEAR
* @stable
* @stable ICU 2.0
*/
public static final double TROPICAL_YEAR = 365.242191;
@ -114,7 +114,7 @@ public class CalendarAstronomer {
* Approximately 365.25.
*
* @see #TROPICAL_YEAR
* @stable
* @stable ICU 2.0
*/
public static final double SIDEREAL_YEAR = 365.25636;
@ -124,25 +124,25 @@ public class CalendarAstronomer {
/**
* The number of milliseconds in one second.
* @stable
* @stable ICU 2.0
*/
public static final int SECOND_MS = 1000;
/**
* The number of milliseconds in one minute.
* @stable
* @stable ICU 2.0
*/
public static final int MINUTE_MS = 60*SECOND_MS;
/**
* The number of milliseconds in one hour.
* @stable
* @stable ICU 2.0
*/
public static final int HOUR_MS = 60*MINUTE_MS;
/**
* The number of milliseconds in one day.
* @stable
* @stable ICU 2.0
*/
public static final long DAY_MS = 24*HOUR_MS;
@ -153,7 +153,7 @@ public class CalendarAstronomer {
* Note that julian day numbers and
* the Julian calendar are <em>not</em> the same thing. Also note that
* julian days start at <em>noon</em>, not midnight.
* @stable
* @stable ICU 2.0
*/
public static final long JULIAN_EPOCH_MS = -210866760000000L;
@ -178,7 +178,7 @@ public class CalendarAstronomer {
/**
* Construct a new <code>CalendarAstronomer</code> object that is initialized to
* the current date and time.
* @stable
* @stable ICU 2.0
*/
public CalendarAstronomer() {
this(System.currentTimeMillis());
@ -187,7 +187,7 @@ public class CalendarAstronomer {
/**
* Construct a new <code>CalendarAstronomer</code> object that is initialized to
* the specified date and time.
* @stable
* @stable ICU 2.0
*/
public CalendarAstronomer(Date d) {
this(d.getTime());
@ -199,7 +199,7 @@ public class CalendarAstronomer {
* January 1, 1970 AD (Gregorian).
*
* @see java.util.Date#getTime()
* @stable
* @stable ICU 2.0
*/
public CalendarAstronomer(long aTime) {
time = aTime;
@ -217,7 +217,7 @@ public class CalendarAstronomer {
* values signify North, negative South.
*
* @see java.util.Date#getTime()
* @stable
* @stable ICU 2.0
*/
public CalendarAstronomer(double longitude, double latitude) {
this();
@ -240,7 +240,7 @@ public class CalendarAstronomer {
*
* @see #setDate
* @see #getTime
* @stable
* @stable ICU 2.0
*/
public void setTime(long aTime) {
time = aTime;
@ -255,7 +255,7 @@ public class CalendarAstronomer {
*
* @see #setTime
* @see #getDate
* @stable
* @stable ICU 2.0
*/
public void setDate(Date date) {
setTime(date.getTime());
@ -273,7 +273,7 @@ public class CalendarAstronomer {
*
* @see #getJulianDay
* @see #JULIAN_EPOCH_MS
* @stable
* @stable ICU 2.0
*/
public void setJulianDay(double jdn) {
time = (long)(jdn * DAY_MS) + JULIAN_EPOCH_MS;
@ -288,7 +288,7 @@ public class CalendarAstronomer {
*
* @see #setTime
* @see #getDate
* @stable
* @stable ICU 2.0
*/
public long getTime() {
return time;
@ -300,7 +300,7 @@ public class CalendarAstronomer {
*
* @see #setDate
* @see #getTime
* @stable
* @stable ICU 2.0
*/
public Date getDate() {
return new Date(time);
@ -313,7 +313,7 @@ public class CalendarAstronomer {
*
* @see #setJulianDay
* @see #JULIAN_EPOCH_MS
* @stable
* @stable ICU 2.0
*/
public double getJulianDay() {
if (julianDay == INVALID) {
@ -327,7 +327,7 @@ public class CalendarAstronomer {
* the number of centuries after 1/1/1900 AD, 12:00 GMT
*
* @see #getJulianDay
* @stable
* @stable ICU 2.0
*/
public double getJulianCentury() {
if (julianCentury == INVALID) {
@ -338,7 +338,7 @@ public class CalendarAstronomer {
/**
* Returns the current Greenwich sidereal time, measured in hours
* @stable
* @stable ICU 2.0
*/
public double getGreenwichSidereal() {
if (siderealTime == INVALID) {
@ -364,7 +364,7 @@ public class CalendarAstronomer {
/**
* Returns the current local sidereal time, measured in hours
* @stable
* @stable ICU 2.0
*/
public double getLocalSidereal() {
return normalize(getGreenwichSidereal() + (double)fGmtOffset/HOUR_MS, 24);
@ -402,7 +402,7 @@ public class CalendarAstronomer {
*
* @param ecliptic A point in the sky in ecliptic coordinates.
* @return The corresponding point in equatorial coordinates.
* @stable
* @stable ICU 2.0
*/
public final Equatorial eclipticToEquatorial(Ecliptic ecliptic)
{
@ -416,7 +416,7 @@ public class CalendarAstronomer {
* @param eclipLat The ecliptic latitude
*
* @return The corresponding point in equatorial coordinates.
* @stable
* @stable ICU 2.0
*/
public final Equatorial eclipticToEquatorial(double eclipLong, double eclipLat)
{
@ -444,7 +444,7 @@ public class CalendarAstronomer {
* @param eclipLong The ecliptic longitude
*
* @return The corresponding point in equatorial coordinates.
* @stable
* @stable ICU 2.0
*/
public final Equatorial eclipticToEquatorial(double eclipLong)
{
@ -452,7 +452,7 @@ public class CalendarAstronomer {
}
/**
* @stable
* @stable ICU 2.0
*/
public Horizon eclipticToHorizon(double eclipLong)
{
@ -499,7 +499,7 @@ public class CalendarAstronomer {
* Currently, this method uses an approximation of the two-body Kepler's
* equation for the earth and the sun. It does not take into account the
* perturbations caused by the other planets, the moon, etc.
* @stable
* @stable ICU 2.0
*/
public double getSunLongitude()
{
@ -527,7 +527,7 @@ public class CalendarAstronomer {
/**
* The position of the sun at this object's current date and time,
* in equatorial coordinates.
* @stable
* @stable ICU 2.0
*/
public Equatorial getSunPosition() {
return eclipticToEquatorial(getSunLongitude(), 0);
@ -542,7 +542,7 @@ public class CalendarAstronomer {
* Constant representing the vernal equinox.
* For use with {@link #getSunTime getSunTime}.
* Note: In this case, "vernal" refers to the northern hemisphere's seasons.
* @stable
* @stable ICU 2.0
*/
public static final SolarLongitude VERNAL_EQUINOX = new SolarLongitude(0);
@ -550,7 +550,7 @@ public class CalendarAstronomer {
* Constant representing the summer solstice.
* For use with {@link #getSunTime getSunTime}.
* Note: In this case, "summer" refers to the northern hemisphere's seasons.
* @stable
* @stable ICU 2.0
*/
public static final SolarLongitude SUMMER_SOLSTICE = new SolarLongitude(PI/2);
@ -558,7 +558,7 @@ public class CalendarAstronomer {
* Constant representing the autumnal equinox.
* For use with {@link #getSunTime getSunTime}.
* Note: In this case, "autumn" refers to the northern hemisphere's seasons.
* @stable
* @stable ICU 2.0
*/
public static final SolarLongitude AUTUMN_EQUINOX = new SolarLongitude(PI);
@ -566,14 +566,14 @@ public class CalendarAstronomer {
* Constant representing the winter solstice.
* For use with {@link #getSunTime getSunTime}.
* Note: In this case, "winter" refers to the northern hemisphere's seasons.
* @stable
* @stable ICU 2.0
*/
public static final SolarLongitude WINTER_SOLSTICE = new SolarLongitude((PI*3)/2);
/**
* Find the next time at which the sun's ecliptic longitude will have
* the desired value.
* @stable
* @stable ICU 2.0
*/
public long getSunTime(double desired, boolean next)
{
@ -587,7 +587,7 @@ public class CalendarAstronomer {
/**
* Find the next time at which the sun's ecliptic longitude will have
* the desired value.
* @stable
* @stable ICU 2.0
*/
public long getSunTime(SolarLongitude desired, boolean next) {
return getSunTime(desired.value, next);
@ -596,7 +596,7 @@ public class CalendarAstronomer {
/**
* Returns the time (GMT) of sunrise or sunset on the local date to which
* this calendar is currently set.
* @stable
* @stable ICU 2.0
*/
public long getSunRiseSet(boolean rise)
{
@ -632,7 +632,7 @@ public class CalendarAstronomer {
/**
* The position of the moon at the time set on this
* object, in equatorial coordinates.
* @stable
* @stable ICU 2.0
*/
public Equatorial getMoonPosition()
{
@ -720,7 +720,7 @@ public class CalendarAstronomer {
* measured in radians.
*
* @see #getMoonPhase
* @stable
* @stable ICU 2.0
*/
public double getMoonAge() {
// See page 147 of "Practial Astronomy with your Calculator",
@ -746,7 +746,7 @@ public class CalendarAstronomer {
* </ul>
*
* @see #getMoonAge
* @stable
* @stable ICU 2.0
*/
public double getMoonPhase() {
// See page 147 of "Practial Astronomy with your Calculator",
@ -762,28 +762,28 @@ public class CalendarAstronomer {
/**
* Constant representing a new moon.
* For use with {@link #getMoonTime getMoonTime}
* @stable
* @stable ICU 2.0
*/
public static final MoonAge NEW_MOON = new MoonAge(0);
/**
* Constant representing the moon's first quarter.
* For use with {@link #getMoonTime getMoonTime}
* @stable
* @stable ICU 2.0
*/
public static final MoonAge FIRST_QUARTER = new MoonAge(PI/2);
/**
* Constant representing a full moon.
* For use with {@link #getMoonTime getMoonTime}
* @stable
* @stable ICU 2.0
*/
public static final MoonAge FULL_MOON = new MoonAge(PI);
/**
* Constant representing the moon's last quarter.
* For use with {@link #getMoonTime getMoonTime}
* @stable
* @stable ICU 2.0
*/
public static final MoonAge LAST_QUARTER = new MoonAge((PI*3)/2);
@ -794,7 +794,7 @@ public class CalendarAstronomer {
* @param desired The desired longitude.
* @param next <tt>true</tt> if the next occurrance of the phase
* is desired, <tt>false</tt> for the previous occurrance.
* @stable
* @stable ICU 2.0
*/
public long getMoonTime(double desired, boolean next)
{
@ -813,7 +813,7 @@ public class CalendarAstronomer {
* @param desired The desired phase of the moon.
* @param next <tt>true</tt> if the next occurrance of the phase
* is desired, <tt>false</tt> for the previous occurrance.
* @stable
* @stable ICU 2.0
*/
public long getMoonTime(MoonAge desired, boolean next) {
return getMoonTime(desired.value, next);
@ -822,7 +822,7 @@ public class CalendarAstronomer {
/**
* Returns the time (GMT) of sunrise or sunset on the local date to which
* this calendar is currently set.
* @stable
* @stable ICU 2.0
*/
public long getMoonRiseSet(boolean rise)
{
@ -1096,7 +1096,7 @@ public class CalendarAstronomer {
}
/**
* @stable
* @stable ICU 2.0
*/
public String local(long localMillis) {
return new Date(localMillis - TimeZone.getDefault().getRawOffset()).toString();
@ -1118,7 +1118,7 @@ public class CalendarAstronomer {
*
* @see CalendarAstronomer.Equatorial
* @see CalendarAstronomer.Horizon
* @stable
* @stable ICU 2.0
*/
public static final class Ecliptic {
/**
@ -1126,7 +1126,7 @@ public class CalendarAstronomer {
* <p>
* @param lat The ecliptic latitude, measured in radians.
* @param lon The ecliptic longitude, measured in radians.
* @stable
* @stable ICU 2.0
*/
public Ecliptic(double lat, double lon) {
latitude = lat;
@ -1135,7 +1135,7 @@ public class CalendarAstronomer {
/**
* Return a string representation of this object
* @stable
* @stable ICU 2.0
*/
public String toString() {
return Double.toString(longitude*RAD_DEG) + "," + (latitude*RAD_DEG);
@ -1145,7 +1145,7 @@ public class CalendarAstronomer {
* The ecliptic latitude, in radians. This specifies an object's
* position north or south of the plane of the ecliptic,
* with positive angles representing north.
* @stable
* @stable ICU 2.0
*/
public final double latitude;
@ -1158,7 +1158,7 @@ public class CalendarAstronomer {
* <p>
* A bit of trivia: the first point of Aries is currently in the
* constellation Pisces, due to the precession of the earth's axis.
* @stable
* @stable ICU 2.0
*/
public final double longitude;
};
@ -1177,7 +1177,7 @@ public class CalendarAstronomer {
*
* @see CalendarAstronomer.Ecliptic
* @see CalendarAstronomer.Horizon
* @stable
* @stable ICU 2.0
*/
public static final class Equatorial {
/**
@ -1185,7 +1185,7 @@ public class CalendarAstronomer {
* <p>
* @param asc The right ascension, measured in radians.
* @param dec The declination, measured in radians.
* @stable
* @stable ICU 2.0
*/
public Equatorial(double asc, double dec) {
ascension = asc;
@ -1195,7 +1195,7 @@ public class CalendarAstronomer {
/**
* Return a string representation of this object, with the
* angles measured in degrees.
* @stable
* @stable ICU 2.0
*/
public String toString() {
return Double.toString(ascension*RAD_DEG) + "," + (declination*RAD_DEG);
@ -1204,7 +1204,7 @@ public class CalendarAstronomer {
/**
* Return a string representation of this object with the right ascension
* measured in hours, minutes, and seconds.
* @stable
* @stable ICU 2.0
*/
public String toHmsString() {
return radToHms(ascension) + "," + radToDms(declination);
@ -1215,7 +1215,7 @@ public class CalendarAstronomer {
* This is the position east or west along the equator
* relative to the sun's position at the vernal equinox,
* with positive angles representing East.
* @stable
* @stable ICU 2.0
*/
public final double ascension;
@ -1223,7 +1223,7 @@ public class CalendarAstronomer {
* The declination, in radians.
* This is the position north or south of the equatorial plane,
* with positive angles representing north.
* @stable
* @stable ICU 2.0
*/
public final double declination;
};
@ -1243,7 +1243,7 @@ public class CalendarAstronomer {
*
* @see CalendarAstronomer.Ecliptic
* @see CalendarAstronomer.Equatorial
* @stable
* @stable ICU 2.0
*/
public static final class Horizon {
/**
@ -1251,7 +1251,7 @@ public class CalendarAstronomer {
* <p>
* @param alt The altitude, measured in radians above the horizon.
* @param azim The azimuth, measured in radians clockwise from north.
* @stable
* @stable ICU 2.0
*/
public Horizon(double alt, double azim) {
altitude = alt;
@ -1261,7 +1261,7 @@ public class CalendarAstronomer {
/**
* Return a string representation of this object, with the
* angles measured in degrees.
* @stable
* @stable ICU 2.0
*/
public String toString() {
return Double.toString(altitude*RAD_DEG) + "," + (azimuth*RAD_DEG);
@ -1269,13 +1269,13 @@ public class CalendarAstronomer {
/**
* The object's altitude above the horizon, in radians.
* @stable
* @stable ICU 2.0
*/
public final double altitude;
/**
* The object's direction, in radians clockwise from north.
* @stable
* @stable ICU 2.0
*/
public final double azimuth;
};

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/CaseInsensitiveString.java,v $
* $Date: 2002/12/03 22:04:17 $
* $Revision: 1.4 $
* $Date: 2002/12/05 01:25:12 $
* $Revision: 1.5 $
*
*******************************************************************************
*/
@ -18,7 +18,7 @@ import com.ibm.icu.lang.UCharacter;
* A string used as a key in java.util.Hashtable and other
* collections. It retains case information, but its equals() and
* hashCode() methods ignore case.
* @stable
* @stable ICU 2.0
*/
public class CaseInsensitiveString {
@ -28,7 +28,7 @@ public class CaseInsensitiveString {
/**
* Constructs an CaseInsentiveString object from the given string
* @param s The string to construct this object from
* @stable
* @stable ICU 2.0
*/
public CaseInsensitiveString(String s) {
string = s;
@ -36,7 +36,7 @@ public class CaseInsensitiveString {
/**
* returns the underlying string
* @return String
* @stable
* @stable ICU 2.0
*/
public String getString() {
return string;
@ -44,7 +44,7 @@ public class CaseInsensitiveString {
/**
* Compare the object with this
* @param o Object to compare this object with
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object o) {
try {
@ -61,7 +61,7 @@ public class CaseInsensitiveString {
/**
* Returns the hashCode of this object
* @return int hashcode
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
if (hash == 0) {

View file

@ -3,8 +3,8 @@
* others. All Rights Reserved.
*********************************************************************
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/ChineseCalendar.java,v $
* $Date: 2002/12/04 01:03:39 $
* $Revision: 1.12 $
* $Date: 2002/12/05 01:25:14 $
* $Revision: 1.13 $
*/
package com.ibm.icu.util;
import com.ibm.icu.lang.*;
@ -70,7 +70,7 @@ import java.util.Locale;
* </ul>
* @see com.ibm.icu.text.ChineseDateFormat
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class ChineseCalendar extends Calendar {
@ -122,7 +122,7 @@ public class ChineseCalendar extends Calendar {
/**
* Construct a Chinese calendar with the default time zone and locale.
* @stable
* @stable ICU 2.0
*/
public ChineseCalendar() {
super();
@ -132,7 +132,7 @@ 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
* @stable
* @stable ICU 2.0
*/
public ChineseCalendar(TimeZone zone, Locale locale) {
super(zone, locale);
@ -145,7 +145,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public static int IS_LEAP_MONTH = BASE_FIELD_COUNT;
@ -160,7 +160,7 @@ public class ChineseCalendar extends Calendar {
/**
* Override Calendar to allocate our additional field.
* @stable
* @stable ICU 2.0
*/
protected int[] handleCreateFields() {
return new int[FIELD_COUNT];
@ -232,7 +232,7 @@ public class ChineseCalendar extends Calendar {
/**
* Override Calendar to return the limit value for the given field.
* @stable
* @stable ICU 2.0
*/
protected int handleGetLimit(int field, int limitType) {
return LIMITS[field][limitType];
@ -243,7 +243,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected int handleGetExtendedYear() {
int year;
@ -262,7 +262,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected int handleGetMonthLength(int extendedYear, int month) {
int thisStart = handleComputeMonthStart(extendedYear, month, true) -
@ -276,7 +276,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected DateFormat handleGetDateFormat(String pattern, Locale locale) {
return new ChineseDateFormat(pattern, locale);
@ -309,7 +309,7 @@ public class ChineseCalendar extends Calendar {
/**
* Override Calendar to add IS_LEAP_MONTH to the field resolution
* table.
* @stable
* @stable ICU 2.0
*/
protected int[][][] getFieldResolutionTable() {
return CHINESE_DATE_PRECEDENCE;
@ -355,7 +355,7 @@ public class ChineseCalendar extends Calendar {
/**
* Override Calendar to handle leap months properly.
* @stable
* @stable ICU 2.0
*/
public void add(int field, int amount) {
switch (field) {
@ -375,7 +375,7 @@ public class ChineseCalendar extends Calendar {
/**
* Override Calendar to handle leap months properly.
* @stable
* @stable ICU 2.0
*/
public void roll(int field, int amount) {
switch (field) {
@ -616,7 +616,7 @@ public class ChineseCalendar extends Calendar {
* calendar equivalents for the given Julian day.
*
* <p>Compute the ChineseCalendar-specific field IS_LEAP_MONTH.
* @stable
* @stable ICU 2.0
*/
protected void handleComputeFields(int julianDay) {
@ -757,7 +757,7 @@ public class ChineseCalendar extends Calendar {
* by reading the IS_LEAP_MONTH field.
* @param return the Julian day number of the day before the first
* day of the given month and year
* @stable
* @stable ICU 2.0
*/
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {

View file

@ -161,7 +161,7 @@ import java.util.Locale;
* @see Calendar
* @see TimeZone
* @author David Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu
* @stable
* @stable ICU 2.0
*/
public class GregorianCalendar extends Calendar {
/*
@ -206,7 +206,7 @@ public class GregorianCalendar extends Calendar {
* The sequence of years at the transition from <code>BC</code> to <code>AD</code> is
* ..., 2 BC, 1 BC, 1 AD, 2 AD,...
* @see Calendar#ERA
* @stable
* @stable ICU 2.0
*/
public static final int BC = 0;
@ -216,7 +216,7 @@ public class GregorianCalendar extends Calendar {
* The sequence of years at the transition from <code>BC</code> to <code>AD</code> is
* ..., 2 BC, 1 BC, 1 AD, 2 AD,...
* @see Calendar#ERA
* @stable
* @stable ICU 2.0
*/
public static final int AD = 1;
@ -273,7 +273,7 @@ public class GregorianCalendar extends Calendar {
};
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetLimit(int field, int limitType) {
return LIMITS[field][limitType];
@ -306,13 +306,13 @@ public class GregorianCalendar extends Calendar {
/**
* Used by handleComputeJulianDay() and handleComputeMonthStart().
* @stable
* @stable ICU 2.0
*/
transient protected boolean isGregorian;
/**
* Used by handleComputeJulianDay() and handleComputeMonthStart().
* @stable
* @stable ICU 2.0
*/
transient protected boolean invertGregorian;
@ -323,7 +323,7 @@ public class GregorianCalendar extends Calendar {
/**
* Constructs a default GregorianCalendar using the current time
* in the default time zone with the default locale.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar() {
this(TimeZone.getDefault(), Locale.getDefault());
@ -333,7 +333,7 @@ public class GregorianCalendar extends Calendar {
* Constructs a GregorianCalendar based on the current time
* in the given time zone with the default locale.
* @param zone the given time zone.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar(TimeZone zone) {
this(zone, Locale.getDefault());
@ -343,7 +343,7 @@ public class GregorianCalendar extends Calendar {
* Constructs a GregorianCalendar based on the current time
* in the default time zone with the given locale.
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar(Locale aLocale) {
this(TimeZone.getDefault(), aLocale);
@ -354,7 +354,7 @@ public class GregorianCalendar extends Calendar {
* in the given time zone with the given locale.
* @param zone the given time zone.
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar(TimeZone zone, Locale aLocale) {
super(zone, aLocale);
@ -368,7 +368,7 @@ public class GregorianCalendar extends Calendar {
* @param month the value used to set the MONTH time field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param date the value used to set the DATE time field in the calendar.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar(int year, int month, int date) {
super(TimeZone.getDefault(), Locale.getDefault());
@ -389,7 +389,7 @@ public class GregorianCalendar extends Calendar {
* in the calendar.
* @param minute the value used to set the MINUTE time field
* in the calendar.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar(int year, int month, int date, int hour,
int minute) {
@ -415,7 +415,7 @@ public class GregorianCalendar extends Calendar {
* in the calendar.
* @param second the value used to set the SECOND time field
* in the calendar.
* @stable
* @stable ICU 2.0
*/
public GregorianCalendar(int year, int month, int date, int hour,
int minute, int second) {
@ -443,7 +443,7 @@ public class GregorianCalendar extends Calendar {
* set the change date to <code>Date(Long.MIN_VALUE)</code>.
*
* @param date the given Gregorian cutover date.
* @stable
* @stable ICU 2.0
*/
public void setGregorianChange(Date date) {
gregorianCutover = date.getTime();
@ -474,7 +474,7 @@ public class GregorianCalendar extends Calendar {
* October 15, 1582. Previous to this, dates will be in the Julian
* calendar.
* @return the Gregorian cutover date for this calendar.
* @stable
* @stable ICU 2.0
*/
public final Date getGregorianChange() {
return new Date(gregorianCutover);
@ -485,7 +485,7 @@ public class GregorianCalendar extends Calendar {
* given year is a leap year.
* @param year the given year.
* @return true if the given year is a leap year; false otherwise.
* @stable
* @stable ICU 2.0
*/
public boolean isLeapYear(int year) {
return year >= gregorianCutoverYear ?
@ -508,7 +508,7 @@ public class GregorianCalendar extends Calendar {
/**
* Override hashCode.
* Generates the hash code for the GregorianCalendar object
* @stable
* @stable ICU 2.0
*/
public int hashCode() {
return super.hashCode() ^ (int)gregorianCutover;
@ -522,7 +522,7 @@ public class GregorianCalendar extends Calendar {
* @param field the time field.
* @param amount the amount of date or time to be added to the field.
* @exception IllegalArgumentException if an unknown field is given.
* @stable
* @stable ICU 2.0
*/
public void add(int field, int amount) {
switch (field) {
@ -546,7 +546,7 @@ public class GregorianCalendar extends Calendar {
/**
* Roll a field by a signed amount.
* @stable
* @stable ICU 2.0
*/
public void roll(int field, int amount) {
@ -615,7 +615,7 @@ public class GregorianCalendar extends Calendar {
/**
* Return the minimum value that this field could have, given the current date.
* For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum().
* @stable
* @stable ICU 2.0
*/
public int getActualMinimum(int field) {
return getMinimum(field);
@ -626,7 +626,7 @@ public class GregorianCalendar extends Calendar {
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
* maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar,
* for some years the actual maximum for MONTH is 12, and for others 13.
* @stable
* @stable ICU 2.0
*/
public int getActualMaximum(int field) {
/* It is a known limitation that the code here (and in getActualMinimum)
@ -724,14 +724,14 @@ public class GregorianCalendar extends Calendar {
/////////////////////
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetMonthLength(int extendedYear, int month) {
return MONTH_COUNT[month][isLeapYear(extendedYear)?1:0];
}
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetYearLength(int eyear) {
return isLeapYear(eyear) ? 366 : 365;
@ -751,7 +751,7 @@ public class GregorianCalendar extends Calendar {
* <li>DAY_OF_MONTH
* <li>DAY_OF_YEAR
* <li>EXTENDED_YEAR</ul>
* @stable
* @stable ICU 2.0
*/
protected void handleComputeFields(int julianDay) {
int eyear, month, dayOfMonth, dayOfYear;
@ -807,7 +807,7 @@ public class GregorianCalendar extends Calendar {
/////////////////////////////
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetExtendedYear() {
int year;
@ -833,7 +833,7 @@ public class GregorianCalendar extends Calendar {
* @param millis milliseconds of the date fields
* @param millisInDay milliseconds of the time fields; may be out
* or range.
* @stable
* @stable ICU 2.0
*/
protected int computeZoneOffset(long millis, int millisInDay) {
@ -878,7 +878,7 @@ public class GregorianCalendar extends Calendar {
}
/**
* @stable
* @stable ICU 2.0
*/
protected int handleComputeJulianDay(int bestField) {
@ -898,7 +898,7 @@ public class GregorianCalendar extends Calendar {
/**
* Return JD of start of given month/year
* @stable
* @stable ICU 2.0
*/
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/HebrewCalendar.java,v $
* $Date: 2002/12/04 16:38:52 $
* $Revision: 1.12 $
* $Date: 2002/12/05 01:25:25 $
* $Revision: 1.13 $
*
*****************************************************************************************
*/
@ -65,7 +65,7 @@ import java.util.Locale;
*
* @author Laura Werner
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class HebrewCalendar extends Calendar {
@ -78,31 +78,31 @@ public class HebrewCalendar extends Calendar {
/**
* Constant for Tishri, the 1st month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int TISHRI = 0;
/**
* Constant for Heshvan, the 2nd month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int HESHVAN = 1;
/**
* Constant for Kislev, the 3rd month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int KISLEV = 2;
/**
* Constant for Tevet, the 4th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int TEVET = 3;
/**
* Constant for Shevat, the 5th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int SHEVAT = 4;
@ -110,49 +110,49 @@ 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).
* @stable
* @stable ICU 2.0
*/
public static final int ADAR_1 = 5;
/**
* Constant for the Adar, the 7th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int ADAR = 6;
/**
* Constant for Nisan, the 8th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int NISAN = 7;
/**
* Constant for Iyar, the 9th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int IYAR = 8;
/**
* Constant for Sivan, the 10th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int SIVAN = 9;
/**
* Constant for Tammuz, the 11th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int TAMUZ = 10;
/**
* Constant for Av, the 12th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int AV = 11;
/**
* Constant for Elul, the 13th month of the Hebrew year.
* @stable
* @stable ICU 2.0
*/
public static final int ELUL = 12;
@ -272,7 +272,7 @@ public class HebrewCalendar extends Calendar {
/**
* Constructs a default <code>HebrewCalendar</code> using the current time
* in the default time zone with the default locale.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar() {
this(TimeZone.getDefault(), Locale.getDefault());
@ -283,7 +283,7 @@ public class HebrewCalendar extends Calendar {
* in the given time zone with the default locale.
*
* @param zone The time zone for the new calendar.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar(TimeZone zone) {
this(zone, Locale.getDefault());
@ -294,7 +294,7 @@ public class HebrewCalendar extends Calendar {
* in the default time zone with the given locale.
*
* @param aLocale The locale for the new calendar.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar(Locale aLocale) {
this(TimeZone.getDefault(), aLocale);
@ -307,7 +307,7 @@ public class HebrewCalendar extends Calendar {
* @param zone The time zone for the new calendar.
*
* @param aLocale The locale for the new calendar.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar(TimeZone zone, Locale aLocale) {
super(zone, aLocale);
@ -324,7 +324,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar(int year, int month, int date) {
super(TimeZone.getDefault(), Locale.getDefault());
@ -338,7 +338,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar(Date date) {
super(TimeZone.getDefault(), Locale.getDefault());
@ -361,7 +361,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public HebrewCalendar(int year, int month, int date, int hour,
int minute, int second)
@ -407,7 +407,7 @@ public class HebrewCalendar extends Calendar {
*
* @exception IllegalArgumentException if the field is invalid or refers
* to a field that cannot be handled by this method.
* @stable
* @stable ICU 2.0
*/
public void add(int field, int amount)
{
@ -511,7 +511,7 @@ public class HebrewCalendar extends Calendar {
*
* @exception IllegalArgumentException if the field is invalid or refers
* to a field that cannot be handled by this method.
* @stable
* @stable ICU 2.0
*/
public void roll(int field, int amount)
{
@ -683,7 +683,7 @@ public class HebrewCalendar extends Calendar {
//-------------------------------------------------------------------------
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetLimit(int field, int limitType) {
return LIMITS[field][limitType];
@ -691,7 +691,7 @@ public class HebrewCalendar extends Calendar {
/**
* Returns the length of the given month in the given year
* @stable
* @stable ICU 2.0
*/
protected int handleGetMonthLength(int extendedYear, int month) {
@ -709,7 +709,7 @@ public class HebrewCalendar extends Calendar {
/**
* Returns the number of days in the given Hebrew year
* @stable
* @stable ICU 2.0
*/
protected int handleGetYearLength(int eyear) {
return (int)(startOfYear(eyear+1) - startOfYear(eyear));
@ -738,7 +738,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected void handleComputeFields(int julianDay) {
long d = julianDay - 347997;
@ -778,7 +778,7 @@ public class HebrewCalendar extends Calendar {
//-------------------------------------------------------------------------
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetExtendedYear() {
int year;
@ -792,7 +792,7 @@ public class HebrewCalendar extends Calendar {
/**
* Return JD of start of given month/year.
* @stable
* @stable ICU 2.0
*/
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/IslamicCalendar.java,v $
* $Date: 2002/12/04 16:38:52 $
* $Revision: 1.14 $
* $Date: 2002/12/05 01:25:34 $
* $Revision: 1.15 $
*
*****************************************************************************************
*/
@ -72,7 +72,7 @@ import com.ibm.icu.util.CalendarAstronomer;
*
* @author Laura Werner
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class IslamicCalendar extends Calendar {
@ -84,73 +84,73 @@ public class IslamicCalendar extends Calendar {
/**
* Constant for Muharram, the 1st month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int MUHARRAM = 0;
/**
* Constant for Safar, the 2nd month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int SAFAR = 1;
/**
* Constant for Rabi' al-awwal (or Rabi' I), the 3rd month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int RABI_1 = 2;
/**
* Constant for Rabi' al-thani or (Rabi' II), the 4th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int RABI_2 = 3;
/**
* Constant for Jumada al-awwal or (Jumada I), the 5th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int JUMADA_1 = 4;
/**
* Constant for Jumada al-thani or (Jumada II), the 6th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int JUMADA_2 = 5;
/**
* Constant for Rajab, the 7th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int RAJAB = 6;
/**
* Constant for Sha'ban, the 8th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int SHABAN = 7;
/**
* Constant for Ramadan, the 9th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int RAMADAN = 8;
/**
* Constant for Shawwal, the 10th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int SHAWWAL = 9;
/**
* Constant for Dhu al-Qi'dah, the 11th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int DHU_AL_QIDAH = 10;
/**
* Constant for Dhu al-Hijjah, the 12th month of the Islamic year.
* @stable
* @stable ICU 2.0
*/
public static final int DHU_AL_HIJJAH = 11;
@ -164,7 +164,7 @@ public class IslamicCalendar extends Calendar {
/**
* Constructs a default <code>IslamicCalendar</code> using the current time
* in the default time zone with the default locale.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar()
{
@ -175,7 +175,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar(TimeZone zone)
{
@ -187,7 +187,7 @@ public class IslamicCalendar extends Calendar {
* in the default time zone with the given locale.
*
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar(Locale aLocale)
{
@ -200,7 +200,7 @@ public class IslamicCalendar extends Calendar {
*
* @param zone the given time zone.
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar(TimeZone zone, Locale aLocale)
{
@ -213,7 +213,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar(Date date) {
super(TimeZone.getDefault(), Locale.getDefault());
@ -228,7 +228,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar(int year, int month, int date)
{
@ -252,7 +252,7 @@ public class IslamicCalendar extends Calendar {
* in the calendar.
* @param second the value used to set the {@link #SECOND SECOND} time field
* in the calendar.
* @stable
* @stable ICU 2.0
*/
public IslamicCalendar(int year, int month, int date, int hour,
int minute, int second)
@ -272,7 +272,7 @@ public class IslamicCalendar extends Calendar {
*
* @param beCivil <code>true</code> to use the civil calendar,
* <code>false</code> to use the astronomical calendar.
* @stable
* @stable ICU 2.0
*/
public void setCivil(boolean beCivil)
{
@ -290,7 +290,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public boolean isCivil() {
return civil;
@ -328,7 +328,7 @@ public class IslamicCalendar extends Calendar {
};
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetLimit(int field, int limitType) {
return LIMITS[field][limitType];
@ -489,7 +489,7 @@ public class IslamicCalendar extends Calendar {
*
* @param year The hijri year
* @param year The hijri month, 0-based
* @stable
* @stable ICU 2.0
*/
protected int handleGetMonthLength(int extendedYear, int month) {
@ -509,7 +509,7 @@ public class IslamicCalendar extends Calendar {
/**
* Return the number of days in the given Islamic year
* @stable
* @stable ICU 2.0
*/
protected int handleGetYearLength(int extendedYear) {
if (civil) {
@ -526,7 +526,7 @@ public class IslamicCalendar extends Calendar {
// Return JD of start of given month/year
/**
* @stable
* @stable ICU 2.0
*/
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
return (int) monthStart(eyear, month) + 1948439;
@ -537,7 +537,7 @@ public class IslamicCalendar extends Calendar {
//-------------------------------------------------------------------------
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetExtendedYear() {
int year;
@ -563,7 +563,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected void handleComputeFields(int julianDay) {
int year, month, dayOfMonth, dayOfYear;

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/JapaneseCalendar.java,v $
* $Date: 2002/12/04 16:38:52 $
* $Revision: 1.11 $
* $Date: 2002/12/05 01:25:38 $
* $Revision: 1.12 $
*
*****************************************************************************************
*/
@ -44,7 +44,7 @@ import java.util.Locale;
*
* @author Laura Werner
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class JapaneseCalendar extends GregorianCalendar {
@ -57,7 +57,7 @@ public class JapaneseCalendar extends GregorianCalendar {
/**
* Constructs a default <code>JapaneseCalendar</code> using the current time
* in the default time zone with the default locale.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar() {
super();
@ -67,7 +67,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(TimeZone zone) {
super(zone);
@ -77,7 +77,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(Locale aLocale) {
super(aLocale);
@ -90,7 +90,7 @@ public class JapaneseCalendar extends GregorianCalendar {
* @param zone the given time zone.
*
* @param aLocale the given locale.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(TimeZone zone, Locale aLocale) {
super(zone, aLocale);
@ -101,7 +101,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(Date date) {
this();
@ -128,7 +128,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(int era, int year, int month, int date) {
super(year, month, date);
@ -147,7 +147,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(int year, int month, int date) {
super(year, month, date);
@ -172,7 +172,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
public JapaneseCalendar(int year, int month, int date, int hour,
int minute, int second)
@ -184,7 +184,7 @@ public class JapaneseCalendar extends GregorianCalendar {
//-------------------------------------------------------------------------
/**
* @stable
* @stable ICU 2.0
*/
protected int handleGetExtendedYear() {
int year;
@ -200,7 +200,7 @@ public class JapaneseCalendar extends GregorianCalendar {
}
/**
* @stable
* @stable ICU 2.0
*/
protected void handleComputeFields(int julianDay) {
super.handleComputeFields(julianDay);
@ -495,31 +495,31 @@ public class JapaneseCalendar extends GregorianCalendar {
// Constant for the current era. This must be regularly updated.
/**
* @stable
* @stable ICU 2.0
*/
static public final int CURRENT_ERA = (ERAS.length / 3) - 1;
/**
* Constant for the era starting on Sept. 8, 1868 AD.
* @stable
* @stable ICU 2.0
*/
static public final int MEIJI = CURRENT_ERA - 3;
/**
* Constant for the era starting on July 30, 1912 AD.
* @stable
* @stable ICU 2.0
*/
static public final int TAISHO = CURRENT_ERA - 2;
/**
* Constant for the era starting on Dec. 25, 1926 AD.
* @stable
* @stable ICU 2.0
*/
static public final int SHOWA = CURRENT_ERA - 1;
/**
* Constant for the era starting on Jan. 7, 1989 AD.
* @stable
* @stable ICU 2.0
*/
static public final int HEISEI = CURRENT_ERA;
@ -540,7 +540,7 @@ 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.
* @stable
* @stable ICU 2.0
*/
protected int handleGetLimit(int field, int limitType) {
switch (field) {

View file

@ -25,7 +25,7 @@ import java.util.Date;
* @see GregorianCalendar
* @see TimeZone
* @author David Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu
* @stable
* @stable ICU 2.0
*/
public class SimpleTimeZone extends TimeZone {
/**
@ -37,7 +37,7 @@ public class SimpleTimeZone extends TimeZone {
* @param rawOffset The given base time zone offset to GMT.
* @param ID The time zone ID which is obtained from
* TimeZone.getAvailableIDs.
* @stable
* @stable ICU 2.0
*/
public SimpleTimeZone(int rawOffset, String ID)
{
@ -102,7 +102,7 @@ public class SimpleTimeZone extends TimeZone {
* member description for an example.
* @exception IllegalArgumentException the month, day, dayOfWeek, or time
* parameters are out of range for the start or end rule
* @stable
* @stable ICU 2.0
*/
public SimpleTimeZone(int rawOffset, String ID,
int startMonth, int startDay, int startDayOfWeek, int startTime,
@ -120,7 +120,7 @@ public class SimpleTimeZone extends TimeZone {
* @param dstSavings The amount of time in ms saved during DST.
* @exception IllegalArgumentException the month, day, dayOfWeek, or time
* parameters are out of range for the start or end rule
* @stable
* @stable ICU 2.0
*/
public SimpleTimeZone(int rawOffset, String ID,
int startMonth, int startDay, int startDayOfWeek, int startTime,
@ -194,7 +194,7 @@ public class SimpleTimeZone extends TimeZone {
* Sets the daylight savings starting year.
*
* @param year The daylight savings starting year.
* @stable
* @stable ICU 2.0
*/
public void setStartYear(int year)
{
@ -220,7 +220,7 @@ public class SimpleTimeZone extends TimeZone {
* the member description for an example.
* @exception IllegalArgumentException the month, dayOfWeekInMonth,
* dayOfWeek, or time parameters are out of range
* @stable
* @stable ICU 2.0
*/
public void setStartRule(int month, int dayOfWeekInMonth, int dayOfWeek,
int time)
@ -244,7 +244,7 @@ public class SimpleTimeZone extends TimeZone {
* standard time in this case.
* @exception IllegalArgumentException the month,
* dayOfMonth, or time parameters are out of range
* @stable
* @stable ICU 2.0
*/
public void setStartRule(int month, int dayOfMonth, int time) {
setStartRule(month, dayOfMonth, 0, time);
@ -265,7 +265,7 @@ public class SimpleTimeZone extends TimeZone {
* the last dayOfWeek on or before dayOfMonth.
* @exception IllegalArgumentException the month, dayOfMonth,
* dayOfWeek, or time parameters are out of range
* @stable
* @stable ICU 2.0
*/
public void setStartRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after)
{
@ -293,7 +293,7 @@ public class SimpleTimeZone extends TimeZone {
* member description for an example.
* @exception IllegalArgumentException the month, dayOfWeekInMonth,
* dayOfWeek, or time parameters are out of range
* @stable
* @stable ICU 2.0
*/
public void setEndRule(int month, int dayOfWeekInMonth, int dayOfWeek,
int time)
@ -317,7 +317,7 @@ public class SimpleTimeZone extends TimeZone {
* time in this case.
* @exception IllegalArgumentException the month,
* dayOfMonth, or time parameters are out of range
* @stable
* @stable ICU 2.0
*/
public void setEndRule(int month, int dayOfMonth, int time)
{
@ -339,7 +339,7 @@ public class SimpleTimeZone extends TimeZone {
* the last dayOfWeek on or before dayOfMonth.
* @exception IllegalArgumentException the month, dayOfMonth,
* dayOfWeek, or time parameters are out of range
* @stable
* @stable ICU 2.0
*/
public void setEndRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after)
{
@ -373,7 +373,7 @@ public class SimpleTimeZone extends TimeZone {
* @return The milliseconds to add to UTC to get local time.
* @exception IllegalArgumentException the era, month, day,
* dayOfWeek, or millis parameters are out of range
* @stable
* @stable ICU 2.0
*/
public int getOffset(int era, int year, int month, int day, int dayOfWeek,
int millis)
@ -616,7 +616,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Overrides TimeZone
* Gets the GMT offset for this time zone.
* @stable
* @stable ICU 2.0
*/
public int getRawOffset()
{
@ -630,7 +630,7 @@ public class SimpleTimeZone extends TimeZone {
* Sets the base time zone offset to GMT.
* This is the offset to add *to* UTC to get local time.
* Please see TimeZone.setRawOffset for descriptions on the parameter.
* @stable
* @stable ICU 2.0
*/
public void setRawOffset(int offsetMillis)
{
@ -642,7 +642,7 @@ public class SimpleTimeZone extends TimeZone {
* @param millisSavedDuringDST the number of milliseconds the time is
* advanced with respect to standard time when the daylight savings rules
* are in effect. A positive number, typically one hour (3600000).
* @stable
* @stable ICU 2.0
*/
public void setDSTSavings(int millisSavedDuringDST) {
if (millisSavedDuringDST <= 0) {
@ -656,7 +656,7 @@ public class SimpleTimeZone extends TimeZone {
* @return the number of milliseconds the time is
* advanced with respect to standard time when the daylight savings rules
* are in effect. A positive number, typically one hour (3600000).
* @stable
* @stable ICU 2.0
*/
public int getDSTSavings() {
return dstSavings;
@ -665,7 +665,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Overrides TimeZone
* Queries if this time zone uses Daylight Savings Time.
* @stable
* @stable ICU 2.0
*/
public boolean useDaylightTime()
{
@ -675,7 +675,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Overrides TimeZone
* Queries if the given date is in Daylight Savings Time.
* @stable
* @stable ICU 2.0
*/
public boolean inDaylightTime(Date date)
{
@ -686,7 +686,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone()
{
@ -697,7 +697,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Override hashCode.
* Generates the hash code for the SimpleDateFormat object
* @stable
* @stable ICU 2.0
*/
public synchronized int hashCode()
{
@ -711,7 +711,7 @@ public class SimpleTimeZone extends TimeZone {
* @param obj The SimpleTimeZone object to be compared with.
* @return True if the given obj is the same as this SimpleTimeZone
* object; false otherwise.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj)
{
@ -730,7 +730,7 @@ public class SimpleTimeZone extends TimeZone {
* Return true if this zone has the same rules and offset as another zone.
* @param other the TimeZone object to be compared with
* @return true if the given zone has the same rules and offset as this one
* @stable
* @stable ICU 2.0
*/
public boolean hasSameRules(TimeZone other) {
if (this == other) return true;
@ -759,7 +759,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Return a string representation of this time zone.
* @return a string representation of this time zone.
* @stable
* @stable ICU 2.0
*/
public String toString() {
return getClass().getName() +

View file

@ -2,8 +2,8 @@
* others. All Rights Reserved.
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/Attic/SimpleTimeZoneAdapter.java,v $
* $Date: 2002/12/03 18:56:15 $
* $Revision: 1.3 $
* $Date: 2002/12/05 01:25:49 $
* $Revision: 1.4 $
*/
package com.ibm.icu.util;
import java.util.Date;
@ -32,7 +32,7 @@ import java.util.Date;
*
* @see com.ibm.icu.util.TimeZone#setDefault
* @author Alan Liu
* @stable
* @stable ICU 2.0
*/
public class SimpleTimeZoneAdapter extends java.util.TimeZone {
@ -44,7 +44,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Constructs an adapter for a SimpleTimeZone object.
* @stable
* @stable ICU 2.0
*/
public SimpleTimeZoneAdapter(SimpleTimeZone zone) {
this.zone = zone;
@ -52,7 +52,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Override TimeZone
* @stable
* @stable ICU 2.0
*/
public String getID() {
return zone.getID();
@ -60,7 +60,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Override TimeZone
* @stable
* @stable ICU 2.0
*/
public void setID(String ID) {
zone.setID(ID);
@ -68,7 +68,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Override TimeZone
* @stable
* @stable ICU 2.0
*/
public boolean hasSameRules(java.util.TimeZone other) {
return other instanceof SimpleTimeZoneAdapter &&
@ -77,7 +77,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Override TimeZone
* @stable
* @stable ICU 2.0
*/
public int getOffset(int era, int year, int month, int day, int dayOfWeek,
int millis) {
@ -101,7 +101,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Overrides TimeZone
* Gets the GMT offset for this time zone.
* @stable
* @stable ICU 2.0
*/
public int getRawOffset() {
return zone.getRawOffset();
@ -109,7 +109,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Overrides TimeZone
* @stable
* @stable ICU 2.0
*/
public void setRawOffset(int offsetMillis) {
zone.setRawOffset(offsetMillis);
@ -117,7 +117,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Overrides TimeZone
* @stable
* @stable ICU 2.0
*/
public boolean useDaylightTime() {
return zone.useDaylightTime();
@ -125,7 +125,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Overrides TimeZone
* @stable
* @stable ICU 2.0
*/
public boolean inDaylightTime(Date date) {
return zone.inDaylightTime(date);
@ -133,7 +133,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone() {
return new SimpleTimeZoneAdapter((SimpleTimeZone)zone.clone());
@ -141,7 +141,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Override hashCode.
* @stable
* @stable ICU 2.0
*/
public synchronized int hashCode() {
return zone.hashCode();
@ -153,7 +153,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
* @param obj The SimpleTimeZone object to be compared with.
* @return True if the given obj is the same as this SimpleTimeZone
* object; false otherwise.
* @stable
* @stable ICU 2.0
*/
public boolean equals(Object obj) {
if (obj instanceof SimpleTimeZoneAdapter) {
@ -165,7 +165,7 @@ public class SimpleTimeZoneAdapter extends java.util.TimeZone {
/**
* Return a string representation of this time zone.
* @return a string representation of this time zone.
* @stable
* @stable ICU 2.0
*/
public String toString() {
// Should probably show our class name here...fix later.

View file

@ -71,13 +71,13 @@ import java.util.Vector;
* @see GregorianCalendar
* @see SimpleTimeZone
* @author Mark Davis, David Goldsmith, Chen-Lieh Huang, Alan Liu
* @stable
* @stable ICU 2.0
*/
abstract public class TimeZone implements Serializable, Cloneable {
/**
* Sole constructor. (For invocation by subclass constructors, typically
* implicit.)
* @stable
* @stable ICU 2.0
*/
public TimeZone() {
}
@ -86,7 +86,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* A style specifier for <code>getDisplayName()</code> indicating
* a short name, such as "PST."
* @see #LONG
* @stable
* @stable ICU 2.0
*/
public static final int SHORT = 0;
@ -94,7 +94,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* A style specifier for <code>getDisplayName()</code> indicating
* a long name, such as "Pacific Standard Time."
* @see #SHORT
* @stable
* @stable ICU 2.0
*/
public static final int LONG = 1;
@ -122,7 +122,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @param dayOfWeek the day-of-week of the given date.
* @param milliseconds the millis in day in <em>standard</em> local time.
* @return the offset to add *to* GMT to get local time.
* @stable
* @stable ICU 2.0
*/
abstract public int getOffset(int era, int year, int month, int day,
int dayOfWeek, int milliseconds);
@ -170,7 +170,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* Sets the base time zone offset to GMT.
* This is the offset to add *to* UTC to get local time.
* @param offsetMillis the given base time zone offset to GMT.
* @stable
* @stable ICU 2.0
*/
abstract public void setRawOffset(int offsetMillis);
@ -178,14 +178,14 @@ abstract public class TimeZone implements Serializable, Cloneable {
* Gets unmodified offset, NOT modified in case of daylight savings.
* This is the offset to add *to* UTC to get local time.
* @return the unmodified offset to add *to* UTC to get local time.
* @stable
* @stable ICU 2.0
*/
abstract public int getRawOffset();
/**
* Gets the ID of this time zone.
* @return the ID of this time zone.
* @stable
* @stable ICU 2.0
*/
public String getID()
{
@ -196,7 +196,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* Sets the time zone ID. This does not change any other data in
* the time zone object.
* @param ID the new time zone ID.
* @stable
* @stable ICU 2.0
*/
public void setID(String ID)
{
@ -214,7 +214,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* then this method returns a string in the format
* <code>GMT[+-]hh:mm</code>.
* @return the human-readable name of this time zone in the default locale.
* @stable
* @stable ICU 2.0
*/
public final String getDisplayName() {
return getDisplayName(false, LONG, Locale.getDefault());
@ -230,7 +230,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @param locale the locale in which to supply the display name.
* @return the human-readable name of this time zone in the given locale
* or in the default locale if the given locale is not recognized.
* @stable
* @stable ICU 2.0
*/
public final String getDisplayName(Locale locale) {
return getDisplayName(false, LONG, locale);
@ -245,7 +245,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @param daylight if true, return the daylight savings name.
* @param style either <code>LONG</code> or <code>SHORT</code>
* @return the human-readable name of this time zone in the default locale.
* @stable
* @stable ICU 2.0
*/
public final String getDisplayName(boolean daylight, int style) {
return getDisplayName(daylight, style, Locale.getDefault());
@ -263,7 +263,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @return the human-readable name of this time zone in the given locale
* or in the default locale if the given locale is not recognized.
* @exception IllegalArgumentException style is invalid.
* @stable
* @stable ICU 2.0
*/
public String getDisplayName(boolean daylight, int style, Locale locale) {
/* NOTES:
@ -316,7 +316,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* Queries if this time zone uses daylight savings time.
* @return true if this time zone uses daylight savings time,
* false, otherwise.
* @stable
* @stable ICU 2.0
*/
abstract public boolean useDaylightTime();
@ -326,7 +326,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @param date the given Date.
* @return true if the given date is in daylight savings time,
* false, otherwise.
* @stable
* @stable ICU 2.0
*/
abstract public boolean inDaylightTime(Date date);
@ -340,7 +340,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
*
* @return the specified <code>TimeZone</code>, or the GMT zone if the given ID
* cannot be understood.
* @stable
* @stable ICU 2.0
*/
public static synchronized TimeZone getTimeZone(String ID) {
/* We first try to lookup the zone ID in our hashtable. If this fails,
@ -366,7 +366,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @param rawOffset the offset in milliseconds from GMT
* @return an array of IDs for system TimeZones with the given
* raw offset. If there are none, return a zero-length array.
* @stable
* @stable ICU 2.0
*/
public static String[] getAvailableIDs(int rawOffset) {
return TimeZoneData.getAvailableIDs(rawOffset);
@ -381,7 +381,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* to return zones not associated with any country
* @return an array of IDs for system TimeZones in the given
* country. If there are none, return a zero-length array.
* @stable
* @stable ICU 2.0
*/
public static String[] getAvailableIDs(String country) {
return TimeZoneData.getAvailableIDs(country);
@ -393,7 +393,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* <code>get()</code> to construct the corresponding TimeZone
* object.
* @return an array of all system TimeZone IDs
* @stable
* @stable ICU 2.0
*/
public static String[] getAvailableIDs() {
return TimeZoneData.getAvailableIDs();
@ -411,7 +411,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @return the number of zones in the equivalency group containing
* 'id', or zero if 'id' is not a valid system ID
* @see #getEquivalentID
* @stable
* @stable ICU 2.0
*/
public static int countEquivalentIDs(String id) {
return TimeZoneData.countEquivalentIDs(id);
@ -434,7 +434,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* containing 'id', or an empty string if 'id' is not a valid
* system ID or 'index' is out of range
* @see #countEquivalentIDs
* @stable
* @stable ICU 2.0
*/
public static String getEquivalentID(String id, int index) {
return TimeZoneData.getEquivalentID(id, index);
@ -451,7 +451,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* The source of the default <code>TimeZone</code>
* may vary with implementation.
* @return a default <code>TimeZone</code>.
* @stable
* @stable ICU 2.0
*/
public static synchronized TimeZone getDefault() {
if (defaultZone == null) {
@ -517,7 +517,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* is null, reset the default to the value it had originally when the
* VM first started.
* @param zone the new default time zone
* @stable
* @stable ICU 2.0
*/
public static synchronized void setDefault(TimeZone zone)
{
@ -538,7 +538,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* @param other the <code>TimeZone</code> object to be compared with
* @return true if the other zone is not null and is the same as this one,
* with the possible exception of the ID
* @stable
* @stable ICU 2.0
*/
public boolean hasSameRules(TimeZone other) {
return other != null && getRawOffset() == other.getRawOffset() &&
@ -547,7 +547,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
/**
* Overrides Cloneable
* @stable
* @stable ICU 2.0
*/
public Object clone()
{