ICU-7396 tag/document some new apis

X-SVN-Rev: 27444
This commit is contained in:
Doug Felt 2010-01-29 19:52:36 +00:00
parent 44f7023ffa
commit 985b0b7631
2 changed files with 56 additions and 26 deletions

View File

@ -224,6 +224,11 @@ public class CurrencyMetaInfo {
return new CurrencyFilter(this.region, this.currency, from, to);
}
/**
* Overrides equals.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
@Override
public boolean equals(Object rhs) {
return rhs instanceof CurrencyFilter &&
@ -245,6 +250,11 @@ public class CurrencyMetaInfo {
this.to == rhs.to);
}
/**
* Overrides hashCode.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
@Override
public int hashCode() {
int hc = 0;
@ -262,7 +272,9 @@ public class CurrencyMetaInfo {
}
/**
* Return a string representing the filter, for debugging.
* Returns a string representing the filter, for debugging.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
@Override
public String toString() {
@ -307,6 +319,8 @@ public class CurrencyMetaInfo {
/**
* Returns a string representing the currency digits, for debugging.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
@Override
public String toString() {
@ -380,6 +394,8 @@ public class CurrencyMetaInfo {
/**
* Returns a string useful for debugging.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
@Override
public String toString() {

View File

@ -14,31 +14,45 @@ package com.ibm.icu.text;
* @provisional This API might change or be removed in a future release.
*/
public interface RbnfLenientScanner {
/**
* Return true if a string consists entirely of ignorable
* characters.
* @param s The string to test
* @return true if the string is empty or consists entirely of
* characters that are ignorable.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
boolean allIgnorable(String s);
/**
* Returns true if a string consists entirely of ignorable
* characters.
* @param s The string to test
* @return true if the string is empty or consists entirely of
* characters that are ignorable.
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
boolean allIgnorable(String s);
/**
* Match characters in a string against a prefix and return
* the number of chars that matched, or 0 if no match. Only
* primary-order differences are significant in determining
* whether there's a match. This means that the returned
* value need not be the same as the length of the prefix.
*
* @param str The string being tested
* @param prefix The text we're hoping to see at the beginning of "str"
* @return the number of characters in "str" that were matched
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
public int prefixLength(String str, String prefix);
/**
* Matches characters in a string against a prefix and return
* the number of chars that matched, or 0 if no match. Only
* primary-order differences are significant in determining
* whether there's a match. This means that the returned
* value need not be the same as the length of the prefix.
*
* @param str The string being tested
* @param prefix The text we're hoping to see at the beginning of "str"
* @return the number of characters in "str" that were matched
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
int prefixLength(String str, String prefix);
int[] findText(String str, String key, int startingAt);
/**
* Searches a string for another string. This might use a
* Collator to compare strings, or just do a simple match.
* @param str The string to search
* @param key The string to search "str" for
* @param startingAt The index into "str" where the search is to
* begin
* @return A two-element array of ints. Element 0 is the position
* of the match, or -1 if there was no match. Element 1 is the
* number of characters in "str" that matched (which isn't necessarily
* the same as the length of "key")
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.
*/
int[] findText(String str, String key, int startingAt);
}