format.html
来自「基于mondrian 开源框架进行OLAP多维分析」· HTML 代码 · 共 1,069 行 · 第 1/4 页
HTML
1,069 行
<DD>Constructs a <code>Format</code> in a specific locale.<P><DL><DT><B>Parameters:</B><DD><CODE>formatString</CODE> - the format string; see <a href="http://www.apostate.com/programming/vb-format.html">this description</a> for more details<DD><CODE>locale</CODE> - The locale</DL></DL><HR><A NAME="Format(java.lang.String, mondrian.util.Format.FormatLocale)"><!-- --></A><H3>Format</H3><PRE>public <B>Format</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> formatString, <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> locale)</PRE><DL><DD>Constructs a <code>Format</code> in a specific locale.<P><DL><DT><B>See Also:</B><DD><A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util"><CODE>Format.FormatLocale</CODE></A>, <A HREF="../../mondrian/util/Format.html#createLocale(char, char, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[], java.lang.String[], java.util.Locale)"><CODE>createLocale(char, char, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[], java.lang.String[], java.util.Locale)</CODE></A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="format(java.lang.Object, java.lang.String, java.util.Locale)"><!-- --></A><H3>format</H3><PRE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> formatString, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Formats an object using a format string, according to a given locale. <p>If you need to format many objects using the same format string, create a formatter object using <A HREF="../../mondrian/util/Format.html#Format(java.lang.String, java.util.Locale)"><CODE>Format(String, java.util.Locale)</CODE></A>.<P><DD><DL></DL></DD></DL><HR><A NAME="getTokenList()"><!-- --></A><H3>getTokenList</H3><PRE>public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../mondrian/util/Format.Token.html" title="class in mondrian.util">Format.Token</A>> <B>getTokenList</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="get(java.lang.String, java.util.Locale)"><!-- --></A><H3>get</H3><PRE>public static <A HREF="../../mondrian/util/Format.html" title="class in mondrian.util">Format</A> <B>get</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> formatString, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Constructs a <code>Format</code> in a specific locale, or retrieves one from the cache if one already exists. <p>If the number of entries in the cache exceeds <A HREF="../../mondrian/util/Format.html#CacheLimit"><CODE>CacheLimit</CODE></A>, replaces the eldest entry in the cache.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>formatString</CODE> - the format string; see <a href="http://www.apostate.com/programming/vb-format.html">this description</a> for more details</DL></DD></DL><HR><A NAME="createLocale(char, char, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[], java.lang.String[], java.util.Locale)"><!-- --></A><H3>createLocale</H3><PRE>public static <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> <B>createLocale</B>(char thousandSeparator, char decimalPlaceholder, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateSeparator, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> timeSeparator, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> currencySymbol, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> currencyFormat, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] daysOfWeekShort, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] daysOfWeekLong, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] monthsShort, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] monthsLong, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Create a <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util"><CODE>Format.FormatLocale</CODE></A> object characterized by the given properties.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>thousandSeparator</CODE> - the character used to separate thousands in numbers, or ',' by default. For example, 12345 is '12,345 in English, '12.345 in French.<DD><CODE>decimalPlaceholder</CODE> - the character placed between the integer and the fractional part of decimal numbers, or '.' by default. For example, 12.34 is '12.34' in English, '12,34' in French.<DD><CODE>dateSeparator</CODE> - the character placed between the year, month and day of a date such as '12/07/2001', or '/' by default.<DD><CODE>timeSeparator</CODE> - the character placed between the hour, minute and second value of a time such as '1:23:45 AM', or ':' by default.<DD><CODE>daysOfWeekShort</CODE> - Short forms of the days of the week. The array is 1-based, because position <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Calendar.html#SUNDAY" title="class or interface in java.util"><CODE>Calendar.SUNDAY</CODE></A> (= 1) must hold Sunday, etc. The array must have 8 elements. For example {"", "Sun", "Mon", ..., "Sat"}.<DD><CODE>daysOfWeekLong</CODE> - Long forms of the days of the week. The array is 1-based, because position <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Calendar.html#SUNDAY" title="class or interface in java.util"><CODE>Calendar.SUNDAY</CODE></A> must hold Sunday, etc. The array must have 8 elements. For example {"", "Sunday", ..., "Saturday"}.<DD><CODE>monthsShort</CODE> - Short forms of the months of the year. The array is 0-based, because position <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Calendar.html#JANUARY" title="class or interface in java.util"><CODE>Calendar.JANUARY</CODE></A> (= 0) holds January, etc. For example {"Jan", ..., "Dec", ""}.<DD><CODE>monthsLong</CODE> - Long forms of the months of the year. The array is 0-based, because position <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Calendar.html#JANUARY" title="class or interface in java.util"><CODE>Calendar.JANUARY</CODE></A> (= 0) holds January, etc. For example {"January", ..., "December", ""}.<DD><CODE>locale</CODE> - if this is not null, register that the constructed <code>FormatLocale</code> is the default for <code>locale</code></DL></DD></DL><HR><A NAME="createLocale(java.util.Locale)"><!-- --></A><H3>createLocale</H3><PRE>public static <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> <B>createLocale</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getFormatLocale(java.util.Locale)"><!-- --></A><H3>getFormatLocale</H3><PRE>public static <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> <B>getFormatLocale</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Returns the <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util"><CODE>Format.FormatLocale</CODE></A> which precisely matches <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util"><CODE>Locale</CODE></A>, if any, or null if there is none.<P><DD><DL></DL></DD></DL><HR><A NAME="getBestFormatLocale(java.util.Locale)"><!-- --></A><H3>getBestFormatLocale</H3><PRE>public static <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> <B>getBestFormatLocale</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Returns the best <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util"><CODE>Format.FormatLocale</CODE></A> for a given <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util"><CODE>Locale</CODE></A>. Never returns null, even if <code>locale</code> is null.<P><DD><DL></DL></DD></DL><HR><A NAME="registerFormatLocale(mondrian.util.Format.FormatLocale, java.util.Locale)"><!-- --></A><H3>registerFormatLocale</H3><PRE>public static <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> <B>registerFormatLocale</B>(<A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util">Format.FormatLocale</A> formatLocale, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD>Registers a <A HREF="../../mondrian/util/Format.FormatLocale.html" title="class in mondrian.util"><CODE>Format.FormatLocale</CODE></A> to a given <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util"><CODE>Locale</CODE></A>. Returns the previous mapping.<P><DD><DL></DL></DD></DL><HR><A NAME="format(java.lang.Object)"><!-- --></A><H3>format</H3><PRE>public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getFormatString()"><!-- --></A><H3>getFormatString</H3><PRE>public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getFormatString</B>()</PRE><DL><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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><a href="http://sourceforge.net/projects/mondrian"><img src="http://sourceforge.net/sflogo.php?group_id=35302&type=1" width="88" height="31" border="0" alt="SourceForge.net_Logo"></a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../mondrian/util/FauxMemoryMonitor.html" title="class in mondrian.util"><B>PREV CLASS</B></A> <A HREF="../../mondrian/util/Format.AlternateFormat.html" title="class in mondrian.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?mondrian/util/Format.html" target="_top"><B>FRAMES</B></A> <A HREF="Format.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?