src/java.base/share/classes/java/text/RuleBasedCollator.java
changeset 51759 ac6e9a2ebc04
parent 47216 71c04702a3d5
child 58242 94bb65cb37d3
child 58678 9cf78a70fa4f
equal deleted inserted replaced
51758:6c956c883137 51759:ac6e9a2ebc04
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   346 
   346 
   347     /**
   347     /**
   348      * Compares the character data stored in two different strings based on the
   348      * Compares the character data stored in two different strings based on the
   349      * collation rules.  Returns information about whether a string is less
   349      * collation rules.  Returns information about whether a string is less
   350      * than, greater than or equal to another string in a language.
   350      * than, greater than or equal to another string in a language.
   351      * This can be overriden in a subclass.
   351      * This can be overridden in a subclass.
   352      *
   352      *
   353      * @exception NullPointerException if <code>source</code> or <code>target</code> is null.
   353      * @exception NullPointerException if <code>source</code> or <code>target</code> is null.
   354      */
   354      */
   355     public synchronized int compare(String source, String target)
   355     public synchronized int compare(String source, String target)
   356     {
   356     {
   565     }
   565     }
   566 
   566 
   567     /**
   567     /**
   568      * Transforms the string into a series of characters that can be compared
   568      * Transforms the string into a series of characters that can be compared
   569      * with CollationKey.compareTo. This overrides java.text.Collator.getCollationKey.
   569      * with CollationKey.compareTo. This overrides java.text.Collator.getCollationKey.
   570      * It can be overriden in a subclass.
   570      * It can be overridden in a subclass.
   571      */
   571      */
   572     public synchronized CollationKey getCollationKey(String source)
   572     public synchronized CollationKey getCollationKey(String source)
   573     {
   573     {
   574         //
   574         //
   575         // The basic algorithm here is to find all of the collation elements for each
   575         // The basic algorithm here is to find all of the collation elements for each