public boolean equals(String source, String target) { return (compare(source, target) == 0); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }
public boolean equals(String source, String target) { return (compare(source, target) == 0); }
public boolean equals(String source, String target) { return (compare(source, target) == 0); }
public boolean equals(String source, String target) { return (compare(source, target) == 0); }
public boolean equals(String source, String target) { return (compare(source, target) == 0); }
public boolean equals(String source, String target) { return (compare(source, target) == 0); }
public boolean equals(String source, String target) { return (compare(source, target) == 0); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }
/** * Compares the {@code source} text to the {@code target} text according to * the collation rules, strength and decomposition mode for this * {@code RuleBasedCollator}. See the {@code Collator} class description * for an example of use. * <p> * General recommendation: If comparisons are to be done with the same strings * multiple times, it is more efficient to generate {@code CollationKey} * objects for the strings and use * {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each * string is compared to only once, using * {@code RuleBasedCollator.compare(String, String)} has better performance. * * @param source * the source text. * @param target * the target text. * @return an integer which may be a negative value, zero, or else a * positive value depending on whether {@code source} is less than, * equivalent to, or greater than {@code target}. */ @Override public int compare(String source, String target) { if (source == null) { throw new NullPointerException("source == null"); } else if (target == null) { throw new NullPointerException("target == null"); } return icuColl.compare(source, target); }