Package com.ibm.icu.text

Examples of com.ibm.icu.text.BidiClassifier


                            : customClasses[c]);
        }
    }

    private void verifyClassifier(Bidi bidi) {
        BidiClassifier actualClassifier = bidi.getCustomClassifier();

        if (this.classifier == null) {
            if (actualClassifier != null) {
                errln("Bidi classifier is not yet set, but reported as not null");
            }
        } else {
            Class expectedClass = this.classifier.getClass();
            assertTrue("null Bidi classifier", actualClassifier != null);
            if (actualClassifier == null) {
                return;
            }
            if (expectedClass.isInstance(actualClassifier)) {
                Object context = classifier.getContext();
                if (context == null) {
                    if (actualClassifier.getContext() != null) {
                        errln("Unexpected context, should be null");
                    }
                } else {
                    assertEquals("Unexpected classifier context", context,
                                 actualClassifier.getContext());
                    assertEquals("Unexpected context's content",
                                 ((Integer)context).intValue(),
                                 bidi.getCustomizedClass('a'));
                }
            } else {
                errln("Bidi object reports classifier is an instance of " +
                      actualClassifier.getClass().getName() +
                      ",\nwhile the expected classifier should be an " +
                      "instance of " + expectedClass);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.text.BidiClassifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.