mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-5051 swat deprecated (two additional files, tool change)
X-SVN-Rev: 19617
This commit is contained in:
parent
d3538e3a8e
commit
e6c51fa3bf
3 changed files with 24 additions and 17 deletions
|
@ -7,6 +7,8 @@
|
|||
package com.ibm.icu.dev.tool.docs;
|
||||
|
||||
import java.io.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class SwatDeprecated {
|
||||
private File srcFile;
|
||||
|
@ -20,6 +22,7 @@ public class SwatDeprecated {
|
|||
private int verbosity;
|
||||
private int cc; // changed file count
|
||||
private boolean inPlace;
|
||||
private String copyYear;
|
||||
|
||||
private PrintWriter pw = new PrintWriter(System.out);
|
||||
|
||||
|
@ -84,6 +87,7 @@ public class SwatDeprecated {
|
|||
this.dstFile = new File(dst);
|
||||
this.overwrite = overwrite;
|
||||
this.verbosity = verbosity;
|
||||
this.copyYear = new SimpleDateFormat("yyyy").format(new Date());
|
||||
|
||||
this.srcTag = "@deprecated This is a draft API and might change in a future release of ICU.";
|
||||
this.trgTag = "@provisional This API might change or be removed in a future release.";
|
||||
|
@ -207,7 +211,7 @@ public class SwatDeprecated {
|
|||
|
||||
++tc;
|
||||
} else if (n < 20) {
|
||||
// swat copyrights while we're at it
|
||||
// swat copyrights in the first 20 lines while we're at it
|
||||
ix = line.indexOf("opyright");
|
||||
if (ix != -1) {
|
||||
String nline = null;
|
||||
|
@ -217,27 +221,31 @@ public class SwatDeprecated {
|
|||
}
|
||||
ix = line.indexOf("-200");
|
||||
if (ix != -1) {
|
||||
nline = line.substring(0, ix) + "-2006" + line.substring(ix+5);
|
||||
nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+5);
|
||||
break;
|
||||
}
|
||||
ix = line.indexOf("- 200");
|
||||
if (ix != -1) {
|
||||
nline = line.substring(0, ix) + "-2006" + line.substring(ix+6);
|
||||
nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+6);
|
||||
break;
|
||||
}
|
||||
ix = line.indexOf("-199");
|
||||
if (ix != -1) {
|
||||
nline = line.substring(0, ix) + "-2006" + line.substring(ix+5);
|
||||
nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+5);
|
||||
break;
|
||||
}
|
||||
ix = line.indexOf(copyYear);
|
||||
if (ix != -1) {
|
||||
break; // nothing needs changing
|
||||
}
|
||||
ix = line.indexOf("200");
|
||||
if (ix != -1) {
|
||||
nline = line.substring(0, ix) + "2006" + line.substring(ix+4);
|
||||
nline = line.substring(0, ix+4) + "-" + copyYear + line.substring(ix+4);
|
||||
break;
|
||||
}
|
||||
ix = line.indexOf("199");
|
||||
if (ix != -1) {
|
||||
nline = line.substring(0, ix) + "2006" + line.substring(ix+4);
|
||||
nline = line.substring(0, ix+4) + "-" + copyYear + line.substring(ix+4);
|
||||
break;
|
||||
}
|
||||
} while (false);
|
||||
|
|
|
@ -2307,7 +2307,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @see #getRoundingMode
|
||||
* @see #setRoundingMode
|
||||
* @draft ICU 3.4.2
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public void setRoundingIncrement(BigDecimal newValue) {
|
||||
int i = newValue == null
|
||||
|
@ -3840,7 +3840,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* returns true.
|
||||
* @return the fewest significant digits that will be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public int getMinimumSignificantDigits() {
|
||||
return minSignificantDigits;
|
||||
|
@ -3852,7 +3852,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* returns true.
|
||||
* @return the most significant digits that will be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public int getMaximumSignificantDigits() {
|
||||
return maxSignificantDigits;
|
||||
|
@ -3866,7 +3866,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* value has no effect unless areSignificantDigitsUsed() returns true.
|
||||
* @param min the fewest significant digits to be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public void setMinimumSignificantDigits(int min) {
|
||||
if (min < 1) {
|
||||
|
@ -3886,7 +3886,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* value has no effect unless areSignificantDigitsUsed() returns true.
|
||||
* @param max the most significant digits to be shown
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public void setMaximumSignificantDigits(int max) {
|
||||
if (max < 1) {
|
||||
|
@ -3903,7 +3903,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* integer and fraction digit counts are in use.
|
||||
* @return true if significant digits are in use
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public boolean areSignificantDigitsUsed() {
|
||||
return useSignificantDigits;
|
||||
|
@ -3915,7 +3915,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param useSignificantDigits true to use significant digits, or
|
||||
* false to use integer and fraction digit counts
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public void setSignificantDigitsUsed(boolean useSignificantDigits) {
|
||||
this.useSignificantDigits = useSignificantDigits;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2005, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -246,7 +246,7 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
|||
* @return the status from the break rule that determined the most recently
|
||||
* returned break position.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public int getRuleStatus() {
|
||||
return 0;
|
||||
|
@ -268,7 +268,7 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
|||
* is the total number of status values that were available,
|
||||
* not the reduced number that were actually returned.
|
||||
* @draft ICU 3.0
|
||||
* @deprecated This is a draft API and might change in a future release of ICU.
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public int getRuleStatusVec(int[] fillInArray) {
|
||||
if (fillInArray != null && fillInArray.length>=1) {
|
||||
|
@ -519,5 +519,4 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
|||
}
|
||||
positionInCache = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue