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


java.lang.Object
   com.ibm.icu.text.BreakIterator
      com.ibm.icu.text.RuleBasedBreakIterator

All known Subclasses:   com.ibm.icu.text.DictionaryBasedBreakIterator,
RuleBasedBreakIterator
public class RuleBasedBreakIterator extends BreakIterator (Code)
Rule Based Break Iterator This is a port of the C++ class RuleBasedBreakIterator from ICU4C.


Field Summary
final public static  intWORD_IDEO
    
final public static  intWORD_IDEO_LIMIT
    
final public static  intWORD_KANA
    
final public static  intWORD_KANA_LIMIT
    
final public static  intWORD_LETTER
     Tag value for words that contain letters, excluding hiragana, katakana or ideographic characters, lower limit.
final public static  intWORD_LETTER_LIMIT
    
final public static  intWORD_NONE
     Tag value for "words" that do not fit into any of other categories.
final public static  intWORD_NONE_LIMIT
     Upper bound for tags for uncategorized words.
final public static  intWORD_NUMBER
     Tag value for words that appear to be numbers, lower limit.
final public static  intWORD_NUMBER_LIMIT
     Tag value for words that appear to be numbers, upper limit.
protected static  StringfDebugEnv
     Control debug, trace and dump options.
protected  intfDictionaryCharCount
     Counter for the number of characters encountered with the "dictionary" flag set.
protected  RBBIDataWrapperfRData
    
public static  booleanfTrace
     Debugging flag.

Constructor Summary
public  RuleBasedBreakIterator()
    
public  RuleBasedBreakIterator(String rules)
     Construct a RuleBasedBreakIterator from a set of rules supplied as a string.

Method Summary
static  intCICurrent32(CharacterIterator ci)
    
static  intCINext32(CharacterIterator ci)
     Move the iterator forward to the next code point, and return that code point, leaving the iterator positioned at char returned.
final protected static  voidcheckOffset(int offset, CharacterIterator text)
     Throw IllegalArgumentException unless begin <= offset < end.
public  Objectclone()
     Clones this iterator.
public  intcurrent()
     Returns the current iteration position.
public  voiddump()
     Dump the contents of the state table and character classes for this break iterator.
public  booleanequals(Object that)
     Returns true if both BreakIterators are of the same class, have the same rules, and iterate over the same text.
public  intfirst()
     Sets the current iteration position to the beginning of the text.
public  intfollowing(int offset)
     Sets the iterator to refer to the first boundary position following the specified position.
Parameters:
  offset - The position from which to begin searching for a break position.
public static  RuleBasedBreakIteratorgetInstanceFromCompiledRules(InputStream is)
     Create a break iterator from a precompiled set of rules.
public  intgetRuleStatus()
     Return the status tag from the break rule that determined the most recently returned break position.
public  intgetRuleStatusVec(int[] fillInArray)
     Get the status (tag) values from the break rule(s) that determined the most recently returned break position.
public  CharacterIteratorgetText()
     Return a CharacterIterator over the text being analyzed.
 inthandleNext()
    
public  inthashCode()
    
public  booleanisBoundary(int offset)
     Returns true if the specfied position is a boundary position.
 booleanisDictionaryChar(int c)
    
public  intlast()
     Sets the current iteration position to the end of the text.
public  intnext(int n)
     Advances the iterator either forward or backward the specified number of steps. Negative values move backward, and positive values move forward.
public  intnext()
     Advances the iterator to the next boundary position.
public  intpreceding(int offset)
     Sets the iterator to refer to the last boundary position before the specified position.
Parameters:
  offset - The position to begin searching for a break from.
public  intprevious()
     Moves the iterator backwards, to the last boundary preceding this one.
public  voidsetText(CharacterIterator newText)
     Set the iterator to analyze a new piece of text.
public  StringtoString()
     Returns the description (rules) used to create this iterator.

Field Detail
WORD_IDEO
final public static int WORD_IDEO(Code)
Tag value for words containing ideographic characters, lower limit



WORD_IDEO_LIMIT
final public static int WORD_IDEO_LIMIT(Code)
Tag value for words containing ideographic characters, upper limit



WORD_KANA
final public static int WORD_KANA(Code)
Tag value for words containing kana characters, lower limit



WORD_KANA_LIMIT
final public static int WORD_KANA_LIMIT(Code)
Tag value for words containing kana characters, upper limit



WORD_LETTER
final public static int WORD_LETTER(Code)
Tag value for words that contain letters, excluding hiragana, katakana or ideographic characters, lower limit.



WORD_LETTER_LIMIT
final public static int WORD_LETTER_LIMIT(Code)
Tag value for words containing letters, upper limit



WORD_NONE
final public static int WORD_NONE(Code)
Tag value for "words" that do not fit into any of other categories. Includes spaces and most punctuation.



WORD_NONE_LIMIT
final public static int WORD_NONE_LIMIT(Code)
Upper bound for tags for uncategorized words.



WORD_NUMBER
final public static int WORD_NUMBER(Code)
Tag value for words that appear to be numbers, lower limit.



WORD_NUMBER_LIMIT
final public static int WORD_NUMBER_LIMIT(Code)
Tag value for words that appear to be numbers, upper limit.



fDebugEnv
protected static String fDebugEnv(Code)
Control debug, trace and dump options.



fDictionaryCharCount
protected int fDictionaryCharCount(Code)
Counter for the number of characters encountered with the "dictionary" flag set. Normal RBBI iterators don't use it, although the code for updating it is live. Dictionary Based break iterators (a subclass of us) access this field directly.



fRData
protected RBBIDataWrapper fRData(Code)
The rule data for this BreakIterator instance



fTrace
public static boolean fTrace(Code)
Debugging flag. Trace operation of state machine when true.




Constructor Detail
RuleBasedBreakIterator
public RuleBasedBreakIterator()(Code)



RuleBasedBreakIterator
public RuleBasedBreakIterator(String rules)(Code)
Construct a RuleBasedBreakIterator from a set of rules supplied as a string.
Parameters:
  rules - The break rules to be used.
Parameters:
  parseError - In the event of a syntax error in the rules, provides the locationwithin the rules of the problem.
Parameters:
  status - Information on any errors encountered.




Method Detail
CICurrent32
static int CICurrent32(CharacterIterator ci)(Code)



CINext32
static int CINext32(CharacterIterator ci)(Code)
Move the iterator forward to the next code point, and return that code point, leaving the iterator positioned at char returned. For Supplementary chars, the iterator is left positioned at the lead surrogate.
Parameters:
  ci - The character iterator The next code point.



checkOffset
final protected static void checkOffset(int offset, CharacterIterator text)(Code)
Throw IllegalArgumentException unless begin <= offset < end.



clone
public Object clone()(Code)
Clones this iterator. A newly-constructed RuleBasedBreakIterator with the samebehavior as this one.



current
public int current()(Code)
Returns the current iteration position. The current iteration position.



dump
public void dump()(Code)
Dump the contents of the state table and character classes for this break iterator. For debugging only.



equals
public boolean equals(Object that)(Code)
Returns true if both BreakIterators are of the same class, have the same rules, and iterate over the same text.



first
public int first()(Code)
Sets the current iteration position to the beginning of the text. (i.e., the CharacterIterator's starting offset). The offset of the beginning of the text.



following
public int following(int offset)(Code)
Sets the iterator to refer to the first boundary position following the specified position.
Parameters:
  offset - The position from which to begin searching for a break position. The position of the first break after the current position.



getInstanceFromCompiledRules
public static RuleBasedBreakIterator getInstanceFromCompiledRules(InputStream is) throws IOException(Code)
Create a break iterator from a precompiled set of rules.



getRuleStatus
public int getRuleStatus()(Code)
Return the status tag from the break rule that determined the most recently returned break position. The values appear in the rule source within brackets, {123}, for example. For rules that do not specify a status, a default value of 0 is returned. If more than one rule applies, the numerically largest of the possible status values is returned.

Of the standard types of ICU break iterators, only the word break iterator provides status values. The values are defined in class RuleBasedBreakIterator, and allow distinguishing between words that contain alphabetic letters, "words" that appear to be numbers, punctuation and spaces, words containing ideographic characters, and more. Call getRuleStatus after obtaining a boundary position from next(), previous(), or any other break iterator functions that returns a boundary position.

the status from the break rule that determined the most recentlyreturned break position.




getRuleStatusVec
public int getRuleStatusVec(int[] fillInArray)(Code)
Get the status (tag) values from the break rule(s) that determined the most recently returned break position. The values appear in the rule source within brackets, {123}, for example. The default status value for rules that do not explicitly provide one is zero.

The status values used by the standard ICU break rules are defined as public constants in class RuleBasedBreakIterator.

If the size of the output array is insufficient to hold the data, the output will be truncated to the available length. No exception will be thrown.
Parameters:
  fillInArray - an array to be filled in with the status values. The number of rule status values from rules that determined the most recent boundary returned by the break iterator.In the event that the array is too small, the return valueis the total number of status values that were available,not the reduced number that were actually returned.




getText
public CharacterIterator getText()(Code)
Return a CharacterIterator over the text being analyzed. This version of this method returns the actual CharacterIterator we're using internally. Changing the state of this iterator can have undefined consequences. If you need to change it, clone it first. An iterator over the text being analyzed.



handleNext
int handleNext()(Code)



hashCode
public int hashCode()(Code)
Compute a hashcode for this BreakIterator A hash code



isBoundary
public boolean isBoundary(int offset)(Code)
Returns true if the specfied position is a boundary position. As a side effect, leaves the iterator pointing to the first boundary position at or after "offset".
Parameters:
  offset - the offset to check. True if "offset" is a boundary position.



isDictionaryChar
boolean isDictionaryChar(int c)(Code)



last
public int last()(Code)
Sets the current iteration position to the end of the text. (i.e., the CharacterIterator's ending offset). The text's past-the-end offset.



next
public int next(int n)(Code)
Advances the iterator either forward or backward the specified number of steps. Negative values move backward, and positive values move forward. This is equivalent to repeatedly calling next() or previous().
Parameters:
  n - The number of steps to move. The sign indicates the direction(negative is backwards, and positive is forwards). The character offset of the boundary position n boundaries away fromthe current one.



next
public int next()(Code)
Advances the iterator to the next boundary position. The position of the first boundary after this one.



preceding
public int preceding(int offset)(Code)
Sets the iterator to refer to the last boundary position before the specified position.
Parameters:
  offset - The position to begin searching for a break from. The position of the last boundary before the starting position.



previous
public int previous()(Code)
Moves the iterator backwards, to the last boundary preceding this one. The position of the last boundary position preceding this one.



setText
public void setText(CharacterIterator newText)(Code)
Set the iterator to analyze a new piece of text. This function resets the current iteration position to the beginning of the text.
Parameters:
  newText - An iterator over the text to analyze.



toString
public String toString()(Code)
Returns the description (rules) used to create this iterator. (In ICU4C, the same function is RuleBasedBreakIterator::getRules())



Fields inherited from com.ibm.icu.text.BreakIterator
final public static int DONE(Code)(Java Doc)
final public static int KIND_CHARACTER(Code)(Java Doc)
final public static int KIND_LINE(Code)(Java Doc)
final public static int KIND_SENTENCE(Code)(Java Doc)
final public static int KIND_TITLE(Code)(Java Doc)
final public static int KIND_WORD(Code)(Java Doc)

Methods inherited from com.ibm.icu.text.BreakIterator
public Object clone()(Code)(Java Doc)
abstract public int current()(Code)(Java Doc)
abstract public int first()(Code)(Java Doc)
abstract public int following(int offset)(Code)(Java Doc)
public static synchronized Locale[] getAvailableLocales()(Code)(Java Doc)
public static synchronized ULocale[] getAvailableULocales()(Code)(Java Doc)
public static BreakIterator getBreakInstance(ULocale where, int kind)(Code)(Java Doc)
public static BreakIterator getCharacterInstance()(Code)(Java Doc)
public static BreakIterator getCharacterInstance(Locale where)(Code)(Java Doc)
public static BreakIterator getCharacterInstance(ULocale where)(Code)(Java Doc)
public static BreakIterator getLineInstance()(Code)(Java Doc)
public static BreakIterator getLineInstance(Locale where)(Code)(Java Doc)
public static BreakIterator getLineInstance(ULocale where)(Code)(Java Doc)
final public ULocale getLocale(ULocale.Type type)(Code)(Java Doc)
public static BreakIterator getSentenceInstance()(Code)(Java Doc)
public static BreakIterator getSentenceInstance(Locale where)(Code)(Java Doc)
public static BreakIterator getSentenceInstance(ULocale where)(Code)(Java Doc)
abstract public CharacterIterator getText()(Code)(Java Doc)
public static BreakIterator getTitleInstance()(Code)(Java Doc)
public static BreakIterator getTitleInstance(Locale where)(Code)(Java Doc)
public static BreakIterator getTitleInstance(ULocale where)(Code)(Java Doc)
public static BreakIterator getWordInstance()(Code)(Java Doc)
public static BreakIterator getWordInstance(Locale where)(Code)(Java Doc)
public static BreakIterator getWordInstance(ULocale where)(Code)(Java Doc)
public boolean isBoundary(int offset)(Code)(Java Doc)
abstract public int last()(Code)(Java Doc)
abstract public int next(int n)(Code)(Java Doc)
abstract public int next()(Code)(Java Doc)
public int preceding(int offset)(Code)(Java Doc)
abstract public int previous()(Code)(Java Doc)
public static Object registerInstance(BreakIterator iter, Locale locale, int kind)(Code)(Java Doc)
public static Object registerInstance(BreakIterator iter, ULocale locale, int kind)(Code)(Java Doc)
final void setLocale(ULocale valid, ULocale actual)(Code)(Java Doc)
public void setText(String newText)(Code)(Java Doc)
abstract public void setText(CharacterIterator newText)(Code)(Java Doc)
public static boolean unregister(Object key)(Code)(Java Doc)

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.