ICU-3894 remove fulldoc doc warnings

X-SVN-Rev: 15985
This commit is contained in:
Doug Felt 2004-07-08 21:24:24 +00:00
parent ddb425e7fe
commit 8cdece1fec
38 changed files with 1125 additions and 1116 deletions

View file

@ -85,9 +85,6 @@ public abstract class TestBoilerplate extends TestFmwk {
/**
* Must be overridden to check whether a and be behave the same
* @param a
* @param b
* @return
*/
protected abstract boolean _hasSameBehavior(Object a, Object b);
@ -100,21 +97,18 @@ public abstract class TestBoilerplate extends TestFmwk {
* to run this test on. The running time grows with the square of the
* count.
* NOTE: this method will only be called if the objects test as equal.
* @return
*/
protected abstract boolean _addTestObject(List c);
/**
* Override if the tested objects are mutable.
* <br>Since Java doesn't tell us, we need a function to tell if so.
* The default is true, so must be overridden if not.
* @return
*/
protected boolean _isMutable(Object a) {
return true;
}
/**
* Override if the tested objects can be cloned.
* @return
*/
protected boolean _canClone(Object a) {
return true;

View file

@ -222,7 +222,7 @@ public class UTF16Util {
* If a validity check is required, use <code>
* <a href="../UCharacter.html#isLegal(char)">isLegal()</a></code> on
* char32 before calling.
* @param ch the input codepoint.
* @param char32 the input codepoint.
* @return 2 if is in supplementary space, otherwise 1.
*/
public static int getCharCount(int char32)
@ -255,7 +255,7 @@ public class UTF16Util {
public static final int TRAIL_SURROGATE_MAX_VALUE = 0xDFFF;
/**
* Determines whether the code value is a surrogate.
* @param ch the input character.
* @param char16 the input character.
* @return true iff the input character is a surrogate.
* @stable ICU 2.1
*/

View file

@ -907,7 +907,7 @@ public class DiagBigDecimal extends TestFmwk{
// are correctly passed to the methods, except that we check that
// each method checks for lostDigits.
/** Test the {@link BigDecimal#abs} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#abs} method. */
public void diagabs(){
boolean flag=false;
@ -960,7 +960,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#add} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#add} method. */
public void diagadd(){
boolean flag=false;
@ -1233,7 +1233,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#compareTo(BigDecimal)} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#compareTo(BigDecimal)} method. */
public void diagcompareto(){
boolean flag=false;
@ -1288,7 +1288,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#divide} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#divide} method. */
public void diagdivide(){
boolean flag=false;
@ -1611,7 +1611,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#divideInteger} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#divideInteger} method. */
public void diagdivideInteger(){
boolean flag=false;
@ -1692,7 +1692,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#max} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#max} method. */
public void diagmax(){
boolean flag=false;
@ -1744,7 +1744,7 @@ public class DiagBigDecimal extends TestFmwk{
summary("max");
return;}
/** Test the {@link BigDecimal#min} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#min} method. */
public void diagmin(){
boolean flag=false;
@ -1801,7 +1801,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#multiply} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#multiply} method. */
public void diagmultiply(){
boolean flag=false;
@ -2049,7 +2049,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#negate} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#negate} method. */
public void diagnegate(){
boolean flag=false;
@ -2098,7 +2098,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#plus} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#plus} method. */
public void diagplus(){
boolean flag=false;
@ -2177,7 +2177,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#pow} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#pow} method. */
public void diagpow(){
boolean flag;
@ -2417,7 +2417,7 @@ public class DiagBigDecimal extends TestFmwk{
/*--------------------------------------------------------------------*/
/** Test the {@link BigDecimal#remainder} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#remainder} method. */
public void diagremainder(){
boolean flag=false;
@ -2582,7 +2582,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/*--------------------------------------------------------------------*/
/** Test the {@link BigDecimal#subtract} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#subtract} method. */
public void diagsubtract(){
boolean flag=false;
@ -2956,7 +2956,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#compareTo(java.lang.Object)} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#compareTo(java.lang.Object)} method. */
public void diagcomparetoObj(){
boolean flag=false;
@ -2993,7 +2993,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#doubleValue} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#doubleValue} method. */
public void diagdoublevalue(){
java.lang.String val;
@ -3016,7 +3016,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#equals} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#equals} method. */
public void diagequals(){
com.ibm.icu.math.BigDecimal d;
@ -3031,7 +3031,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#floatValue} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#floatValue} method. */
public void diagfloatvalue(){
java.lang.String val;
@ -3059,7 +3059,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#format} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#format} method. */
public void diagformat(){
boolean flag=false;
@ -3301,7 +3301,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#hashCode} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#hashCode} method. */
public void diaghashcode(){
java.lang.String hs;
@ -3319,7 +3319,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#intValue} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#intValue} method. */
public void diagintvalue(){
boolean flag=false;
@ -3528,7 +3528,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#longValue} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#longValue} method. */
public void diaglongvalue(){
boolean flag=false;
@ -3681,7 +3681,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#movePointLeft} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#movePointLeft} method. */
public void diagmovepointleft(){
(new Test("mpl001")).ok=((new com.ibm.icu.math.BigDecimal("-1")).movePointLeft(-10).toString()).equals("-10000000000");
@ -3720,7 +3720,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#movePointRight} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#movePointRight} method. */
public void diagmovepointright(){
(new Test("mpr001")).ok=((new com.ibm.icu.math.BigDecimal("-1")).movePointRight(+10).toString()).equals("-10000000000");
@ -3759,7 +3759,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#scale} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#scale} method. */
public void diagscale(){
(new Test("sca001")).ok=((new com.ibm.icu.math.BigDecimal("-1")).scale())==0;
@ -3784,7 +3784,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#setScale} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#setScale} method. */
public void diagsetscale(){
boolean flag=false;
@ -3983,7 +3983,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#signum} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#signum} method. */
public void diagsignum(){
// necessarily checks some obscure constructions, too
@ -4009,7 +4009,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#toBigDecimal} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#toBigDecimal} method. */
public void diagtobigdecimal(){
(new Test("tbd001")).ok=((new com.ibm.icu.math.BigDecimal("0")).toBigDecimal().toString()).equals("0");
@ -4026,7 +4026,7 @@ public class DiagBigDecimal extends TestFmwk{
return;}
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#toBigInteger} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#toBigInteger} method. */
public void diagtobiginteger(){
boolean flag=false;
@ -4129,7 +4129,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#toCharArray} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#toCharArray} method. */
public void diagtochararray(){
java.lang.String str;
@ -4151,7 +4151,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#toString} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#toString} method. */
public void diagtostring(){
java.lang.String str;
@ -4177,7 +4177,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#unscaledValue} method. */
/** Test the {@link com.ibm.icu.math.BigDecimal#unscaledValue} method. */
public void diagunscaledvalue(){
// just like toBigInteger, but scaly bits are preserved [without dots]
@ -4214,7 +4214,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link BigDecimal#valueOf} method [long and double]. */
/** Test the {@link com.ibm.icu.math.BigDecimal#valueOf} method [long and double]. */
public void diagvalueof(){
boolean flag=false;
@ -4335,7 +4335,7 @@ public class DiagBigDecimal extends TestFmwk{
/* ----------------------------------------------------------------- */
/** Test the {@link MathContext} class. */
/** Test the {@link com.ibm.icu.math.MathContext} class. */
public void diagmathcontext(){
com.ibm.icu.math.MathContext mccon1;
@ -5268,7 +5268,7 @@ public class DiagBigDecimal extends TestFmwk{
* Its <code>ok</flag> is assigned directly to record whether the
* test succeeded (1) or failed (0).
*
* @see com.ibm.icu.math.DiagBigDecimal
* @see com.ibm.icu.math.BigDecimal
* @version 1.00 2000.03.27
* @author Mike Cowlishaw
*/
@ -5311,7 +5311,7 @@ public class DiagBigDecimal extends TestFmwk{
* The <code>DiagException</code> class is used to signal the failure
* of a test group. It records the number of failures in the group.
*
* @see com.ibm.icu.math.DiagBigDecimal
* @see com.ibm.icu.math.BigDecimal
* @version 1.00 2000.03.27
* @author Mike Cowlishaw
*/

View file

@ -276,7 +276,7 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
* NOTE: the unnecessary "getTime()'s" below are a work-around for a
* bug in jdk 1.1.3 (and probably earlier versions also)
* <p>
* @param date The date to start from
* @param d The date to start from
*/
public static Date getAssociatedDate(Date d) {
GregorianCalendar cal = new GregorianCalendar();
@ -1893,4 +1893,4 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
}
}
//eof
//eof

View file

@ -149,7 +149,7 @@ public class TestCase {
* by calling its set method for each field. This is useful in combination
* with the equal method.
*
* @see #equal
* @see com.ibm.icu.util.Calendar#equals
*/
public void applyFields(Calendar c) {
for (int i=0; i < c.getFieldCount(); i++) {

View file

@ -41,7 +41,6 @@ public class UCharacterCategoryTest extends TestFmwk
/**
* Gets the name of the argument category
* @param category to retrieve name
* @return category name
*/
public void TestToString()

View file

@ -19,7 +19,7 @@ import java.util.Enumeration;
* UCharacter
* @author Syn Wee Quek
* @since oct 06 2000
* @see com.ibm.icu.text.UCharacter
* @see com.ibm.icu.lang.UCharacter
*/
public final class UCharacterCompare

View file

@ -42,7 +42,6 @@ public class UCharacterDirectionTest extends TestFmwk
/**
* Gets the name of the argument category
* @param category to retrieve name
* @return category name
*/
public void TestToString()

View file

@ -38,7 +38,7 @@ public class NormalizerData {
* Returns the composite of the two characters. If the two
* characters don't combine, returns NOT_COMPOSITE.
* @param first first character (e.g. 'c')
* @param first second character (e.g. \u0327 cedilla)
* @param second second character (e.g. \u0327 cedilla)
* @return composite (e.g. \u00C7 c cedilla)
*/
public int getPairwiseComposition(int first, int second) {
@ -132,4 +132,4 @@ public class NormalizerData {
*/
private BitSet isExcluded = new BitSet();
}
}

View file

@ -173,8 +173,7 @@ public class BagFormatter {
* Returns a list of items in the collection, with each separated by the separator.
* Each item must not be null; its toString() is called for a printable representation
* @param c source collection
* @param separator to be placed between any strings
* @return
* @return a String representation of the list
* @internal
*/
public String showSetNames(Object c) {
@ -187,9 +186,8 @@ public class BagFormatter {
/**
* Returns a list of items in the collection, with each separated by the separator.
* Each item must not be null; its toString() is called for a printable representation
* @param output destination to which to write names
* @param c source collection
* @param separator to be placed between any strings
* @return
* @internal
*/
public void showSetNames(PrintWriter output, Object c) {
@ -200,9 +198,8 @@ public class BagFormatter {
/**
* Returns a list of items in the collection, with each separated by the separator.
* Each item must not be null; its toString() is called for a printable representation
* @param filename destination to which to write names
* @param c source collection
* @param separator to be placed between any strings
* @return
* @internal
*/
public void showSetNames(String filename, Object c) throws IOException {
@ -637,7 +634,7 @@ public class BagFormatter {
}
/**
* Find next word, including trailing spaces
* @return
* @return the next word
*/
String next() {
if (position >= limit)
@ -856,7 +853,7 @@ public class BagFormatter {
}
/**
* @return
* @return the NameLable representing the source
*/
public UnicodeLabel getNameSource() {
if (nameSource == null) {
@ -875,7 +872,7 @@ public class BagFormatter {
}
/**
* @return
* @return the UnicodeLabel representing the value
*/
public UnicodeLabel getValueSource() {
if (valueSource == null) valueSource = UnicodeLabel.NULL;
@ -903,14 +900,15 @@ public class BagFormatter {
}
/**
* @return
* @return true if showCount is true
*/
public boolean isShowCount() {
return showCount;
}
/**
* @param b
* @param b true to show the count
* @return this (for chaining)
*/
public BagFormatter setShowCount(boolean b) {
showCount = b;
@ -918,7 +916,7 @@ public class BagFormatter {
}
/**
* @return
* @return the property name
*/
public String getPropName() {
return propName;
@ -926,6 +924,7 @@ public class BagFormatter {
/**
* @param string
* @return this (for chaining)
*/
public BagFormatter setPropName(String string) {
if (string == null) string = "";
@ -934,7 +933,7 @@ public class BagFormatter {
}
/**
* @return
* @return true if this is a hexValue
*/
public boolean isHexValue() {
return hexValue;
@ -942,6 +941,7 @@ public class BagFormatter {
/**
* @param b
* @return this (for chaining)
*/
public BagFormatter setHexValue(boolean b) {
hexValue = b;
@ -949,14 +949,15 @@ public class BagFormatter {
}
/**
* @return
* @return the full total
*/
public int getFullTotal() {
return fullTotal;
}
/**
* @param i
* @param i set the full total
* @return this (for chaining)
*/
public BagFormatter setFullTotal(int i) {
fullTotal = i;
@ -964,7 +965,7 @@ public class BagFormatter {
}
/**
* @return
* @return the line separator
*/
public String getLineSeparator() {
return lineSeparator;
@ -972,6 +973,7 @@ public class BagFormatter {
/**
* @param string
* @return this (for chaining)
*/
public BagFormatter setLineSeparator(String string) {
lineSeparator = string;
@ -979,7 +981,7 @@ public class BagFormatter {
}
/**
* @return
* @return the UnicodeLabel representing the range break source
*/
public UnicodeLabel getRangeBreakSource() {
if (rangeBreakSource == null) {
@ -1041,4 +1043,4 @@ public class BagFormatter {
return this;
}
}
}

View file

@ -18,7 +18,6 @@ public abstract class Tabber {
* Repeats a string n times
* @param source
* @param times
* @return
*/
// TODO - optimize repeats using doubling?
public static String repeat(String source, int times) {
@ -79,8 +78,6 @@ public abstract class Tabber {
/**
* Adds relative tab stop and how to align the text UP TO that stop
* @param tabPos
* @param type
*/
public MonoTabber add(int fieldWidth, byte type) {
int last = getStop(stops.size()-1);
@ -172,14 +169,12 @@ public abstract class Tabber {
}
}
/**
* @return
*/
public String getPostfix() {
return postfix;
}
/**
* @return
*/
public String getPrefix() {
return prefix;
@ -201,4 +196,4 @@ public abstract class Tabber {
return this;
}
}
}

View file

@ -115,14 +115,14 @@ public final class UnicodeMap implements Cloneable {
* and transitivity: a=b & b=c => a=b)
* @param a
* @param b
* @return
* @return true if a and b are equal
*/
public boolean isEqual(Object a, Object b);
/**
* Must obey normal rules: a=b => getHashCode(a)=getHashCode(b)
* @param object
* @return
* @return a hash code for the object
*/
public int getHashCode(Object object);
}
@ -145,7 +145,7 @@ public final class UnicodeMap implements Cloneable {
* Finds an index such that inversionList[i] <= codepoint < inversionList[i+1]
* Assumes that 0 <= codepoint <= 0x10FFFF
* @param codepoint
* @return
* @return the index
*/
private int _findIndex(int c) {
int lo = 0;
@ -334,7 +334,7 @@ public final class UnicodeMap implements Cloneable {
* Sets the codepoint value.
* @param codepoint
* @param value
* @return
* @return this (for chaining)
*/
public UnicodeMap put(int codepoint, Object value) {
if (codepoint < 0 || codepoint > 0x10FFFF) {
@ -348,7 +348,7 @@ public final class UnicodeMap implements Cloneable {
* Adds bunch o' codepoints; otherwise like put.
* @param codepoints
* @param value
* @return this, for chaining
* @return this (for chaining)
*/
public UnicodeMap putAll(UnicodeSet codepoints, Object value) {
// TODO optimize
@ -361,9 +361,10 @@ public final class UnicodeMap implements Cloneable {
/**
* Adds bunch o' codepoints; otherwise like add.
* @param codepoints
* @param startCodePoint
* @param endCodePoint
* @param value
* @return this, for chaining
* @return this (for chaining)
*/
public UnicodeMap putAll(int startCodePoint, int endCodePoint, Object value) {
if (startCodePoint < 0 || endCodePoint > 0x10FFFF) {
@ -378,8 +379,8 @@ public final class UnicodeMap implements Cloneable {
}
/**
* Add all the (main) values from a Unicode property
* @param prop
* @return
* @param prop the property to add to the map
* @return this (for chaining)
*/
public UnicodeMap putAll(UnicodeProperty prop) {
// TODO optimize
@ -391,8 +392,8 @@ public final class UnicodeMap implements Cloneable {
/**
* Set the currently unmapped Unicode code points to the given value.
* @param value
* @return
* @param value the value to set
* @return this (for chaining)
*/
public UnicodeMap setMissing(Object value) {
for (int i = 0; i < length; ++i) {
@ -425,7 +426,7 @@ public final class UnicodeMap implements Cloneable {
* result. Creates result if it is null. Remember to clear result if
* you are not appending to existing collection.
* @param result
* @return
* @return result
*/
public Collection getAvailableValues(Collection result) {
if (result == null) result = new ArrayList(1);
@ -448,7 +449,7 @@ public final class UnicodeMap implements Cloneable {
* Gets the value associated with a given code point.
* Returns null, if there is no such value.
* @param codepoint
* @return
* @return the value
*/
public Object getValue(int codepoint) {
if (codepoint < 0 || codepoint > 0x10FFFF) {
@ -538,4 +539,4 @@ public final class UnicodeMap implements Cloneable {
}
return result.toString();
}
}
}

View file

@ -452,7 +452,7 @@ public abstract class UnicodeProperty extends UnicodeLabel {
/**
* Must be able to handle null
* @param value
* @return
* @return true if the value matches
*/
public boolean matches(String value);
public Matcher set(String pattern);
@ -851,7 +851,7 @@ public abstract class UnicodeProperty extends UnicodeLabel {
* generating new string.
* @param codepoint
* @param other
* @return
* @return true if the codepoint equals the string
*/
public static final boolean equals(int codepoint, String other) {
if (other.length() == 1) {
@ -908,7 +908,7 @@ public abstract class UnicodeProperty extends UnicodeLabel {
/**
* @return
* @return the unicode map
*/
protected UnicodeMap getUnicodeMap() {
if (unicodeMap == null) unicodeMap = _getUnicodeMap();

View file

@ -242,7 +242,7 @@ public abstract class UnicodePropertySource implements Cloneable {
* @param valueAlias null if unused.
* @param valueEnum -1 if unused
* @param nameChoice
* @return
* @return the alias
*/
private String getFixedValueAlias(String valueAlias, int valueEnum, int nameChoice) {
if (propEnum >= UProperty.STRING_START) {
@ -294,7 +294,6 @@ public abstract class UnicodePropertySource implements Cloneable {
}
/**
* @return
*/
static public void addAll(UnicodeSetIterator source, UnicodeSet result) {
while (source.nextRange()) {
@ -319,4 +318,4 @@ public abstract class UnicodePropertySource implements Cloneable {
matchIterator = new UnicodeSetIterator(set);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,7 @@ public abstract class ICUTaglet implements Taglet {
ICUStableTaglet.register(taglets);
ICUDeprecatedTaglet.register(taglets);
ICUObsoleteTaglet.register(taglets);
ICUIgnoreTaglet.register(taglets);
}
protected ICUTaglet(String name, int mask) {
@ -198,4 +199,25 @@ public abstract class ICUTaglet implements Taglet {
}
}
public static class ICUIgnoreTaglet extends ICUTaglet {
private static ICUTaglet singleton;
public static void register(Map taglets) {
if (singleton == null) {
singleton = new ICUIgnoreTaglet();
}
taglets.put("bug", singleton);
taglets.put("test", singleton);
taglets.put("summary", singleton);
}
private ICUIgnoreTaglet() {
super("bug", MASK_DEFAULT);
}
public String toString(Tag tag) {
return null;
}
}
}

View file

@ -58,10 +58,9 @@ public class TransliteratorInputMethodDescriptor implements InputMethodDescripto
/**
* Obtain the localized name of the Transliterator IME
*
* @param inputLocale.
* @param displayLanguge The requested translation of the Transliterator IME.
*
* @return String The localized name for the Transliterator IME.
* @param inputLocale the requested input method locale
* @param displayLanguage The requested translation of the Transliterator IME
* @return the localized name for the Transliterator IME
*/
public String getInputMethodDisplayName(Locale inputLocale,
Locale displayLanguage) {

View file

@ -765,7 +765,7 @@ public class XMLComparator {
* name as-is (the assumption is that it's already a URL)
* Otherwise we attempt (cheaply) to convert to a file:/// URL.
*
* @param String local path\filename of a file
* @param filename local path/filename of a file
* @return a file:/// URL, the same string if it appears to
* already be a URL, or null if error
*/

View file

@ -69,7 +69,7 @@ public class XMLValidator {
* name as-is (the assumption is that it's already a URL)
* Otherwise we attempt (cheaply) to convert to a file:/// URL.
*
* @param String local path\filename of a file
* @param filename a local path/filename of a file
* @return a file:/// URL, the same string if it appears to
* already be a URL, or null if error
*/

View file

@ -23,7 +23,7 @@ import com.ibm.icu.text.UCharacterIterator;
* 2.</p>
*
* <p>One example of a use of BOCU is in {@link
* Collator#getCollationKey(String)} for a RuleBasedCollator object with
* com.ibm.icu.text.Collator#getCollationKey(String)} for a RuleBasedCollator object with
* collation strength IDENTICAL. The result CollationKey will consist of the
* collation order of the source string followed by the BOCU result of the
* source string.
@ -75,7 +75,8 @@ import com.ibm.icu.text.UCharacterIterator;
*
* @author Syn Wee Quek
* @since release 2.2, May 3rd 2002
* @draft 2.2 */
* @draft 2.2
*/
public class BOCU
{
// public constructors --------------------------------------------------

View file

@ -35,8 +35,8 @@ import java.util.*;
* <p>
* <strong>WARNING:</strong> This class is very early in its development, and
* it is highly likely that its API will change to some degree in the future.
* At the moment, it basically does just enough to support {@link IslamicCalendar}
* and {@link ChineseCalendar}.
* At the moment, it basically does just enough to support {@link com.ibm.icu.util.IslamicCalendar}
* and {@link com.ibm.icu.util.ChineseCalendar}.
*
* @author Laura Werner
* @author Alan Liu

View file

@ -14,7 +14,7 @@ import java.io.IOException;
/**
* Trie implementation which stores data in char, 16 bits.
* @author synwee
* @see com.ibm.icu.util.Trie
* @see com.ibm.icu.impl.Trie
* @since release 2.1, Jan 01 2002
*/
@ -30,9 +30,9 @@ public class CharTrie extends Trie
* trie.</p>
* @param inputStream file input stream to a ICU data file, containing
* the trie
* @param dataManipulate, object which provides methods to parse the char
* @param dataManipulate object which provides methods to parse the char
* data
* @exception IOException thrown when data reading fails
* @throws IOException thrown when data reading fails
* @draft 2.1
*/
public CharTrie(InputStream inputStream,
@ -139,7 +139,6 @@ public class CharTrie extends Trie
* Get the value associated with a pair of surrogates.
* @param lead a lead surrogate
* @param trail a trail surrogate
* @param trie data value associated with the surrogate characters
* @draft 2.1
*/
public final char getSurrogateValue(char lead, char trail)
@ -255,10 +254,10 @@ public class CharTrie extends Trie
/**
* Gets the value at the argument index.
* For use internally in com.ibm.icu.util.TrieEnumeration.
* For use internally in TrieIterator.
* @param index value at index will be retrieved
* @return 32 bit value
* @see com.ibm.icu.util.TrieEnumeration
* @see com.ibm.icu.impl.TrieIterator
* @draft 2.1
*/
protected final int getValue(int index)
@ -290,4 +289,4 @@ public class CharTrie extends Trie
* Agent for friends
*/
private FriendAgent m_friendAgent_;
}
}

View file

@ -15,58 +15,54 @@ import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* @author dougfelt
*
* Provides access to ICU data files as InputStreams. Implements security checking.
*/
public final class ICUData {
/*
* Return a URL to the ICU resource names resourceName. The
* resource name should either be an absolute path, or a path relative to
* com.ibm.icu.impl (e.g., most likely it is 'data/foo'). If required
* is true, throw an InternalError instead of returning a null result.
*/
public static boolean exists(final String resourceName) {
URL i = null;
if (System.getSecurityManager() != null) {
i = (URL)AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return ICUData.class.getResource(resourceName);
}
});
} else {
i = ICUData.class.getResource(resourceName);
}
return i != null;
}
private static InputStream getStream(final Class root, final String resourceName, boolean required) {
InputStream i = null;
if (System.getSecurityManager() != null) {
i = (InputStream)AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return root.getResourceAsStream(resourceName);
}
});
} else {
i = root.getResourceAsStream(resourceName);
}
if (i == null && required) {
throw new InternalError("could not locate data " + resourceName+ " " + root.getPackage().getName());
}
return i;
}
/*
* Return a URL to the ICU resource names resourceName. The
* resource name should either be an absolute path, or a path relative to
* com.ibm.icu.impl (e.g., most likely it is 'data/foo'). If required
* is true, throw an InternalError instead of returning a null result.
*/
public static boolean exists(final String resourceName) {
URL i = null;
if (System.getSecurityManager() != null) {
i = (URL)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return ICUData.class.getResource(resourceName);
}
});
} else {
i = ICUData.class.getResource(resourceName);
}
return i != null;
}
private static InputStream getStream(final Class root, final String resourceName, boolean required) {
InputStream i = null;
if (System.getSecurityManager() != null) {
i = (InputStream)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return root.getResourceAsStream(resourceName);
}
});
} else {
i = root.getResourceAsStream(resourceName);
}
if (i == null && required) {
throw new InternalError("could not locate data " + resourceName+ " " + root.getPackage().getName());
}
return i;
}
private static InputStream getStream(final ClassLoader loader, final String resourceName, boolean required) {
InputStream i = null;
if (System.getSecurityManager() != null) {
i = (InputStream)AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return loader.getResourceAsStream(resourceName);
}
});
i = (InputStream)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return loader.getResourceAsStream(resourceName);
}
});
} else {
i = loader.getResourceAsStream(resourceName);
}
@ -79,34 +75,37 @@ public final class ICUData {
public static InputStream getStream(ClassLoader loader, String resourceName){
return getStream(loader,resourceName, false);
}
public static InputStream getRequiredStream(ClassLoader loader, String resourceName){
return getStream(loader,resourceName, true);
}
/*
* Convenience override that calls getStream(ICUData.class, resourceName, false);
*/
public static InputStream getStream(String resourceName) {
return getStream(ICUData.class, resourceName, false);
}
/*
* Convenience method that calls getStream(ICUData.class, resourceName, true).
*/
public static InputStream getRequiredStream(String resourceName) {
return getStream(ICUData.class, resourceName, true);
}
/*
* Convenience override that calls getStream(root, resourceName, false);
*/
public static InputStream getStream(Class root, String resourceName) {
return getStream(root, resourceName, false);
}
/*
* Convenience method that calls getStream(root, resourceName, true).
*/
public static InputStream getRequiredStream(Class root, String resourceName) {
return getStream(root, resourceName, true);
}
/*
* Convenience override that calls getStream(ICUData.class, resourceName, false);
*/
public static InputStream getStream(String resourceName) {
return getStream(ICUData.class, resourceName, false);
}
/*
* Convenience method that calls getStream(ICUData.class, resourceName, true).
*/
public static InputStream getRequiredStream(String resourceName) {
return getStream(ICUData.class, resourceName, true);
}
/*
* Convenience override that calls getStream(root, resourceName, false);
*/
public static InputStream getStream(Class root, String resourceName) {
return getStream(root, resourceName, false);
}
/*
* Convenience method that calls getStream(root, resourceName, true).
*/
public static InputStream getRequiredStream(Class root, String resourceName) {
return getStream(root, resourceName, true);
}
}

View file

@ -95,7 +95,7 @@ public class ICULocaleData {
/**
* Creates a resource bundle for the given package, base name, and
* locale.
* @param package a package name, e.g., "com.ibm.icu.impl.data".
* @param packageName a package name, e.g., "com.ibm.icu.impl.data".
* @param bundleName the base name of the bundle to retrieve,
* e.g. "LocaleElements".
* @param localeName the string name of the locale of the bundle

View file

@ -617,9 +617,11 @@ public abstract class ICUResourceBundle extends UResourceBundle{
}
/**
*
* @param ulocales
* @return
* Convert a list of ULocales to a list of Locales. ULocales with a script code will not be converted
* since they cannot be represented as a Locale. This means that the two lists will <b>not</b> match
* one-to-one, and that the returned list might be shorter than the input list.
* @param ulocales a list of ULocales to convert to a list of Locales.
* @return the list of converted ULocales
* @draft ICU 3.0
*/
public static final Locale[] getLocaleList(ULocale[] ulocales){

View file

@ -31,7 +31,7 @@ public class ICUResourceBundleImpl extends ICUResourceBundle {
* @param baseName
* @param localeID
* @param root
* @return
* @return the new bundle
*/
public static ICUResourceBundle createBundle(String baseName,
String localeID, ClassLoader root) {
@ -668,4 +668,4 @@ public class ICUResourceBundleImpl extends ICUResourceBundle {
sub.resPath = resPath;
return sub;
}
}
}

View file

@ -195,10 +195,6 @@ public final class ICUResourceBundleReader implements ICUBinary.Authenticate{
}
/**
* Gets the full name of the resource with suffix.
* If the
* @param baseName
* @param localeName
* @return
*/
public static String getFullName(String baseName, String localeName){
if(baseName.indexOf('.')==-1){

View file

@ -16,7 +16,7 @@ import com.ibm.icu.text.UTF16;
/**
* Trie implementation which stores data in int, 32 bits.
* @author synwee
* @see com.ibm.icu.util.Trie
* @see com.ibm.icu.impl.Trie
* @since release 2.1, Jan 01 2002
*/
public class IntTrie extends Trie
@ -29,9 +29,9 @@ public class IntTrie extends Trie
* trie.</p>
* @param inputStream file input stream to a ICU data file, containing
* the trie
* @param datamanipulate, object which provides methods to parse the char
* @param dataManipulate object which provides methods to parse the char
* data
* @exception IOException thrown when data reading fails
* @throws IOException thrown when data reading fails
* @draft 2.1
*/
public IntTrie(InputStream inputStream, DataManipulate datamanipulate)
@ -218,10 +218,10 @@ public class IntTrie extends Trie
/**
* Gets the value at the argument index.
* For use internally in com.ibm.icu.util.TrieEnumeration.
* For use internally in TrieIterator
* @param index value at index will be retrieved
* @return 32 bit value
* @see com.ibm.icu.util.TrieEnumeration
* @see com.ibm.icu.impl.TrieIterator
* @draft 2.1
*/
protected final int getValue(int index)
@ -268,4 +268,4 @@ public class IntTrie extends Trie
* Array of char data
*/
private int m_data_[];
}
}

View file

@ -50,7 +50,6 @@ public class IntTrieBuilder extends TrieBuilder
* @param maxdatalength maximum data length allowed in table
* @param initialvalue inital data value
* @param latin1linear is latin 1 to be linear
* @return updated table
*/
public IntTrieBuilder(int aliasdata[], int maxdatalength,
int initialvalue, int leadunitvalue,

View file

@ -27,7 +27,7 @@ public class ReplaceableUCharacterIterator extends UCharacterIterator {
/**
* Public constructor
* @param replacable text which the iterator will be based on
* @param replaceable text which the iterator will be based on
*/
public ReplaceableUCharacterIterator(Replaceable replaceable){
if(replaceable==null){

View file

@ -133,9 +133,9 @@ public class SortedSetRelation {
* Utility that could be on SortedSet. Allows faster implementation than
* what is in Java for doing addAll, removeAll, retainAll, (complementAll).
* @param a first set
* @param allow filter, using ANY, CONTAINS, etc.
* @param relation the relation filter, using ANY, CONTAINS, etc.
* @param b second set
* @return whether the filter relationship is true or not.
* @return the new set
*/
public static SortedSet doOperation(SortedSet a, int relation, SortedSet b) {
// TODO: optimize this as above

View file

@ -130,9 +130,9 @@ public abstract class Trie
* Trie constructor for CharTrie use.
* @param inputStream ICU data file input stream which contains the
* trie
* @param datamanipulate object containing the information to parse the
* @param dataManipulate object containing the information to parse the
* trie data
* @exception IOException thrown when input stream does not have the
* @throws IOException thrown when input stream does not have the
* right header.
* @draft 2.1
*/
@ -160,7 +160,7 @@ public abstract class Trie
* Trie constructor
* @param index array to be used for index
* @param options used by the trie
* @param datamanipulate object containing the information to parse the
* @param dataManipulate object containing the information to parse the
* trie data
* @draft 2.2
*/
@ -458,4 +458,4 @@ public abstract class Trie
}
return true;
}
}
}

View file

@ -76,8 +76,8 @@ import com.ibm.icu.util.RangeValueIterator;
* }
* </p>
* @author synwee
* @see com.ibm.icu.util.Trie
* @see com.ibm.icu.text.UCharacterTypeIterator
* @see com.ibm.icu.impl.Trie
* @see com.ibm.icu.lang.UCharacterTypeIterator
* @since release 2.1, Jan 17 2002
*/
public class TrieIterator implements RangeValueIterator
@ -113,9 +113,7 @@ public class TrieIterator implements RangeValueIterator
* @param element return result
* @return true if we are not at the end of the iteration, false otherwise.
* @exception NoSuchElementException - if no more elements exist.
* @see #getStart()
* @see #getLimit()
* @see #getValue()
* @see com.ibm.icu.util.RangeValueIterator.Element
* @draft 2.1
*/
public final boolean next(Element element)
@ -541,4 +539,4 @@ public class TrieIterator implements RangeValueIterator
private int m_start_;
private int m_limit_;
private int m_value_;
}
}

View file

@ -105,9 +105,9 @@ public final class UCharacterName
/**
* Find a character by its name and return its code point value
* @param character name
* @param choice selector to indicate if argument name is a Unicode 1.0
* or the most current version
* @param name the name to search for
* @return code point
*/
public int getCharFromName(int choice, String name)

View file

@ -167,7 +167,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
/**
* Called by com.ibm.icu.util.Trie to extract from a lead surrogate's
* data the index array offset of the indexes for that lead surrogate.
* @param property data value for a surrogate from the trie, including the
* @param value data value for a surrogate from the trie, including the
* folding offset
* @return data offset or 0 if there is no data for the lead surrogate
*/
@ -283,7 +283,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
* Different from getException, this function tests if the type data is
* available.
* @param props property value
* @param exception data type
* @param etype exception type
* @return exception data type value at index
*/
///CLOVER:OFF
@ -309,7 +309,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
* available. Result is undefined if data is not available. Use
* hasExceptionValue() to determine data's availability.
* @param index
* @param exception data type
* @param etype exception data type
* @return exception data type value at index
*/
public int getException(int index, int etype)
@ -375,7 +375,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
* Gets the folded case value at the index
* @param index of the case value to be retrieved
* @param count number of characters to retrieve
* @param buffer string buffer to add result to
* @param str string buffer to which to append the result
*/
public void getFoldCase(int index, int count, StringBuffer str)
{
@ -477,7 +477,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
* processes that do not accept newer characters.</p>
* <p>The data is from the UCD file DerivedAge.txt.</p>
* <p>This API does not check the validity of the codepoint.</p>
* @param ch The code point.
* @param codepoint The code point.
* @return the Unicode version number
* @draft ICU 2.1
*/
@ -622,7 +622,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
/**
* Loads the property data and initialize the UCharacterProperty instance.
* @Exception thrown when data is missing or data has been corrupted.
* @throws RuntimeException when data is missing or data has been corrupted
*/
public static UCharacterProperty getInstance() throws RuntimeException
{
@ -849,7 +849,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
* @param locale locale which the lowercase is looked for
* @param ch codepoint whose lower case is to be matched
* @param uchariter text iterator positioned at the codepoint ch
* @param result array of char to store the result
* @param buffer array in which to store the result
* @return size oflowercased codepoint in UTF16 format
*/
public int toLowerCase(Locale locale, int ch,

View file

@ -7,7 +7,7 @@
package com.ibm.icu.impl;
/**
* @version 1.1
* @version 1.1
* @author Markus W. Scherer
* Ram: Add documentation, remove unwanted methods, improve coverage.
*/
@ -22,7 +22,7 @@ public final class USerializedSet {
/**
* Fill in the given serialized set object.
* @param src pointer to start of array
* @param srcLength length of array
* @param srcStart pointer to start of serialized data (length value)
* @return true if the given array is valid, otherwise false
* @draft ICU 2.4
*/
@ -39,7 +39,7 @@ public final class USerializedSet {
length&=0x7fff;
if(src.length<(srcStart+1+length)) {
length=0;
throw new IndexOutOfBoundsException();
throw new IndexOutOfBoundsException();
}
bmpLength=src[srcStart++];
} else {
@ -61,138 +61,133 @@ public final class USerializedSet {
* else).
* @draft ICU 2.4
*/
public final void setToOne(int c) {
if( 0x10ffff<c) {
return;
}
public final void setToOne(int c) {
if( 0x10ffff<c) {
return;
}
if(c<0xffff) {
bmpLength=length=2;
array[0]=(char)c;
array[1]=(char)(c+1);
} else if(c==0xffff) {
bmpLength=1;
length=3;
array[0]=0xffff;
array[1]=1;
array[2]=0;
} else if(c<0x10ffff) {
bmpLength=0;
length=4;
array[0]=(char)(c>>16);
array[1]=(char)c;
++c;
array[2]=(char)(c>>16);
array[3]=(char)c;
} else /* c==0x10ffff */ {
bmpLength=0;
length=2;
array[0]=0x10;
array[1]=0xffff;
}
}
if(c<0xffff) {
bmpLength=length=2;
array[0]=(char)c;
array[1]=(char)(c+1);
} else if(c==0xffff) {
bmpLength=1;
length=3;
array[0]=0xffff;
array[1]=1;
array[2]=0;
} else if(c<0x10ffff) {
bmpLength=0;
length=4;
array[0]=(char)(c>>16);
array[1]=(char)c;
++c;
array[2]=(char)(c>>16);
array[3]=(char)c;
} else /* c==0x10ffff */ {
bmpLength=0;
length=2;
array[0]=0x10;
array[1]=0xffff;
}
}
/**
* Returns a range of characters contained in the given serialized
* set.
* @param set the serialized set
* @param rangeIndex a non-negative integer in the range 0..
* uset_getSerializedRangeCount(set)-1
* @param pStart pointer to variable to receive first character
* in range, inclusive
* @param pEnd pointer to variable to receive last character in range,
* inclusive
* @param rangeIndex a non-negative integer in the range <code>0..
* getSerializedRangeCount()-1</code>
* @param range variable to receive the data in the range
* @return true if rangeIndex is valid, otherwise false
* @draft ICU 2.4
*/
public final boolean getRange( int rangeIndex,int[] range) {
if( rangeIndex<0) {
return false;
}
if(array==null){
array = new char[8];
}
public final boolean getRange(int rangeIndex, int[] range) {
if( rangeIndex<0) {
return false;
}
if(array==null){
array = new char[8];
}
if(range==null || range.length <2){
throw new IllegalArgumentException();
}
rangeIndex*=2; /* address start/limit pairs */
if(rangeIndex<bmpLength) {
range[0]=array[rangeIndex++];
if(rangeIndex<bmpLength) {
range[1]=array[rangeIndex];
} else if(rangeIndex<length) {
range[1]=(((int)array[rangeIndex])<<16)|array[rangeIndex+1];
} else {
range[1]=0x110000;
}
if(rangeIndex<bmpLength) {
range[0]=array[rangeIndex++];
if(rangeIndex<bmpLength) {
range[1]=array[rangeIndex];
} else if(rangeIndex<length) {
range[1]=(((int)array[rangeIndex])<<16)|array[rangeIndex+1];
} else {
range[1]=0x110000;
}
range[1]-=1;
return true;
} else {
rangeIndex-=bmpLength;
rangeIndex*=2; /* address pairs of pairs of units */
length-=bmpLength;
if(rangeIndex<length) {
int offset=arrayOffset+bmpLength;
range[0]=(((int)array[offset+rangeIndex])<<16)|array[offset+rangeIndex+1];
rangeIndex+=2;
if(rangeIndex<length) {
range[1]=(((int)array[offset+rangeIndex])<<16)|array[offset+rangeIndex+1];
} else {
range[1]=0x110000;
}
return true;
} else {
rangeIndex-=bmpLength;
rangeIndex*=2; /* address pairs of pairs of units */
length-=bmpLength;
if(rangeIndex<length) {
int offset=arrayOffset+bmpLength;
range[0]=(((int)array[offset+rangeIndex])<<16)|array[offset+rangeIndex+1];
rangeIndex+=2;
if(rangeIndex<length) {
range[1]=(((int)array[offset+rangeIndex])<<16)|array[offset+rangeIndex+1];
} else {
range[1]=0x110000;
}
range[1]-=1;
return true;
} else {
return false;
}
}
}
return true;
} else {
return false;
}
}
}
/**
* Returns true if the given USerializedSet contains the given
* character.
* @param set the serialized set
* @param c the character to test for
* @return true if set contains c
* @draft ICU 2.4
*/
///CLOVER:OFF
public final boolean contains(int c) {
if(c>0x10ffff) {
return false;
}
if(c<=0xffff) {
int i;
/* find c in the BMP part */
for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
return (boolean)((i&1) != 0);
} else {
int i;
/* find c in the supplementary part */
char high=(char)(c>>16), low=(char)c;
for(i=bmpLength;
i<length && (high>array[i] || (high==array[i] && low>=array[i+1]));
i+=2) {}
/* count pairs of 16-bit units even per BMP and check if the number of pairs is odd */
return (boolean)(((i+bmpLength)&2)!=0);
}
}
public final boolean contains(int c) {
if(c>0x10ffff) {
return false;
}
if(c<=0xffff) {
int i;
/* find c in the BMP part */
for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
return (boolean)((i&1) != 0);
} else {
int i;
/* find c in the supplementary part */
char high=(char)(c>>16), low=(char)c;
for(i=bmpLength;
i<length && (high>array[i] || (high==array[i] && low>=array[i+1]));
i+=2) {}
/* count pairs of 16-bit units even per BMP and check if the number of pairs is odd */
return (boolean)(((i+bmpLength)&2)!=0);
}
}
///CLOVER:ON
/**
* Returns the number of disjoint ranges of characters contained in
* the given serialized set. Ignores any strings contained in the
* set.
* @param set the serialized set
* @return a non-negative integer counting the character ranges
* contained in set
* @draft ICU 2.4
*/
public final int countRanges() {
return (bmpLength+(length-bmpLength)/2+1)/2;
}
public final int countRanges() {
return (bmpLength+(length-bmpLength)/2+1)/2;
}
private char array[] = new char[8];
private int arrayOffset, bmpLength, length;
}
}

View file

@ -1771,11 +1771,9 @@ public final class Utility {
/**
* Utility method to take a int[] containing codepoints and return
* a string representation with code units.
* TODO: Investigate why this method is not on UTF16 class
* @param source
* @return
*/
public static String valueOf(int[]source){
// TODO: Investigate why this method is not on UTF16 class
StringBuffer result = new StringBuffer(source.length);
for(int i=0; i<source.length; i++){
UTF16.append(result,source[i]);

View file

@ -39,7 +39,7 @@ public final class ZoneMeta {
* associated with the given country. These IDs may be passed to
* <code>TimeZone.getTimeZone()</code> to construct the
* corresponding TimeZone object.
* @param a two-letter ISO 3166 country code, or <code>null</code>
* @param country a two-letter ISO 3166 country code, or <code>null</code>
* 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.