private CollationKey getCollationKey(String source, CollationBuffer buffer) { buffer.rawCollationKey = getRawCollationKey(source, buffer.rawCollationKey, buffer); return new CollationKey(source, buffer.rawCollationKey); }
/** * <p> * Transforms the String into a CollationKey suitable for efficient * repeated comparison. The resulting key depends on the collator's * rules, strength and decomposition mode. * </p> * <p>See the CollationKey class documentation for more information.</p> * @param source the string to be transformed into a CollationKey. * @return the CollationKey for the given String based on this Collator's * collation rules. If the source String is null, a null * CollationKey is returned. * @see CollationKey * @see #compare(String, String) * @see #getRawCollationKey * @stable ICU 2.8 */ public CollationKey getCollationKey(String source) { return new CollationKey(collator.getCollationKey(source)); }
/** * <p> * Transforms the String into a CollationKey suitable for efficient * repeated comparison. The resulting key depends on the collator's * rules, strength and decomposition mode. * </p> * <p>See the CollationKey class documentation for more information.</p> * @param source the string to be transformed into a CollationKey. * @return the CollationKey for the given String based on this Collator's * collation rules. If the source String is null, a null * CollationKey is returned. * @see CollationKey * @see #compare(String, String) * @see #getRawCollationKey * @stable ICU 2.8 */ public CollationKey getCollationKey(String source) { return new CollationKey(collator.getCollationKey(source)); }
return new CollationKey(null, resultkey, offset);
return new CollationKey(null, result, rindex);