
package org.apache.dubbo.common.utils;

import java.util.Comparator;

/**
 * The {@link Comparator} for {@link CharSequence}
 *
 * @since 2.7.6
 */
public class CharSequenceComparator implements Comparator<CharSequence> {

    public static final CharSequenceComparator INSTANCE = new CharSequenceComparator();

    private CharSequenceComparator() {
    }

    @Override
    public int compare(CharSequence c1, CharSequence c2) {
        return c1.toString().compareTo(c2.toString());
    }
}
