⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbtfdictionary.html

📁 是一个加快Java应用程序国际化和本地化开发的工具集。它将大大减少国际化和本地化开发的所消耗的时间和资源。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<DT><B>Parameters:</B><DD><CODE>filename</CODE> - The balance binary tree file that stores the dictionary.<DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - if the file is somehow invalid.</DL></DD></DL><HR><A NAME="BbtfDictionary(java.lang.String, boolean)"><!-- --></A><H3>BbtfDictionary</H3><PRE>public <B>BbtfDictionary</B>(java.lang.String&nbsp;filename,                      boolean&nbsp;updatable)               throws java.lang.IllegalArgumentException</PRE><DL><DD>Constructs a dictionary with caching.<DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - The balance binary tree file that stores the dictionary.<DD><CODE>updatable</CODE> - true specifies the dictionary can be on-line updated.<DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - if the file is somehow invalid.</DL></DD></DL><HR><A NAME="BbtfDictionary(java.lang.String, boolean, boolean, java.util.Properties)"><!-- --></A><H3>BbtfDictionary</H3><PRE>public <B>BbtfDictionary</B>(java.lang.String&nbsp;filename,                      boolean&nbsp;cached,                      boolean&nbsp;updatable,                      java.util.Properties&nbsp;prop)               throws java.lang.IllegalArgumentException</PRE><DL><DD>Constructs a dictionary specifying caching or not, read-only or not.<DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - The balance binary tree file that stores the dictionary.<DD><CODE>cached</CODE> - true if use caching.<DD><CODE>updatable</CODE> - true specifies the dictionary can be on-line updated.<DD><CODE>prop</CODE> - if this dictionary has not been created, use prop to specify its properties when creating; if it exists, then ignore prop.<DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - if the file is somehow invalid.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setDictionaryInfo(java.util.Properties)"><!-- --></A><H3>setDictionaryInfo</H3><PRE>protected void <B>setDictionaryInfo</B>(java.util.Properties&nbsp;prop)</PRE><DL><DD>Sub-class can override this method for setting properties for a newly created dictionary. In overriden, should call super.setDictionaryInfo(prop) before return.<DD><DL></DL></DD></DL><HR><A NAME="setLocalesFromFile(java.lang.String)"><!-- --></A><H3>setLocalesFromFile</H3><PRE>protected void <B>setLocalesFromFile</B>(java.lang.String&nbsp;filename)                           throws java.lang.IllegalArgumentException</PRE><DL><DD>Sets the dictionary's source and target language locale via its filename. Does nothing by default. Sub-class should override this method.<DD><DL></DL></DD></DL><HR><A NAME="getDictionaryInfo()"><!-- --></A><H3>getDictionaryInfo</H3><PRE>public java.util.Properties <B>getDictionaryInfo</B>()</PRE><DL><DD>Gets the dictionary's information, eg. description, etc.. May take some time to finish.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#getDictionaryInfo()">getDictionaryInfo</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>null if no properties can be found.</DL></DD></DL><HR><A NAME="setSource(java.util.Locale)"><!-- --></A><H3>setSource</H3><PRE>public void <B>setSource</B>(java.util.Locale&nbsp;locale)</PRE><DL><DD>Sets the source locale. It specifies the source key's language.<DD><DL></DL></DD></DL><HR><A NAME="setTarget(java.util.Locale)"><!-- --></A><H3>setTarget</H3><PRE>public void <B>setTarget</B>(java.util.Locale&nbsp;locale)</PRE><DL><DD>Sets the target locale. It specifies the target meanings' language.<DD><DL></DL></DD></DL><HR><A NAME="getSource()"><!-- --></A><H3>getSource</H3><PRE>public java.util.Locale <B>getSource</B>()</PRE><DL><DD>Get source locale. It specifies the source key's language.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#getSource()">getSource</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>the source language locale will be translated from.</DL></DD></DL><HR><A NAME="getTarget()"><!-- --></A><H3>getTarget</H3><PRE>public java.util.Locale <B>getTarget</B>()</PRE><DL><DD>Get target locale. It specifies the target meanings' language.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#getTarget()">getTarget</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>the target language locale a source key will be translated to.</DL></DD></DL><HR><A NAME="elements()"><!-- --></A><H3>elements</H3><PRE>public java.util.Enumeration <B>elements</B>()</PRE><DL><DD>Returns an enumeration of the meanings in this dictionary.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#elements()">elements</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>enumeration of the meanings in the dictionary. Null on error.</DL></DD></DL><HR><A NAME="keys()"><!-- --></A><H3>keys</H3><PRE>public java.util.Enumeration <B>keys</B>()</PRE><DL><DD>Returns an enumeration of the keys in this dictionary.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#keys()">keys</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>enumeration of the meanings in the dictionary. Null on error.</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Tests if this dictionary maps no keys to meaning.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#isEmpty()">isEmpty</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>ture if it contains no maps.</DL></DD></DL><HR><A NAME="get(java.lang.String)"><!-- --></A><H3>get</H3><PRE>public java.lang.String[] <B>get</B>(java.lang.String&nbsp;key)</PRE><DL><DD>Looks up in the dictionary. Returns the meanings to which the key is mapped in this dictionary.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#get(java.lang.String)">get</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Parameters:</B><DD><CODE>key</CODE> - any string.<DT><B>Returns:</B><DD>null if not found.</DL></DD></DL><HR><A NAME="lookup(java.lang.String)"><!-- --></A><H3>lookup</H3><PRE>protected java.util.Vector <B>lookup</B>(java.lang.String&nbsp;key)</PRE><DL><DD>Looks up in the supporting dictionary. Cache is not used. Returns the meanings to which the key is mapped in this dictionary.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - not null and not empty.<DT><B>Returns:</B><DD>null if not found or abnormal.</DL></DD></DL><HR><A NAME="select(java.lang.String, int)"><!-- --></A><H3>select</H3><PRE>public java.lang.String <B>select</B>(java.lang.String&nbsp;key,                               int&nbsp;index)</PRE><DL><DD>Returns the meaning with the index to all meanings to which the key is mapped.  If index is less than zero, return the 1st meaning. If the index is larger than meaning count, return the last meaning.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#select(java.lang.String, int)">select</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Parameters:</B><DD><CODE>key</CODE> - the text which we return its meaning.<DD><CODE>index</CODE> - the number <index> meaning of the cadidates, starts from 0.<DT><B>Returns:</B><DD>null if no meaning is available.</DL></DD></DL><HR><A NAME="put(java.lang.String, java.lang.String[])"><!-- --></A><H3>put</H3><PRE>public java.lang.String[] <B>put</B>(java.lang.String&nbsp;key,                              java.lang.String[]&nbsp;meanings)</PRE><DL><DD>Maps the specified key to the specified meaning in this dictionary.  This method works in overriden mode. Only valid string(not null and not blank) can be used as key. Only valid strings(not null and not blank) can be used as meanings.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#put(java.lang.String, java.lang.String[])">put</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>the values successfully inserted, otherwise null.</DL></DD></DL><HR><A NAME="getMeaningCount(java.lang.String)"><!-- --></A><H3>getMeaningCount</H3><PRE>public int <B>getMeaningCount</B>(java.lang.String&nbsp;key)</PRE><DL><DD>Returns the number of meanings to which the key is mapped.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#getMeaningCount(java.lang.String)">getMeaningCount</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>-1 if no key found, otherwise the number of meanings of the key.</DL></DD></DL><HR><A NAME="append(java.lang.String, java.lang.String)"><!-- --></A><H3>append</H3><PRE>public java.lang.String <B>append</B>(java.lang.String&nbsp;key,                               java.lang.String&nbsp;meaning)</PRE><DL><DD>Append the specified key to the specified meaning in this dictionary. Only valid string(not null and not blank) can be used as key. Only valid string(not null and not blank) can be used as meaning.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#append(java.lang.String, java.lang.String)">append</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>the meaning appended on success; otherwise return null.</DL></DD></DL><HR><A NAME="remove(java.lang.String)"><!-- --></A><H3>remove</H3><PRE>public java.lang.String[] <B>remove</B>(java.lang.String&nbsp;key)</PRE><DL><DD>Removes the key (and its corresponding meanings) from this dictionary.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#remove(java.lang.String)">remove</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>the meanings removed. null if it is not updatable or on errors.</DL></DD></DL><HR><A NAME="remove(java.lang.String, java.lang.String)"><!-- --></A><H3>remove</H3><PRE>public java.lang.String <B>remove</B>(java.lang.String&nbsp;key,                               java.lang.String&nbsp;meaning)</PRE><DL><DD>Removes the meaning of the key from this dictionary.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#remove(java.lang.String, java.lang.String)">remove</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>the meanings removed. null if it is not updatable or on errors.</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of keys in this dictionary.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html#size()">size</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/Dictionary.html">Dictionary</A><DT><B>Returns:</B><DD>-1 means abnormal.</DL></DD></DL><HR><A NAME="trimAsciiString(java.lang.String)"><!-- --></A><H3>trimAsciiString</H3><PRE>protected java.lang.String <B>trimAsciiString</B>(java.lang.String&nbsp;meaning)</PRE><DL><DD>Returns the string that is meant to have only native chars, eg. ';', '=', etc. will be removed from the meaning str if there is. This method is used for backward compatible.<DD><DL><DT><B>Parameters:</B><DD><CODE>meaning</CODE> - the meaning string.<DT><B>Returns:</B><DD>simply returns the meaning by default.</DL></DD></DL><HR><A NAME="refreshCache()"><!-- --></A><H3>refreshCache</H3><PRE>public void <B>refreshCache</B>()</PRE><DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -