equal
deleted
inserted
replaced
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 |