Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4383944

wrong example in CollationElementIterator api doc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • docs
    • beta3
    • x86
    • windows_nt
    • Verified

      Merlin B38

      The following example are not correct in the api doc.

      // get the first key of the string
       String str = "This is a test";
       CollationElementIterator c =
           new CollationElementIterator(str, 0, str.length(), Collator.getInstance());
       int primaryOrder = CollationElementIterator.primaryOrder(c->next());

      The class is a final class and can't be constructed this way. And c->next() is C++ term not java.
       
      bae-chul.kim@eng 2000-10-27

            shommel Scott Hommel (Inactive)
            bkimsunw Bae-chul Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: