Java Doc for UScriptRun.java in  » Internationalization-Localization » icu4j » com » ibm » icu » lang » 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 » Internationalization Localization » icu4j » com.ibm.icu.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.lang.UScriptRun

UScriptRun
final public class UScriptRun (Code)
UScriptRun is used to find runs of characters in the same script, as defined in the UScript class. It implements a simple iterator over an array of characters. The iterator will assign COMMON and INHERITED characters to the same script as the preceeding characters. If the COMMON and INHERITED characters are first, they will be assigned to the same script as the following characters. The iterator will try to match paired punctuation. If it sees an opening punctuation character, it will remember the script that was assigned to that character, and assign the same script to the matching closing punctuation. No attempt is made to combine related scripts into a single run. In particular, Hiragana, Katakana, and Han characters will appear in seperate runs. Here is an example of how to iterate over script runs:
 void printScriptRuns(char[] text)
 {
 UScriptRun scriptRun = new UScriptRun(text);
 while (scriptRun.next()) {
 int start  = scriptRun.getScriptStart();
 int limit  = scriptRun.getScriptLimit();
 int script = scriptRun.getScriptCode();
 System.out.println("Script \"" + UScript.getName(script) + "\" from " +
 start + " to " + limit + ".");
 }
 }
 



Constructor Summary
public  UScriptRun()
     Construct an empty UScriptRun object.
public  UScriptRun(String text)
     Construct a UScriptRun object which iterates over the characters in the given string.
public  UScriptRun(String text, int start, int count)
     Construct a UScriptRun object which iterates over a subrange of the characetrs in the given string.
public  UScriptRun(char[] chars)
     Construct a UScriptRun object which iterates over the given characetrs.
public  UScriptRun(char[] chars, int start, int count)
     Construct a UScriptRun object which iterates over a subrange of the given characetrs.

Method Summary
final public  intgetScriptCode()
     Get the script code for the script of the current script run.
final public  intgetScriptLimit()
     Get the index of the first character after the current script run.
final public  intgetScriptStart()
     Get the starting index of the current script run.
final public  booleannext()
     Find the next script run.
final public  voidreset()
     Reset the iterator to the start of the text.
final public  voidreset(int start, int count)
     Reset the iterator to iterate over the given range of the text.
final public  voidreset(char[] chars, int start, int count)
     Reset the iterator to iterate over count characters in chars starting at start.
final public  voidreset(char[] chars)
     Reset the iterator to iterate over the characters in chars.
final public  voidreset(String text, int start, int count)
     Reset the iterator to iterate over count characters in text starting at start.
final public  voidreset(String text)
     Reset the iterator to iterate over the characters in text.


Constructor Detail
UScriptRun
public UScriptRun()(Code)
Construct an empty UScriptRun object. The next() method will return false the first time it is called.



UScriptRun
public UScriptRun(String text)(Code)
Construct a UScriptRun object which iterates over the characters in the given string.
Parameters:
  text - the string of characters over which to iterate.



UScriptRun
public UScriptRun(String text, int start, int count)(Code)
Construct a UScriptRun object which iterates over a subrange of the characetrs in the given string.
Parameters:
  text - the string of characters over which to iterate.
Parameters:
  start - the index of the first character over which to iterate
Parameters:
  count - the number of characters over which to iterate



UScriptRun
public UScriptRun(char[] chars)(Code)
Construct a UScriptRun object which iterates over the given characetrs.
Parameters:
  chars - the array of characters over which to iterate.



UScriptRun
public UScriptRun(char[] chars, int start, int count)(Code)
Construct a UScriptRun object which iterates over a subrange of the given characetrs.
Parameters:
  chars - the array of characters over which to iterate.
Parameters:
  start - the index of the first character over which to iterate
Parameters:
  count - the number of characters over which to iterate




Method Detail
getScriptCode
final public int getScriptCode()(Code)
Get the script code for the script of the current script run. the script code for the script of the current script run.
See Also:   com.ibm.icu.lang.UScript



getScriptLimit
final public int getScriptLimit()(Code)
Get the index of the first character after the current script run. the index of the first character after the current script run.



getScriptStart
final public int getScriptStart()(Code)
Get the starting index of the current script run. the index of the first character in the current script run.



next
final public boolean next()(Code)
Find the next script run. Returns false if there isn't another run, returns true if there is. false if there isn't another run, true if there is.



reset
final public void reset()(Code)
Reset the iterator to the start of the text.



reset
final public void reset(int start, int count) throws IllegalArgumentException(Code)
Reset the iterator to iterate over the given range of the text. Throws IllegalArgumentException if the range is outside of the bounds of the character array.
Parameters:
  start - the index of the new first character over which to iterate
Parameters:
  count - the new number of characters over which to iterate.
exception:
  IllegalArgumentException -



reset
final public void reset(char[] chars, int start, int count)(Code)
Reset the iterator to iterate over count characters in chars starting at start. This allows clients to reuse an iterator.
Parameters:
  chars - the new array of characters over which to iterate.
Parameters:
  start - the index of the first character over which to iterate.
Parameters:
  count - the number of characters over which to iterate.



reset
final public void reset(char[] chars)(Code)
Reset the iterator to iterate over the characters in chars. This allows clients to reuse an iterator.
Parameters:
  chars - the new array of characters over which to iterate.



reset
final public void reset(String text, int start, int count)(Code)
Reset the iterator to iterate over count characters in text starting at start. This allows clients to reuse an iterator.
Parameters:
  text - the new string of characters over which to iterate.
Parameters:
  start - the index of the first character over which to iterate.
Parameters:
  count - the nuber of characters over which to iterate.



reset
final public void reset(String text)(Code)
Reset the iterator to iterate over the characters in text. This allows clients to reuse an iterator.
Parameters:
  text - the new string of characters over which to iterate.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) 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.