?? hyphenationtree.html
字號:
<HR>
<A NAME="hstrcmp(char[], int, char[], int)"><!-- --></A><H3>
hstrcmp</H3>
<PRE>
protected int <B>hstrcmp</B>(char[] s, int si, char[] t, int ti)</PRE>
<DL>
<DD>String compare, returns 0 if equal or t is a substring of s
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getValues(int)"><!-- --></A><H3>
getValues</H3>
<PRE>
protected byte[] <B>getValues</B>(int k)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="searchPatterns(char[], int, byte[])"><!-- --></A><H3>
searchPatterns</H3>
<PRE>
protected void <B>searchPatterns</B>(char[] word, int index, byte[] il)</PRE>
<DL>
<DD><p>Search for all possible partial matches of word starting at index an update interletter values. In other words, it does something like:</p> <code> for(i=0; i<patterns.length; i++) { if ( word.substring(index).startsWidth(patterns[i]) ) update_interletter_values(patterns[i]); } </code> <p>But it is done in an efficient way since the patterns are stored in a ternary tree. In fact, this is the whole purpose of having the tree: doing this search without having to test every single pattern. The number of patterns for languages such as English range from 4000 to 10000. Thus, doing thousands of string comparisons for each word to hyphenate would be really slow without the tree. The tradeoff is memory, but using a ternary tree instead of a trie, almost halves the the memory used by Lout or TeX. It's also faster than using a hash table</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>word</CODE> - null terminated word to match<DD><CODE>index</CODE> - start index from word<DD><CODE>il</CODE> - interletter values array to update</DL>
</DD>
</DL>
<HR>
<A NAME="hyphenate(java.lang.String, int, int)"><!-- --></A><H3>
hyphenate</H3>
<PRE>
public <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html">Hyphenation</A> <B>hyphenate</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> word, int remainCharCount, int pushCharCount)</PRE>
<DL>
<DD>Hyphenate word and return a Hyphenation object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>word</CODE> - the word to be hyphenated<DD><CODE>remainCharCount</CODE> - Minimum number of characters allowed before the hyphenation point.<DD><CODE>pushCharCount</CODE> - Minimum number of characters allowed after the hyphenation point.<DT><B>Returns:</B><DD>a <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html"><CODE>Hyphenation</CODE></A> object representing the hyphenated word or null if word is not hyphenated.</DL>
</DD>
</DL>
<HR>
<A NAME="hyphenate(char[], int, int, int, int)"><!-- --></A><H3>
hyphenate</H3>
<PRE>
public <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html">Hyphenation</A> <B>hyphenate</B>(char[] w, int offset, int len, int remainCharCount, int pushCharCount)</PRE>
<DL>
<DD>Hyphenate word and return an array of hyphenation points.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>w</CODE> - char array that contains the word<DD><CODE>offset</CODE> - Offset to first character in word<DD><CODE>len</CODE> - Length of word<DD><CODE>remainCharCount</CODE> - Minimum number of characters allowed before the hyphenation point.<DD><CODE>pushCharCount</CODE> - Minimum number of characters allowed after the hyphenation point.<DT><B>Returns:</B><DD>a <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html"><CODE>Hyphenation</CODE></A> object representing the hyphenated word or null if word is not hyphenated.</DL>
</DD>
</DL>
<HR>
<A NAME="addClass(java.lang.String)"><!-- --></A><H3>
addClass</H3>
<PRE>
public void <B>addClass</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> chargroup)</PRE>
<DL>
<DD>Add a character class to the tree. It is used by PatternParser as callback to add character classes. Character classes define the valid word characters for hyphenation. If a word contains a character not defined in any of the classes, it is not hyphenated. It also defines a way to normalize the characters in order to compare them with the stored patterns. Usually pattern files use only lower case characters, in this case a class for letter 'a', for example, should be defined as "aA", the first character being the normalization char.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html#addClass(java.lang.String)">addClass</A></CODE> in interface <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html">PatternConsumer</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addException(java.lang.String, java.util.Vector)"><!-- --></A><H3>
addException</H3>
<PRE>
public void <B>addException</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> word, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Vector.html">Vector</A> hyphenatedword)</PRE>
<DL>
<DD>Add an exception to the tree. It is used by PatternParser class as callback to store the hyphenation exceptions.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html#addException(java.lang.String, java.util.Vector)">addException</A></CODE> in interface <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html">PatternConsumer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>word</CODE> - normalized word<DD><CODE>hyphenatedword</CODE> - a vector of alternating strings and <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphen.html"><CODE>hyphen</CODE></A> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="addPattern(java.lang.String, java.lang.String)"><!-- --></A><H3>
addPattern</H3>
<PRE>
public void <B>addPattern</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> pattern, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> ivalue)</PRE>
<DL>
<DD>Add a pattern to the tree. Mainly, to be used by PatternParser class as callback to add a pattern to the tree.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html#addPattern(java.lang.String, java.lang.String)">addPattern</A></CODE> in interface <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html">PatternConsumer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the hyphenation pattern<DD><CODE>ivalue</CODE> - interletter weight values indicating the desirability and priority of hyphenating at a given point within the pattern. It should contain only digit characters. (i.e. '0' to '9').</DL>
</DD>
</DL>
<HR>
<A NAME="printStats()"><!-- --></A><H3>
printStats</H3>
<PRE>
public void <B>printStats</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/TernaryTree.html#printStats()">printStats</A></CODE> in class <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/TernaryTree.html">TernaryTree</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html"><B>PREV CLASS</B></A>
<A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenator.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="HyphenationTree.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: <A HREF="#nested_classes_inherited_from_class_com.lowagie.text.pdf.hyphenation.TernaryTree">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -