* Sets the Hiragana Quaternary mode to be on or off. When the Hiragana Quaternary mode is turned on, the collator
* positions Hiragana characters before all non-ignorable characters in QUATERNARY strength. This is to produce a
* correct JIS collation order, distinguishing between Katakana and Hiragana characters.
+ *
+ * This attribute is an implementation detail of the CLDR Japanese tailoring.
+ * The implementation might change to use a different mechanism
+ * to achieve the same Japanese sort order.
+ * Since ICU 50, this attribute is not settable any more via API functions.
*
* @param flag
* true if Hiragana Quaternary mode is to be on, false otherwise
* @see #setHiraganaQuaternaryDefault
* @see #isHiraganaQuaternary
- * @stable ICU 2.8
+ * @deprecated ICU 50 Implementation detail, cannot be set via API, might be removed from implementation.
*/
public void setHiraganaQuaternary(boolean flag) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
-
- m_isHiragana4_ = flag;
- updateInternalState();
}
/**
* Sets the Hiragana Quaternary mode to the initial mode set during construction of the RuleBasedCollator. See
* setHiraganaQuaternary(boolean) for more details.
+ *
+ * This attribute is an implementation detail of the CLDR Japanese tailoring.
+ * The implementation might change to use a different mechanism
+ * to achieve the same Japanese sort order.
+ * Since ICU 50, this attribute is not settable any more via API functions.
*
* @see #setHiraganaQuaternary(boolean)
* @see #isHiraganaQuaternary
- * @stable ICU 2.8
+ * @deprecated ICU 50 Implementation detail, cannot be set via API, might be removed from implementation.
*/
public void setHiraganaQuaternaryDefault() {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
-
- m_isHiragana4_ = m_defaultIsHiragana4_;
- updateInternalState();
}
/**
/**
* Checks if the Hiragana Quaternary mode is set on. See setHiraganaQuaternary(boolean) for more details.
+ *
+ * This attribute is an implementation detail of the CLDR Japanese tailoring.
+ * The implementation might change to use a different mechanism
+ * to achieve the same Japanese sort order.
+ * Since ICU 50, this attribute is not settable any more via API functions.
*
* @return flag true if Hiragana Quaternary mode is on, false otherwise
* @see #setHiraganaQuaternaryDefault
* @see #setHiraganaQuaternary(boolean)
- * @stable ICU 2.8
+ * @deprecated ICU 50 Implementation detail, cannot be set via API, might be removed from implementation.
*/
public boolean isHiraganaQuaternary() {
return m_isHiragana4_;
/*
*******************************************************************************
- * Copyright (C) 2002-2011, International Business Machines Corporation and *
- * others. All Rights Reserved. *
+ * Copyright (C) 2002-2012, International Business Machines Corporation and
+ * others. All Rights Reserved.
*******************************************************************************
*/
errln("Setting french collation failed");
}
collator.setHiraganaQuaternary(!hquart);
- if (collator.isHiraganaQuaternary() == hquart) {
- errln("Setting hiragana quartenary failed");
+ if (collator.isHiraganaQuaternary() != hquart) {
+ errln("Setting hiragana quartenary worked but should be a no-op since ICU 50");
}
collator.setLowerCaseFirst(!lowercase);
if (collator.isLowerCaseFirst() == lowercase) {
/*
*******************************************************************************
- * Copyright (C) 2002-2010, International Business Machines Corporation and *
- * others. All Rights Reserved. *
+ * Copyright (C) 2002-2012, International Business Machines Corporation and
+ * others. All Rights Reserved.
*******************************************************************************
*/
int result;
String string1 = new String(tmp1);
String string2 = new String(tmp2);
- RuleBasedCollator rb = (RuleBasedCollator)Collator.getInstance(ULocale.JAPAN);
- rb.setHiraganaQuaternary(true);
+ RuleBasedCollator rb = (RuleBasedCollator)Collator.getInstance(ULocale.JAPANESE);
rb.setStrength(Collator.QUATERNARY);
rb.setAlternateHandlingShifted(false);