Java Doc for RuleBasedCollator.java in  » Apache-Harmony-Java-SE » java-package » java » text » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.text.Collator
      java.text.RuleBasedCollator

RuleBasedCollator
public class RuleBasedCollator extends Collator (Code)
RuleBasedCollator is a concrete subclass of Collator. It allows customization of the Collator via user-specified rule sets. RuleBasedCollator is designed to be fully compliant to the Unicode Collation Algorithm (UCA) and conforms to ISO 14651.

Create a RuleBasedCollator from a locale by calling the getInstance(Locale) factory method in the base class Collator.Collator.getInstance(Locale) creates a RuleBasedCollator object based on the collation rules defined by the argument locale. If a customized collation is required, use the RuleBasedCollator(String) constructor with the appropriate rules. The customized RuleBasedCollator will base its ordering on UCA, while re-adjusting the attributes and orders of the characters in the specified rule accordingly.




Constructor Summary
 RuleBasedCollator(com.ibm.icu.text.Collator wrapper)
    
public  RuleBasedCollator(String rules)
     Constructs a new instance of RuleBasedCollator using the specified rules.

Method Summary
public  Objectclone()
    
public  intcompare(String source, String target)
     Compares the source text String to the target text String according to the collation rules, strength and decomposition mode for this RuleBasedCollator.
public  booleanequals(Object obj)
     Compares the equality of two RuleBasedCollator objects. RuleBasedCollator objects are equal if they have the same collation rules and the same attributes.
Parameters:
  obj - the other object.
public  CollationElementIteratorgetCollationElementIterator(CharacterIterator source)
     Obtains a CollationElementIterator for the given CharacterIterator.
public  CollationElementIteratorgetCollationElementIterator(String source)
     Obtains a CollationElementIterator for the given String.
public  CollationKeygetCollationKey(String source)
     Obtains the CollationKey for the given source text.
public  StringgetRules()
     Obtains the collation rules of the RuleBasedCollator.
public  inthashCode()
    


Constructor Detail
RuleBasedCollator
RuleBasedCollator(com.ibm.icu.text.Collator wrapper)(Code)



RuleBasedCollator
public RuleBasedCollator(String rules) throws ParseException(Code)
Constructs a new instance of RuleBasedCollator using the specified rules.
Parameters:
  rules - the collation rules.
throws:
  ParseException - when the rules contains an invalid collation rule syntax.




Method Detail
clone
public Object clone()(Code)
Obtains the cloned object of the RuleBasedCollator the cloned object of the RuleBasedCollator



compare
public int compare(String source, String target)(Code)
Compares the source text String to the target text String according to the collation rules, strength and decomposition mode for this RuleBasedCollator. See the Collator class description for an example of use.

General recommendation: If comparisons are to be done to the same String multiple times, it would be more efficient to generate CollationKeys for the String s and use CollationKey.compareTo(CollationKey) for the comparisons. If the each Strings are compared to only once, using the method RuleBasedCollator.compare(String, String) will have a better performance.


Parameters:
  source - the source text
Parameters:
  target - the target text an integer which may be a negative value, zero, or else apositive value depending on whether source is lessthan, equivalent to, or greater than target.



equals
public boolean equals(Object obj)(Code)
Compares the equality of two RuleBasedCollator objects. RuleBasedCollator objects are equal if they have the same collation rules and the same attributes.
Parameters:
  obj - the other object. true if this RuleBasedCollator hasexactly the same collation behaviour as obj, falseotherwise.



getCollationElementIterator
public CollationElementIterator getCollationElementIterator(CharacterIterator source)(Code)
Obtains a CollationElementIterator for the given CharacterIterator. The source iterator's integrity will be preserved since a new copy will be created for use.
Parameters:
  source - the specified source a CollationElementIterator for the source.



getCollationElementIterator
public CollationElementIterator getCollationElementIterator(String source)(Code)
Obtains a CollationElementIterator for the given String.
Parameters:
  source - the specified source a CollationElementIterator for the given String



getCollationKey
public CollationKey getCollationKey(String source)(Code)
Obtains the CollationKey for the given source text.
Parameters:
  source - the specified source text the CollationKey for the given source text.



getRules
public String getRules()(Code)
Obtains the collation rules of the RuleBasedCollator. the collation rules.



hashCode
public int hashCode()(Code)
Obtains a unique hash code for the RuleBasedCollator the hash code for the RuleBasedCollator



Fields inherited from java.text.Collator
final public static int CANONICAL_DECOMPOSITION(Code)(Java Doc)
final static int EQUAL(Code)(Java Doc)
final public static int FULL_DECOMPOSITION(Code)(Java Doc)
final static int GREATER(Code)(Java Doc)
final public static int IDENTICAL(Code)(Java Doc)
final static int LESS(Code)(Java Doc)
final public static int NO_DECOMPOSITION(Code)(Java Doc)
final public static int PRIMARY(Code)(Java Doc)
final public static int SECONDARY(Code)(Java Doc)
final public static int TERTIARY(Code)(Java Doc)
com.ibm.icu.text.Collator icuColl(Code)(Java Doc)

Methods inherited from java.text.Collator
public Object clone()(Code)(Java Doc)
public int compare(Object object1, Object object2)(Code)(Java Doc)
abstract public int compare(String string1, String string2)(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
public boolean equals(String string1, String string2)(Code)(Java Doc)
public static Locale[] getAvailableLocales()(Code)(Java Doc)
abstract public CollationKey getCollationKey(String string)(Code)(Java Doc)
public int getDecomposition()(Code)(Java Doc)
public static Collator getInstance()(Code)(Java Doc)
public static Collator getInstance(Locale locale)(Code)(Java Doc)
public int getStrength()(Code)(Java Doc)
abstract public int hashCode()(Code)(Java Doc)
public void setDecomposition(int value)(Code)(Java Doc)
public void setStrength(int value)(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.