CollationElementIterator.java: Reformated.
2004-01-06 Michael Koch <konqueror@gmx.de> * java/text/CollationElementIterator.java: Reformated. (CollationElementIterator): Changed order of arguments. * java/text/RuleBasedCollator.java (RuleBasedCollator): Merged class documentation. (CollationElement): Added documentation. (compare): Reformated, renamed arguments. (equals): Likewise. (getCollationElementIterator): Likewise. (getCollationKey): Likewise. From-SVN: r75484
This commit is contained in:
parent
64d961b859
commit
5f383ba58b
3 changed files with 62 additions and 38 deletions
|
@ -53,6 +53,7 @@ package java.text;
|
|||
*
|
||||
* @author Aaron M. Renn <arenn@urbanophile.com>
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @author Guilhem Lavaux <guilhem.lavaux@free.fr>
|
||||
*/
|
||||
public final class CollationElementIterator
|
||||
{
|
||||
|
@ -89,15 +90,17 @@ public final class CollationElementIterator
|
|||
* @param collator The <code>RuleBasedCollation</code> used for calculating collation values
|
||||
* @param text The <code>String</code> to iterate over.
|
||||
*/
|
||||
CollationElementIterator (String text, RuleBasedCollator collator)
|
||||
CollationElementIterator(RuleBasedCollator collator, String text)
|
||||
{
|
||||
setText (text);
|
||||
this.collator = collator;
|
||||
|
||||
setText (text);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the collation ordering value of the next character
|
||||
* in the string. This method will return <code>NULLORDER</code> if the
|
||||
* This method returns the collation ordering value of the next character sequence
|
||||
* in the string (it may be an extended character following collation rules).
|
||||
* This method will return <code>NULLORDER</code> if the
|
||||
* end of the string was reached.
|
||||
*
|
||||
* @return The collation ordering value.
|
||||
|
@ -118,7 +121,7 @@ public final class CollationElementIterator
|
|||
*
|
||||
* @return The primary order value of the specified collation value. This is the high 16 bits.
|
||||
*/
|
||||
public static final int primaryOrder (int order)
|
||||
public static final int primaryOrder(int order)
|
||||
{
|
||||
// From the JDK 1.2 spec.
|
||||
return order >>> 16;
|
||||
|
@ -141,7 +144,7 @@ public final class CollationElementIterator
|
|||
*
|
||||
* @return The secondary order value of the specified collation value. This is the bits 8-15.
|
||||
*/
|
||||
public static final short secondaryOrder (int order)
|
||||
public static final short secondaryOrder(int order)
|
||||
{
|
||||
// From the JDK 1.2 spec.
|
||||
return (short) ((order >>> 8) & 255);
|
||||
|
@ -155,7 +158,7 @@ public final class CollationElementIterator
|
|||
*
|
||||
* @return The tertiary order value of the specified collation value. This is the low eight bits.
|
||||
*/
|
||||
public static final short tertiaryOrder (int order)
|
||||
public static final short tertiaryOrder(int order)
|
||||
{
|
||||
// From the JDK 1.2 spec.
|
||||
return (short) (order & 255);
|
||||
|
@ -169,7 +172,7 @@ public final class CollationElementIterator
|
|||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public void setText (String text)
|
||||
public void setText(String text)
|
||||
{
|
||||
this.text = text;
|
||||
this.index = 0;
|
||||
|
@ -189,6 +192,4 @@ public final class CollationElementIterator
|
|||
{
|
||||
return index;
|
||||
}
|
||||
|
||||
} // class CollationElementIterator
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue