Java Doc for UCharacterIterator.java in  » 6.0-JDK-Modules-sun » text » sun » text » normalizer » 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 » 6.0 JDK Modules sun » text » sun.text.normalizer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.text.normalizer.UCharacterIterator

All known Subclasses:   sun.text.normalizer.ReplaceableUCharacterIterator,  sun.text.normalizer.CharacterIteratorWrapper,
UCharacterIterator
abstract public class UCharacterIterator implements Cloneable(Code)
Abstract class that defines an API for iteration on text objects.This is an interface for forward and backward iteration and random access into a text object. Forward iteration is done with post-increment and backward iteration is done with pre-decrement semantics, while the java.text.CharacterIterator interface methods provided forward iteration with "pre-increment" and backward iteration with pre-decrement semantics. This API is more efficient for forward iteration over code points. The other major difference is that this API can do both code unit and code point iteration, java.text.CharacterIterator can only iterate over code units and is limited to BMP (0 - 0xFFFF)
author:
   Ram


Field Summary
final public static  intDONE
     Indicator that we have reached the ends of the UTF16 text.

Constructor Summary
protected  UCharacterIterator()
    

Method Summary
public  Objectclone()
     Creates a copy of this iterator, independent from other iterators.
abstract public  intcurrent()
     Returns the code unit at the current index.
abstract public  intgetIndex()
     Gets the current index in text.
final public static  UCharacterIteratorgetInstance(String source)
     Returns a UCharacterIterator object given a source string.
final public static  UCharacterIteratorgetInstance(StringBuffer source)
     Returns a UCharacterIterator object given a source StringBuffer.
final public static  UCharacterIteratorgetInstance(CharacterIterator source)
     Returns a UCharacterIterator object given a CharacterIterator.
Parameters:
  source - a valid CharacterIterator object.
abstract public  intgetLength()
    
abstract public  intgetText(char[] fillIn, int offset)
     Fills the buffer with the underlying text storage of the iterator If the buffer capacity is not enough a exception is thrown.
final public  intgetText(char[] fillIn)
     Convenience override for getText(char[], int) that provides an offset of 0.
Parameters:
  fillIn - an array of chars to fill with the underlying UTF-16 code units.
public  StringgetText()
    
public  intmoveIndex(int delta)
     Moves the current position by the number of code units specified, either forward or backward depending on the sign of delta (positive or negative respectively).
abstract public  intnext()
     Returns the UTF16 code unit at index, and increments to the next code unit (post-increment semantics).
public  intnextCodePoint()
     Returns the code point at index, and increments to the next code point (post-increment semantics).
abstract public  intprevious()
     Decrement to the position of the previous code unit in the text, and return it (pre-decrement semantics).
abstract public  voidsetIndex(int index)
     Sets the index to the specified index in the text.
Parameters:
  index - the index within the text.

Field Detail
DONE
final public static int DONE(Code)
Indicator that we have reached the ends of the UTF16 text. Moved from UForwardCharacterIterator.java




Constructor Detail
UCharacterIterator
protected UCharacterIterator()(Code)
Protected default constructor for the subclasses




Method Detail
clone
public Object clone() throws CloneNotSupportedException(Code)
Creates a copy of this iterator, independent from other iterators. If it is not possible to clone the iterator, returns null. copy of this iterator



current
abstract public int current()(Code)
Returns the code unit at the current index. If index is out of range, returns DONE. Index is not changed. current code unit



getIndex
abstract public int getIndex()(Code)
Gets the current index in text. current index in text.



getInstance
final public static UCharacterIterator getInstance(String source)(Code)
Returns a UCharacterIterator object given a source string.
Parameters:
  source - a string UCharacterIterator object
exception:
  IllegalArgumentException - if the argument is null



getInstance
final public static UCharacterIterator getInstance(StringBuffer source)(Code)
Returns a UCharacterIterator object given a source StringBuffer.
Parameters:
  source - an string buffer of UTF-16 code units UCharacterIterator object
exception:
  IllegalArgumentException - if the argument is null



getInstance
final public static UCharacterIterator getInstance(CharacterIterator source)(Code)
Returns a UCharacterIterator object given a CharacterIterator.
Parameters:
  source - a valid CharacterIterator object. UCharacterIterator object
exception:
  IllegalArgumentException - if the argument is null



getLength
abstract public int getLength()(Code)
Returns the length of the text length of the text



getText
abstract public int getText(char[] fillIn, int offset)(Code)
Fills the buffer with the underlying text storage of the iterator If the buffer capacity is not enough a exception is thrown. The capacity of the fill in buffer should at least be equal to length of text in the iterator obtained by calling getLength(). Usage:
 UChacterIterator iter = new UCharacterIterator.getInstance(text);
 char[] buf = new char[iter.getLength()];
 iter.getText(buf);
 OR
 char[] buf= new char[1];
 int len = 0;
 for(;;){
 try{
 len = iter.getText(buf);
 break;
 }catch(IndexOutOfBoundsException e){
 buf = new char[iter.getLength()];
 }
 }
 

Parameters:
  fillIn - an array of chars to fill with the underlying UTF-16 code units.
Parameters:
  offset - the position within the array to start putting the data. the number of code units added to fillIn, as a convenience
exception:
  IndexOutOfBounds - exception if there is not enoughroom after offset in the array, or if offset < 0.



getText
final public int getText(char[] fillIn)(Code)
Convenience override for getText(char[], int) that provides an offset of 0.
Parameters:
  fillIn - an array of chars to fill with the underlying UTF-16 code units. the number of code units added to fillIn, as a convenience
exception:
  IndexOutOfBounds - exception if there is not enoughroom in the array.



getText
public String getText()(Code)
Convenience method for returning the underlying text storage as as string the underlying text storage in the iterator as a string



moveIndex
public int moveIndex(int delta)(Code)
Moves the current position by the number of code units specified, either forward or backward depending on the sign of delta (positive or negative respectively). If the resulting index would be less than zero, the index is set to zero, and if the resulting index would be greater than limit, the index is set to limit.
Parameters:
  delta - the number of code units to move the currentindex. the new index.
exception:
  IndexOutOfBoundsException - is thrown if an invalid index is supplied



next
abstract public int next()(Code)
Returns the UTF16 code unit at index, and increments to the next code unit (post-increment semantics). If index is out of range, DONE is returned, and the iterator is reset to the limit of the text. the next UTF16 code unit, or DONE if the index is at the limitof the text.



nextCodePoint
public int nextCodePoint()(Code)
Returns the code point at index, and increments to the next code point (post-increment semantics). If index does not point to a valid surrogate pair, the behavior is the same as next(). Otherwise the iterator is incremented past the surrogate pair, and the code point represented by the pair is returned. the next codepoint in text, or DONE if the index is atthe limit of the text.



previous
abstract public int previous()(Code)
Decrement to the position of the previous code unit in the text, and return it (pre-decrement semantics). If the resulting index is less than 0, the index is reset to 0 and DONE is returned. the previous code unit in the text, or DONE if the newindex is before the start of the text.



setIndex
abstract public void setIndex(int index)(Code)
Sets the index to the specified index in the text.
Parameters:
  index - the index within the text.
exception:
  IndexOutOfBoundsException - is thrown if an invalid index is supplied



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.