
import java.awt.font.NumericShaper;
import java.util.EnumSet;
import static java.awt.font.NumericShaper.*;

public class Test{
    public static void main(String[] args) {
        NumericShaper ns1 = getContextualShaper(ARABIC | TAMIL, TAMIL);
        NumericShaper ns2 = getContextualShaper(
                                EnumSet.of(Range.ARABIC, Range.TAMIL),
                                Range.TAMIL);

        System.out.println(ns1.equals(ns2));
        if (ns1.equals(ns2) && ns1.hashCode() != ns2.hashCode()) {
            throw new RuntimeException("ns1 and ns2 have different hash codes: "
                + ns1.hashCode() + " vs " + ns2.hashCode());
        }

    }
}