mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-24 09:10:08 +00:00
6515695: [Col] java.text.RuleBasedCollator - JavaDoc "Examples" - Two bugs in sample code
Reviewed-by: okutsu
This commit is contained in:
parent
4127266c60
commit
e753774a96
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -180,11 +180,15 @@ import java.util.Locale;
|
||||
*
|
||||
* <p><strong>Examples</strong>
|
||||
* <p>Simple: "< a < b < c < d"
|
||||
* <p>Norwegian: "< a,A< b,B< c,C< d,D< e,E< f,F< g,G< h,H< i,I< j,J
|
||||
* < k,K< l,L< m,M< n,N< o,O< p,P< q,Q< r,R< s,S< t,T
|
||||
* < u,U< v,V< w,W< x,X< y,Y< z,Z
|
||||
* < \u00E5=a\u030A,\u00C5=A\u030A
|
||||
* ;aa,AA< \u00E6,\u00C6< \u00F8,\u00D8"
|
||||
* <p>Norwegian: "< a, A < b, B < c, C < d, D < e, E < f, F
|
||||
* < g, G < h, H < i, I < j, J < k, K < l, L
|
||||
* < m, M < n, N < o, O < p, P < q, Q < r, R
|
||||
* < s, S < t, T < u, U < v, V < w, W < x, X
|
||||
* < y, Y < z, Z
|
||||
* < \u00E6, \u00C6
|
||||
* < \u00F8, \u00D8
|
||||
* < \u00E5 = a\u030A, \u00C5 = A\u030A;
|
||||
* aa, AA"
|
||||
*
|
||||
* <p>
|
||||
* To create a <code>RuleBasedCollator</code> object with specialized
|
||||
@ -199,11 +203,14 @@ import java.util.Locale;
|
||||
* Or:
|
||||
* <blockquote>
|
||||
* <pre>
|
||||
* String Norwegian = "< a,A< b,B< c,C< d,D< e,E< f,F< g,G< h,H< i,I< j,J" +
|
||||
* "< k,K< l,L< m,M< n,N< o,O< p,P< q,Q< r,R< s,S< t,T" +
|
||||
* "< u,U< v,V< w,W< x,X< y,Y< z,Z" +
|
||||
* "< \u00E5=a\u030A,\u00C5=A\u030A" +
|
||||
* ";aa,AA< \u00E6,\u00C6< \u00F8,\u00D8";
|
||||
* String Norwegian = "< a, A < b, B < c, C < d, D < e, E < f, F < g, G < h, H < i, I" +
|
||||
* "< j, J < k, K < l, L < m, M < n, N < o, O < p, P < q, Q < r, R" +
|
||||
* "< s, S < t, T < u, U < v, V < w, W < x, X < y, Y < z, Z" +
|
||||
* "< \u00E6, \u00C6" + // Latin letter ae & AE
|
||||
* "< \u00F8, \u00D8" + // Latin letter o & O with stroke
|
||||
* "< \u00E5 = a\u030A," + // Latin letter a with ring above
|
||||
* " \u00C5 = A\u030A;" + // Latin letter A with ring above
|
||||
* " aa, AA";
|
||||
* RuleBasedCollator myNorwegian = new RuleBasedCollator(Norwegian);
|
||||
* </pre>
|
||||
* </blockquote>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user