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


java.lang.Object
   com.ibm.icu.impl.RuleCharacterIterator

RuleCharacterIterator
public class RuleCharacterIterator (Code)
An iterator that returns 32-bit code points. This class is deliberately not related to any of the JDK or ICU4J character iterator classes in order to minimize complexity.
author:
   Alan Liu
since:
   ICU 2.8


Field Summary
final public static  intDONE
     Value returned when there are no more characters to iterate.
final public static  intPARSE_ESCAPES
     Bitmask option to enable parsing of escape sequences.
final public static  intPARSE_VARIABLES
     Bitmask option to enable parsing of variable names.
final public static  intSKIP_WHITESPACE
     Bitmask option to enable skipping of whitespace.

Constructor Summary
public  RuleCharacterIterator(String text, SymbolTable sym, ParsePosition pos)
     Constructs an iterator over the given text, starting at the given position.
Parameters:
  text - the text to be iterated
Parameters:
  sym - the symbol table, or null if there is none.

Method Summary
public  booleanatEnd()
     Returns true if this iterator has no more characters to return.
public  ObjectgetPos(Object p)
     Returns an object which, when later passed to setPos(), will restore this iterator's position.
public  booleaninVariable()
     Returns true if this iterator is currently within a variable expansion.
public  booleanisEscaped()
     Returns true if the last character returned by next() was escaped.
public  voidjumpahead(int count)
     Advances the position by the given number of 16-bit code units.
public  Stringlookahead()
     Returns a string containing the remainder of the characters to be returned by this iterator, without any option processing.
public  intnext(int options)
     Returns the next character using the given options, or DONE if there are no more characters, and advance the position to the next character.
Parameters:
  options - one or more of the following options, bitwise-OR-edtogether: PARSE_VARIABLES, PARSE_ESCAPES, SKIP_WHITESPACE.
public  voidsetPos(Object p)
     Restores this iterator to the position it had when getPos() returned the given object.
public  voidskipIgnored(int options)
     Skips ahead past any ignored characters, as indicated by the given options.
public  StringtoString()
     Returns a string representation of this object, consisting of the characters being iterated, with a '|' marking the current position.

Field Detail
DONE
final public static int DONE(Code)
Value returned when there are no more characters to iterate.



PARSE_ESCAPES
final public static int PARSE_ESCAPES(Code)
Bitmask option to enable parsing of escape sequences. If (options & PARSE_ESCAPES) != 0, then an embedded escape sequence will be expanded to its value. Escapes are parsed using Utility.unescapeAt().



PARSE_VARIABLES
final public static int PARSE_VARIABLES(Code)
Bitmask option to enable parsing of variable names. If (options & PARSE_VARIABLES) != 0, then an embedded variable will be expanded to its value. Variables are parsed using the SymbolTable API.



SKIP_WHITESPACE
final public static int SKIP_WHITESPACE(Code)
Bitmask option to enable skipping of whitespace. If (options & SKIP_WHITESPACE) != 0, then whitespace characters will be silently skipped, as if they were not present in the input. Whitespace characters are defined by UCharacterProperty.isRuleWhiteSpace().




Constructor Detail
RuleCharacterIterator
public RuleCharacterIterator(String text, SymbolTable sym, ParsePosition pos)(Code)
Constructs an iterator over the given text, starting at the given position.
Parameters:
  text - the text to be iterated
Parameters:
  sym - the symbol table, or null if there is none. If sym is null,then variables will not be deferenced, even if the PARSE_VARIABLESoption is set.
Parameters:
  pos - upon input, the index of the next character to return. If avariable has been dereferenced, then pos will not increment ascharacters of the variable value are iterated.




Method Detail
atEnd
public boolean atEnd()(Code)
Returns true if this iterator has no more characters to return.



getPos
public Object getPos(Object p)(Code)
Returns an object which, when later passed to setPos(), will restore this iterator's position. Usage idiom: RuleCharacterIterator iterator = ...; Object pos = iterator.getPos(null); // allocate position object for (;;) { pos = iterator.getPos(pos); // reuse position object int c = iterator.next(...); ... } iterator.setPos(pos);
Parameters:
  p - a position object previously returned by getPos(),or null. If not null, it will be updated and returned. Ifnull, a new position object will be allocated and returned. a position object which may be passed to setPos(),either `p,' or if `p' == null, a newly-allocated object



inVariable
public boolean inVariable()(Code)
Returns true if this iterator is currently within a variable expansion.



isEscaped
public boolean isEscaped()(Code)
Returns true if the last character returned by next() was escaped. This will only be the case if the option passed in to next() included PARSE_ESCAPED and the next character was an escape sequence.



jumpahead
public void jumpahead(int count)(Code)
Advances the position by the given number of 16-bit code units. This is useful in conjunction with the lookahead() method.
Parameters:
  count - the number of 16-bit code units to jump over



lookahead
public String lookahead()(Code)
Returns a string containing the remainder of the characters to be returned by this iterator, without any option processing. If the iterator is currently within a variable expansion, this will only extend to the end of the variable expansion. This method is provided so that iterators may interoperate with string-based APIs. The typical sequence of calls is to call skipIgnored(), then call lookahead(), then parse the string returned by lookahead(), then call jumpahead() to resynchronize the iterator. a string containing the characters to be returned by futurecalls to next()



next
public int next(int options)(Code)
Returns the next character using the given options, or DONE if there are no more characters, and advance the position to the next character.
Parameters:
  options - one or more of the following options, bitwise-OR-edtogether: PARSE_VARIABLES, PARSE_ESCAPES, SKIP_WHITESPACE. the current 32-bit code point, or DONE



setPos
public void setPos(Object p)(Code)
Restores this iterator to the position it had when getPos() returned the given object.
Parameters:
  p - a position object previously returned by getPos()



skipIgnored
public void skipIgnored(int options)(Code)
Skips ahead past any ignored characters, as indicated by the given options. This is useful in conjunction with the lookahead() method. Currently, this only has an effect for SKIP_WHITESPACE.
Parameters:
  options - one or more of the following options, bitwise-OR-edtogether: PARSE_VARIABLES, PARSE_ESCAPES, SKIP_WHITESPACE.



toString
public String toString()(Code)
Returns a string representation of this object, consisting of the characters being iterated, with a '|' marking the current position. Position within an expanded variable is not indicated. a string representation of this object



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.