mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator
Reviewed-by: naoto
This commit is contained in:
parent
dfcd65c271
commit
fbbb27e770
1 changed files with 10 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -76,17 +76,15 @@ import jdk.internal.icu.text.NormalizerBase;
|
||||||
* <p>
|
* <p>
|
||||||
* Example of the iterator usage,
|
* Example of the iterator usage,
|
||||||
* <blockquote>
|
* <blockquote>
|
||||||
* <pre>
|
* {@snippet lang=java :
|
||||||
*
|
* String testString = "This is a test";
|
||||||
* String testString = "This is a test";
|
* Collator col = Collator.getInstance();
|
||||||
* Collator col = Collator.getInstance();
|
* if (col instanceof RuleBasedCollator ruleBasedCollator) {
|
||||||
* if (col instanceof RuleBasedCollator) {
|
* CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString);
|
||||||
* RuleBasedCollator ruleBasedCollator = (RuleBasedCollator)col;
|
* int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next());
|
||||||
* CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString);
|
* \u22ee
|
||||||
* int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next());
|
* }
|
||||||
* :
|
* }
|
||||||
* }
|
|
||||||
* </pre>
|
|
||||||
* </blockquote>
|
* </blockquote>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue