3 Star 2 Fork 0

duguying/java.text

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
DateFormat.Field.html 30.75 KB
一键复制 编辑 原始数据 按行查看 历史
独孤影 提交于 2015-01-20 03:00 +08:00 . 初始英文文档
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
<!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>DateFormat.Field (Java Platform SE 7 )</title>
<meta name="date" content="2014-09-26">
<meta name="keywords" content="java.text.DateFormat.Field class">
<meta name="keywords" content="ERA">
<meta name="keywords" content="YEAR">
<meta name="keywords" content="MONTH">
<meta name="keywords" content="DAY_OF_MONTH">
<meta name="keywords" content="HOUR_OF_DAY1">
<meta name="keywords" content="HOUR_OF_DAY0">
<meta name="keywords" content="MINUTE">
<meta name="keywords" content="SECOND">
<meta name="keywords" content="MILLISECOND">
<meta name="keywords" content="DAY_OF_WEEK">
<meta name="keywords" content="DAY_OF_YEAR">
<meta name="keywords" content="DAY_OF_WEEK_IN_MONTH">
<meta name="keywords" content="WEEK_OF_YEAR">
<meta name="keywords" content="WEEK_OF_MONTH">
<meta name="keywords" content="AM_PM">
<meta name="keywords" content="HOUR1">
<meta name="keywords" content="HOUR0">
<meta name="keywords" content="TIME_ZONE">
<meta name="keywords" content="ofCalendarField()">
<meta name="keywords" content="getCalendarField()">
<meta name="keywords" content="readResolve()">
<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="DateFormat.Field (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/DateFormat.Field.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/DateFormat.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/DateFormatSymbols.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/DateFormat.Field.html" target="_top">Frames</a></li>
<li><a href="DateFormat.Field.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&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><a href="#field_detail">Field</a>&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 DateFormat.Field" class="title">Class DateFormat.Field</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><a href="../../java/text/AttributedCharacterIterator.Attribute.html" title="class in java.text">java.text.AttributedCharacterIterator.Attribute</a></li>
<li>
<ul class="inheritance">
<li><a href="../../java/text/Format.Field.html" title="class in java.text">java.text.Format.Field</a></li>
<li>
<ul class="inheritance">
<li>java.text.DateFormat.Field</li>
</ul>
</li>
</ul>
</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></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../java/text/DateFormat.html" title="class in java.text">DateFormat</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="strong">DateFormat.Field</span>
extends <a href="../../java/text/Format.Field.html" title="class in java.text">Format.Field</a></pre>
<div class="block">Defines constants that are used as attribute keys in the
<code>AttributedCharacterIterator</code> returned
from <code>DateFormat.formatToCharacterIterator</code> and as
field identifiers in <code>FieldPosition</code>.
<p>
The class also provides two methods to map
between its constants and the corresponding Calendar constants.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.4</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a>,
<a href="../../serialized-form.html#java.text.DateFormat.Field">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#AM_PM">AM_PM</a></strong></code>
<div class="block">Constant identifying the time of day indicator
(e.g.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#DAY_OF_MONTH">DAY_OF_MONTH</a></strong></code>
<div class="block">Constant identifying the day of month field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#DAY_OF_WEEK">DAY_OF_WEEK</a></strong></code>
<div class="block">Constant identifying the day of week field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#DAY_OF_WEEK_IN_MONTH">DAY_OF_WEEK_IN_MONTH</a></strong></code>
<div class="block">Constant identifying the day of week field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#DAY_OF_YEAR">DAY_OF_YEAR</a></strong></code>
<div class="block">Constant identifying the day of year field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#ERA">ERA</a></strong></code>
<div class="block">Constant identifying the era field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#HOUR_OF_DAY0">HOUR_OF_DAY0</a></strong></code>
<div class="block">Constant identifying the hour of day field, where the legal values
are 0 to 23.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#HOUR_OF_DAY1">HOUR_OF_DAY1</a></strong></code>
<div class="block">Constant identifying the hour of day field, where the legal values
are 1 to 24.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#HOUR0">HOUR0</a></strong></code>
<div class="block">Constant identifying the hour field, where the legal values are
0 to 11.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#HOUR1">HOUR1</a></strong></code>
<div class="block">Constant identifying the hour field, where the legal values are
1 to 12.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#MILLISECOND">MILLISECOND</a></strong></code>
<div class="block">Constant identifying the millisecond field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#MINUTE">MINUTE</a></strong></code>
<div class="block">Constant identifying the minute field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#MONTH">MONTH</a></strong></code>
<div class="block">Constant identifying the month field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#SECOND">SECOND</a></strong></code>
<div class="block">Constant identifying the second field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#TIME_ZONE">TIME_ZONE</a></strong></code>
<div class="block">Constant identifying the time zone field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#WEEK_OF_MONTH">WEEK_OF_MONTH</a></strong></code>
<div class="block">Constant identifying the week of month field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#WEEK_OF_YEAR">WEEK_OF_YEAR</a></strong></code>
<div class="block">Constant identifying the week of year field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#YEAR">YEAR</a></strong></code>
<div class="block">Constant identifying the year field.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_java.text.AttributedCharacterIterator.Attribute">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;java.text.<a href="../../java/text/AttributedCharacterIterator.Attribute.html" title="class in java.text">AttributedCharacterIterator.Attribute</a></h3>
<code><a href="../../java/text/AttributedCharacterIterator.Attribute.html#INPUT_METHOD_SEGMENT">INPUT_METHOD_SEGMENT</a>, <a href="../../java/text/AttributedCharacterIterator.Attribute.html#LANGUAGE">LANGUAGE</a>, <a href="../../java/text/AttributedCharacterIterator.Attribute.html#READING">READING</a></code></li>
</ul>
</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/DateFormat.Field.html#DateFormat.Field(java.lang.String,%20int)">DateFormat.Field</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;name,
int&nbsp;calendarField)</code>
<div class="block">Creates a <code>Field</code>.</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>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#getCalendarField()">getCalendarField</a></strong>()</code>
<div class="block">Returns the <code>Calendar</code> field associated with this
attribute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#ofCalendarField(int)">ofCalendarField</a></strong>(int&nbsp;calendarField)</code>
<div class="block">Returns the <code>Field</code> constant that corresponds to
the <code>Calendar</code> constant <code>calendarField</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/DateFormat.Field.html#readResolve()">readResolve</a></strong>()</code>
<div class="block">Resolves instances being deserialized to the predefined constants.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.text.AttributedCharacterIterator.Attribute">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.text.<a href="../../java/text/AttributedCharacterIterator.Attribute.html" title="class in java.text">AttributedCharacterIterator.Attribute</a></h3>
<code><a href="../../java/text/AttributedCharacterIterator.Attribute.html#equals(java.lang.Object)">equals</a>, <a href="../../java/text/AttributedCharacterIterator.Attribute.html#getName()">getName</a>, <a href="../../java/text/AttributedCharacterIterator.Attribute.html#hashCode()">hashCode</a>, <a href="../../java/text/AttributedCharacterIterator.Attribute.html#toString()">toString</a></code></li>
</ul>
<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#clone()">clone</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#notify()">notify</a>, <a href="../../java/lang/Object.html#notifyAll()">notifyAll</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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="ERA">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ERA</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> ERA</pre>
<div class="block">Constant identifying the era field.</div>
</li>
</ul>
<a name="YEAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>YEAR</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> YEAR</pre>
<div class="block">Constant identifying the year field.</div>
</li>
</ul>
<a name="MONTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MONTH</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> MONTH</pre>
<div class="block">Constant identifying the month field.</div>
</li>
</ul>
<a name="DAY_OF_MONTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_MONTH</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> DAY_OF_MONTH</pre>
<div class="block">Constant identifying the day of month field.</div>
</li>
</ul>
<a name="HOUR_OF_DAY1">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR_OF_DAY1</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> HOUR_OF_DAY1</pre>
<div class="block">Constant identifying the hour of day field, where the legal values
are 1 to 24.</div>
</li>
</ul>
<a name="HOUR_OF_DAY0">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR_OF_DAY0</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> HOUR_OF_DAY0</pre>
<div class="block">Constant identifying the hour of day field, where the legal values
are 0 to 23.</div>
</li>
</ul>
<a name="MINUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MINUTE</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> MINUTE</pre>
<div class="block">Constant identifying the minute field.</div>
</li>
</ul>
<a name="SECOND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SECOND</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> SECOND</pre>
<div class="block">Constant identifying the second field.</div>
</li>
</ul>
<a name="MILLISECOND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLISECOND</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> MILLISECOND</pre>
<div class="block">Constant identifying the millisecond field.</div>
</li>
</ul>
<a name="DAY_OF_WEEK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_WEEK</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> DAY_OF_WEEK</pre>
<div class="block">Constant identifying the day of week field.</div>
</li>
</ul>
<a name="DAY_OF_YEAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_YEAR</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> DAY_OF_YEAR</pre>
<div class="block">Constant identifying the day of year field.</div>
</li>
</ul>
<a name="DAY_OF_WEEK_IN_MONTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_OF_WEEK_IN_MONTH</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> DAY_OF_WEEK_IN_MONTH</pre>
<div class="block">Constant identifying the day of week field.</div>
</li>
</ul>
<a name="WEEK_OF_YEAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WEEK_OF_YEAR</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> WEEK_OF_YEAR</pre>
<div class="block">Constant identifying the week of year field.</div>
</li>
</ul>
<a name="WEEK_OF_MONTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WEEK_OF_MONTH</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> WEEK_OF_MONTH</pre>
<div class="block">Constant identifying the week of month field.</div>
</li>
</ul>
<a name="AM_PM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AM_PM</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> AM_PM</pre>
<div class="block">Constant identifying the time of day indicator
(e.g. "a.m." or "p.m.") field.</div>
</li>
</ul>
<a name="HOUR1">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR1</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> HOUR1</pre>
<div class="block">Constant identifying the hour field, where the legal values are
1 to 12.</div>
</li>
</ul>
<a name="HOUR0">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR0</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> HOUR0</pre>
<div class="block">Constant identifying the hour field, where the legal values are
0 to 11.</div>
</li>
</ul>
<a name="TIME_ZONE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TIME_ZONE</h4>
<pre>public static final&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a> TIME_ZONE</pre>
<div class="block">Constant identifying the time zone field.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DateFormat.Field(java.lang.String, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DateFormat.Field</h4>
<pre>protected&nbsp;DateFormat.Field(<a href="../../java/lang/String.html" title="class in java.lang">String</a>&nbsp;name,
int&nbsp;calendarField)</pre>
<div class="block">Creates a <code>Field</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the <code>Field</code></dd><dd><code>calendarField</code> - the <code>Calendar</code> constant this
<code>Field</code> corresponds to; any value, even one
outside the range of legal <code>Calendar</code> values may
be used, but <code>-1</code> should be used for values
that don't correspond to legal <code>Calendar</code> values</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="ofCalendarField(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ofCalendarField</h4>
<pre>public static&nbsp;<a href="../../java/text/DateFormat.Field.html" title="class in java.text">DateFormat.Field</a>&nbsp;ofCalendarField(int&nbsp;calendarField)</pre>
<div class="block">Returns the <code>Field</code> constant that corresponds to
the <code>Calendar</code> constant <code>calendarField</code>.
If there is no direct mapping between the <code>Calendar</code>
constant and a <code>Field</code>, null is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>calendarField</code> - Calendar field constant</dd>
<dt><span class="strong">Returns:</span></dt><dd>Field instance representing calendarField.</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 <code>calendarField</code> is
not the value of a <code>Calendar</code> field constant.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a></dd></dl>
</li>
</ul>
<a name="getCalendarField()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCalendarField</h4>
<pre>public&nbsp;int&nbsp;getCalendarField()</pre>
<div class="block">Returns the <code>Calendar</code> field associated with this
attribute. For example, if this represents the hours field of
a <code>Calendar</code>, this would return
<code>Calendar.HOUR</code>. If there is no corresponding
<code>Calendar</code> constant, this will return -1.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Calendar constant for this field</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/util/Calendar.html" title="class in java.util"><code>Calendar</code></a></dd></dl>
</li>
</ul>
<a name="readResolve()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>readResolve</h4>
<pre>protected&nbsp;<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;readResolve()
throws <a href="../../java/io/InvalidObjectException.html" title="class in java.io">InvalidObjectException</a></pre>
<div class="block">Resolves instances being deserialized to the predefined constants.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../java/text/AttributedCharacterIterator.Attribute.html#readResolve()">readResolve</a></code>&nbsp;in class&nbsp;<code><a href="../../java/text/AttributedCharacterIterator.Attribute.html" title="class in java.text">AttributedCharacterIterator.Attribute</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>resolved DateFormat.Field constant</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../java/io/InvalidObjectException.html" title="class in java.io">InvalidObjectException</a></code> - if the constant could not be
resolved.</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/DateFormat.Field.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/DateFormat.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/DateFormatSymbols.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/DateFormat.Field.html" target="_top">Frames</a></li>
<li><a href="DateFormat.Field.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&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><a href="#field_detail">Field</a>&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

搜索帮助