*/
public static class FixedDecimal extends Number implements Comparable<FixedDecimal> {
private static final long serialVersionUID = -4756200506571685661L;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final double source;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final int visibleDecimalDigitCount;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final int visibleDecimalDigitCountWithoutTrailingZeros;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final long decimalDigits;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final long decimalDigitsWithoutTrailingZeros;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final long integerValue;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final boolean hasIntegerValue;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final boolean isNegative;
private final int baseFactor;
return hasIntegerValue;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public int intValue() {
// TODO Auto-generated method stub
return (int)integerValue;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public long longValue() {
return integerValue;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public float floatValue() {
return (float) source;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public double doubleValue() {
return source;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public long getShiftedValue() {
return integerValue * baseFactor + decimalDigits;
}
* @deprecated This API is ICU internal only.
*/
public static class FixedDecimalRange {
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final FixedDecimal start;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final FixedDecimal end;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public FixedDecimalRange(FixedDecimal start, FixedDecimal end) {
if (start.visibleDecimalDigitCount != end.visibleDecimalDigitCount) {
throw new IllegalArgumentException("Ranges must have the same number of visible decimals: " + start + "~" + end);
this.start = start;
this.end = end;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public String toString() {
return start + (end == start ? "" : "~" + end);
* @deprecated This API is ICU internal only.
*/
public static class FixedDecimalSamples {
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final SampleType sampleType;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final Set<FixedDecimalRange> samples;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final boolean bounded;
/**
* The samples must be immutable.
this.samples = samples;
this.bounded = bounded;
}
- /**
+ /*
* Parse a list of the form described in CLDR. The source must be trimmed.
- * @param source
- * @return
*/
static FixedDecimalSamples parse(String source) {
SampleType sampleType2;
}
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public Set<Double> addSamples(Set<Double> result) {
for (FixedDecimalRange item : samples) {
// we have to convert to longs so we don't get strange double issues
return result;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public String toString() {
StringBuilder b = new StringBuilder("@").append(sampleType.toString().toLowerCase(Locale.ENGLISH));
return b.toString();
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public Set<FixedDecimalRange> getSamples() {
return samples;
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public void getStartEndSamples(Set<FixedDecimal> target) {
for (FixedDecimalRange item : samples) {
target.add(item.start);
+ (decimalSamples == null ? "" : " " + decimalSamples.toString());
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public int hashCode() {
return keyword.hashCode() ^ constraint.hashCode();
this.keywords = Collections.unmodifiableSet(rules.getKeywords());
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
@Override
public int hashCode() {
return rules.hashCode();
* @param keyword the keyword
* @return the values that trigger this keyword, or null. The returned collection
* is immutable. It will be empty if the keyword is not defined.
- * @stable ICU 4.8
+ *
+ * @internal
+ * @deprecated This API is ICU internal only.
*/
public Collection<Double> getAllKeywordValues(String keyword, SampleType type) {
if (!isLimited(keyword, type)) {
return result.size() == 0 ? null : Collections.unmodifiableSet(result);
}
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public boolean addSample(String keyword, Number sample, int maxCount, Set<Double> result) {
String selectedKeyword = sample instanceof FixedDecimal ? select((FixedDecimal)sample) : select(sample.doubleValue());
if (selectedKeyword.equals(keyword)) {
/**
* @author markdavis
* Refactor samples as first step to moving into CLDR
+ *
+ * @internal
+ * @deprecated This API is ICU internal only.
*/
public class PluralSamples {
private PluralRules pluralRules;
private final Map<String, List<Double>> _keySamplesMap;
+
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public final Map<String, Boolean> _keyLimitedMap;
private final Map<String, Set<FixedDecimal>> _keyFractionSamplesMap;
private final Set<FixedDecimal> _fractionSamples;
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public PluralSamples(PluralRules pluralRules) {
this.pluralRules = pluralRules;
Set<String> keywords = pluralRules.getKeywords();
return 37;
}
- /**
- * @deprecated This API is ICU internal only.
- * @internal
- */
+ @SuppressWarnings("unused")
private static final Comparator<String> KEYWORD_COMPARATOR = new Comparator<String> () {
public int compare(String arg0, String arg1) {
StandardPluralCategories a = StandardPluralCategories.forString(arg0);
}
};
+ /**
+ * @internal
+ * @deprecated This API is ICU internal only.
+ */
public KeywordStatus getStatus(String keyword, int offset, Set<Double> explicits, Output<Double> uniqueValue) {
if (uniqueValue != null) {
uniqueValue.value = null;