Code example for Collator

Methods: equals

0
    public boolean equals(Object that) {
        if (this == that) {
            return true; 
        } else if (that instanceof CollatorOrdering) {
            final CollatorOrdering other = CollatorOrdering.class.cast(that);
            return locale.equals(other.locale) && collator.equals(other.collator);
        } else { 
            return false; 
        } 
    } 
     
    @Override 
    public int hashCode() { 
        return collator.hashCode() ^ 754623731;
    } 
     
    @Override 
    public String toString() {
        return "Strings.orderBy(" + locale + ")";
    }