3 Star 2 Fork 0

duguying/java.text

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Format.html 26.51 KB
一键复制 编辑 原始数据 按行查看 历史
独孤影 提交于 2015-01-20 03:00 +08:00 . 初始英文文档
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.6.0_18) on Fri Sep 26 17:01:27 PDT 2014 -->
<title>Format (Java Platform SE 7 )</title>
<meta name="date" content="2014-09-26">
<meta name="keywords" content="java.text.Format class">
<meta name="keywords" content="format()">
<meta name="keywords" content="formatToCharacterIterator()">
<meta name="keywords" content="parseObject()">
<meta name="keywords" content="clone()">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Format (Java Platform SE 7 )";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Format.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;7</strong></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../java/text/FieldPosition.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/Format.Field.html" title="class in java.text"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?java/text/Format.html" target="_top">Frames</a></li>
<li><a href="Format.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">java.text</div>
<h2 title="Class Format" class="title">Class Format</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>java.text.Format</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../java/io/Serializable.html" title="interface in java.io">Serializable</a>, <a href="../../java/lang/Cloneable.html" title="interface in java.lang">Cloneable</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a>, <a href="../../java/text/MessageFormat.html" title="class in java.text">MessageFormat</a>, <a href="../../java/text/NumberFormat.html" title="class in java.text">NumberFormat</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">Format</span>
extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a>
implements <a href="../../java/io/Serializable.html" title="interface in java.io">Serializable</a>, <a href="../../java/lang/Cloneable.html" title="interface in java.lang">Cloneable</a></pre>
<div class="block"><code>Format</code> is an abstract base class for formatting locale-sensitive
information such as dates, messages, and numbers.
<p>
<code>Format</code> defines the programming interface for formatting
locale-sensitive objects into <code>String</code>s (the
<code>format</code> method) and for parsing <code>String</code>s back
into objects (the <code>parseObject</code> method).
<p>
Generally, a format's <code>parseObject</code> method must be able to parse
any string formatted by its <code>format</code> method. However, there may
be exceptional cases where this is not possible. For example, a
<code>format</code> method might create two adjacent integer numbers with
no separator in between, and in this case the <code>parseObject</code> could
not tell which digits belong to which number.
<h4>Subclassing</h4>
<p>
The Java Platform provides three specialized subclasses of <code>Format</code>--
<code>DateFormat</code>, <code>MessageFormat</code>, and
<code>NumberFormat</code>--for formatting dates, messages, and numbers,
respectively.
<p>
Concrete subclasses must implement three methods:
<ol>
<li> <code>format(Object obj, StringBuffer toAppendTo, FieldPosition pos)</code>
<li> <code>formatToCharacterIterator(Object obj)</code>
<li> <code>parseObject(String source, ParsePosition pos)</code>
</ol>
These general methods allow polymorphic parsing and formatting of objects
and are used, for example, by <code>MessageFormat</code>.
Subclasses often also provide additional <code>format</code> methods for
specific input types as well as <code>parse</code> methods for specific
result types. Any <code>parse</code> method that does not take a
<code>ParsePosition</code> argument should throw <code>ParseException</code>
when no text in the required format is at the beginning of the input text.
<p>
Most subclasses will also implement the following factory methods:
<ol>
<li>
<code>getInstance</code> for getting a useful format object appropriate
for the current locale
<li>
<code>getInstance(Locale)</code> for getting a useful format
object appropriate for the specified locale
</ol>
In addition, some subclasses may also implement other
<code>getXxxxInstance</code> methods for more specialized control. For
example, the <code>NumberFormat</code> class provides
<code>getPercentInstance</code> and <code>getCurrencyInstance</code>
methods for getting specialized number formatters.
<p>
Subclasses of <code>Format</code> that allow programmers to create objects
for locales (with <code>getInstance(Locale)</code> for example)
must also implement the following class method:
<blockquote>
<pre>
public static Locale[] getAvailableLocales()
</pre>
</blockquote>
<p>
And finally subclasses may define a set of constants to identify the various
fields in the formatted output. These constants are used to create a FieldPosition
object which identifies what information is contained in the field and its
position in the formatted result. These constants should be named
<code><em>item</em>_FIELD</code> where <code><em>item</em></code> identifies
the field. For examples of these constants, see <code>ERA_FIELD</code> and its
friends in <a href="../../java/text/DateFormat.html" title="class in java.text"><code>DateFormat</code></a>.
<h4><a name="synchronization">Synchronization</a></h4>
<p>
Formats are generally not synchronized.
It is recommended to create separate format instances for each thread.
If multiple threads access a format concurrently, it must be synchronized
externally.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/text/ParsePosition.html" title="class in java.text"><code>ParsePosition</code></a>,
<a href="../../java/text/FieldPosition.html" title="class in java.text"><code>FieldPosition</code></a>,
<a href="../../java/text/NumberFormat.html" title="class in java.text"><code>NumberFormat</code></a>,
<a href="../../java/text/DateFormat.html" title="class in java.text"><code>DateFormat</code></a>,
<a href="../../java/text/MessageFormat.html" title="class in java.text"><code>MessageFormat</code></a>,
<a href="../../serialized-form.html#java.text.Format">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.Field.html" title="class in java.text">Format.Field</a></strong></code>
<div class="block">Defines constants that are used as attribute keys in the
<code>AttributedCharacterIterator</code> returned
from <code>Format.formatToCharacterIterator</code> and as
field identifiers in <code>FieldPosition</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#Format()">Format</a></strong>()</code>
<div class="block">Sole constructor.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#clone()">clone</a></strong>()</code>
<div class="block">Creates and returns a copy of this object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#format(java.lang.Object)">format</a></strong>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;obj)</code>
<div class="block">Formats an object to produce a string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>abstract <a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#format(java.lang.Object,%20java.lang.StringBuffer,%20java.text.FieldPosition)">format</a></strong>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;obj,
<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a>&nbsp;toAppendTo,
<a href="../../java/text/FieldPosition.html" title="class in java.text">FieldPosition</a>&nbsp;pos)</code>
<div class="block">Formats an object and appends the resulting text to a given string
buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../java/text/AttributedCharacterIterator.html" title="interface in java.text">AttributedCharacterIterator</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#formatToCharacterIterator(java.lang.Object)">formatToCharacterIterator</a></strong>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;obj)</code>
<div class="block">Formats an Object producing an <code>AttributedCharacterIterator</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#parseObject(java.lang.String)">parseObject</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;source)</code>
<div class="block">Parses text from the beginning of the given string to produce an object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>abstract <a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Format.html#parseObject(java.lang.String,%20java.text.ParsePosition)">parseObject</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;source,
<a href="../../java/text/ParsePosition.html" title="class in java.text">ParsePosition</a>&nbsp;pos)</code>
<div class="block">Parses text from a string to produce an object.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="../../java/lang/Object.html" title="class in java.lang">Object</a></h3>
<code><a href="../../java/lang/Object.html#equals(java.lang.Object)">equals</a>, <a href="../../java/lang/Object.html#finalize()">finalize</a>, <a href="../../java/lang/Object.html#getClass()">getClass</a>, <a href="../../java/lang/Object.html#hashCode()">hashCode</a>, <a href="../../java/lang/Object.html#notify()">notify</a>, <a href="../../java/lang/Object.html#notifyAll()">notifyAll</a>, <a href="../../java/lang/Object.html#toString()">toString</a>, <a href="../../java/lang/Object.html#wait()">wait</a>, <a href="../../java/lang/Object.html#wait(long)">wait</a>, <a href="../../java/lang/Object.html#wait(long,%20int)">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Format()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Format</h4>
<pre>protected&nbsp;Format()</pre>
<div class="block">Sole constructor. (For invocation by subclass constructors, typically
implicit.)</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="format(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public final&nbsp;<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;format(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;obj)</pre>
<div class="block">Formats an object to produce a string. This is equivalent to
<blockquote>
<a href="../../java/text/Format.html#format(java.lang.Object,%20java.lang.StringBuffer,%20java.text.FieldPosition)"><code>format</code></a><code>(obj,
new StringBuffer(), new FieldPosition(0)).toString();</code>
</blockquote></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - The object to format</dd>
<dt><span class="strong">Returns:</span></dt><dd>Formatted string.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if the Format cannot format the given
object</dd></dl>
</li>
</ul>
<a name="format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public abstract&nbsp;<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a>&nbsp;format(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;obj,
<a href="../../java/lang/StringBuffer.html" title="class in java.lang">StringBuffer</a>&nbsp;toAppendTo,
<a href="../../java/text/FieldPosition.html" title="class in java.text">FieldPosition</a>&nbsp;pos)</pre>
<div class="block">Formats an object and appends the resulting text to a given string
buffer.
If the <code>pos</code> argument identifies a field used by the format,
then its indices are set to the beginning and end of the first such
field encountered.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - The object to format</dd><dd><code>toAppendTo</code> - where the text is to be appended</dd><dd><code>pos</code> - A <code>FieldPosition</code> identifying a field
in the formatted text</dd>
<dt><span class="strong">Returns:</span></dt><dd>the string buffer passed in as <code>toAppendTo</code>,
with formatted text appended</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>toAppendTo</code> or
<code>pos</code> is null</dd>
<dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if the Format cannot format the given
object</dd></dl>
</li>
</ul>
<a name="formatToCharacterIterator(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>formatToCharacterIterator</h4>
<pre>public&nbsp;<a href="../../java/text/AttributedCharacterIterator.html" title="interface in java.text">AttributedCharacterIterator</a>&nbsp;formatToCharacterIterator(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;obj)</pre>
<div class="block">Formats an Object producing an <code>AttributedCharacterIterator</code>.
You can use the returned <code>AttributedCharacterIterator</code>
to build the resulting String, as well as to determine information
about the resulting String.
<p>
Each attribute key of the AttributedCharacterIterator will be of type
<code>Field</code>. It is up to each <code>Format</code> implementation
to define what the legal values are for each attribute in the
<code>AttributedCharacterIterator</code>, but typically the attribute
key is also used as the attribute value.
<p>The default implementation creates an
<code>AttributedCharacterIterator</code> with no attributes. Subclasses
that support fields should override this and create an
<code>AttributedCharacterIterator</code> with meaningful attributes.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - The object to format</dd>
<dt><span class="strong">Returns:</span></dt><dd>AttributedCharacterIterator describing the formatted value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if obj is null.</dd>
<dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - when the Format cannot format the
given object.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.4</dd></dl>
</li>
</ul>
<a name="parseObject(java.lang.String, java.text.ParsePosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseObject</h4>
<pre>public abstract&nbsp;<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;parseObject(<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;source,
<a href="../../java/text/ParsePosition.html" title="class in java.text">ParsePosition</a>&nbsp;pos)</pre>
<div class="block">Parses text from a string to produce an object.
<p>
The method attempts to parse text starting at the index given by
<code>pos</code>.
If parsing succeeds, then the index of <code>pos</code> is updated
to the index after the last character used (parsing does not necessarily
use all characters up to the end of the string), and the parsed
object is returned. The updated <code>pos</code> can be used to
indicate the starting point for the next call to this method.
If an error occurs, then the index of <code>pos</code> is not
changed, the error index of <code>pos</code> is set to the index of
the character where the error occurred, and null is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - A <code>String</code>, part of which should be parsed.</dd><dd><code>pos</code> - A <code>ParsePosition</code> object with index and error
index information as described above.</dd>
<dt><span class="strong">Returns:</span></dt><dd>An <code>Object</code> parsed from the string. In case of
error, returns null.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>pos</code> is null.</dd></dl>
</li>
</ul>
<a name="parseObject(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseObject</h4>
<pre>public&nbsp;<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;parseObject(<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;source)
throws <a href="../../java/text/ParseException.html" title="class in java.text">ParseException</a></pre>
<div class="block">Parses text from the beginning of the given string to produce an object.
The method may not use the entire text of the given string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - A <code>String</code> whose beginning should be parsed.</dd>
<dt><span class="strong">Returns:</span></dt><dd>An <code>Object</code> parsed from the string.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/text/ParseException.html" title="class in java.text">ParseException</a></code> - if the beginning of the specified string
cannot be parsed.</dd></dl>
</li>
</ul>
<a name="clone()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clone</h4>
<pre>public&nbsp;<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;clone()</pre>
<div class="block">Creates and returns a copy of this object.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../java/lang/Object.html#clone()">clone</a></code>&nbsp;in class&nbsp;<code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a clone of this instance.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/lang/Cloneable.html" title="interface in java.lang"><code>Cloneable</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Format.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;7</strong></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../java/text/FieldPosition.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/Format.Field.html" title="class in java.text"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?java/text/Format.html" target="_top">Frames</a></li>
<li><a href="Format.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size="-1"> <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a> <br>For further API reference and developer documentation, see <a href="http://docs.oracle.com/javase/7/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="../../../legal/cpyr.html">Copyright</a> &#x00a9; 1993, 2014, Oracle and/or its affiliates. All rights reserved. </font></small></p>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/duguying/java.text.git
git@gitee.com:duguying/java.text.git
duguying
java.text
java.text
master

搜索帮助