Portfolio Code | Clement Colmerauer
Repositories
Site
Rabbit simulation
Code
Commits
Branches
Tags
Search
Tree:
a20104a
Branches
Tags
master
Rabbit simulation
build
colt
doc
api
corejava
Format.html
initial commit
Clement COLMERAUER
commited
a20104a
at 2024-09-09 10:17:52
Format.html
Blame
History
Raw
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_05) on Thu Sep 09 20:36:13 PDT 2004 --> <TITLE> Format (Colt 1.2.0 - API Specification) </TITLE> <META NAME="keywords" CONTENT="corejava.Format class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Format (Colt 1.2.0 - API Specification)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_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="class-use/Format.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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> <b>Colt 1.2.0</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> corejava</FONT> <BR> Class Format</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../resources/inherit.gif" ALT="extended by"><B>corejava.Format</B> </PRE> <HR> <DL> <DT>public class <B>Format</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL> <P> A class for formatting numbers that follows <tt>printf</tt> conventions. Also implements C-like <tt>atoi</tt> and <tt>atof</tt> functions <P> <P> <DL> <DT><B>Version:</B></DT> <DD>1.22 2002-11-16</DD> </DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../corejava/Format.html#Format(java.lang.String)">Format</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE> <BR> Formats the number following <tt>printf</tt> conventions.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static double</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#atof(java.lang.String)">atof</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE> <BR> Converts a string of digits to a <tt>double</tt></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#atoi(java.lang.String)">atoi</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE> <BR> Converts a string of digits (decimal, octal or hex) to an integer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static long</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#atol(java.lang.String)">atol</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE> <BR> Converts a string of digits (decimal, octal or hex) to a long integer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#format(char)">format</A></B>(char c)</CODE> <BR> Formats a character into a string (like sprintf in C)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#format(double)">format</A></B>(double x)</CODE> <BR> Formats a <tt>double</tt> into a string (like sprintf in C)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#format(int)">format</A></B>(int x)</CODE> <BR> Formats an integer into a string (like sprintf in C)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#format(long)">format</A></B>(long x)</CODE> <BR> Formats a long integer into a string (like sprintf in C)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#format(java.lang.String)">format</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE> <BR> Formats a string into a larger string (like sprintf in C)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#main(java.lang.String[])">main</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] a)</CODE> <BR> a test stub for the format class</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#printf(java.lang.String, char)">printf</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, char x)</CODE> <BR> prints a formatted number following printf conventions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#printf(java.lang.String, double)">printf</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, double x)</CODE> <BR> prints a formatted number following printf conventions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#printf(java.lang.String, int)">printf</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, int x)</CODE> <BR> prints a formatted number following printf conventions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#printf(java.lang.String, long)">printf</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, long x)</CODE> <BR> prints a formatted number following printf conventions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../corejava/Format.html#printf(java.lang.String, java.lang.String)">printf</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> x)</CODE> <BR> prints a formatted number following printf conventions</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="Format(java.lang.String)"><!-- --></A><H3> Format</H3> <PRE> public <B>Format</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</PRE> <DL> <DD>Formats the number following <tt>printf</tt> conventions. Main limitation: Can only handle one format parameter at a time Use multiple Format objects to format more than one number <P> <DT><B>Parameters:</B><DD><CODE>s</CODE> - the format string following printf conventions The string has a prefix, a format code and a suffix. The prefix and suffix become part of the formatted output. The format code directs the formatting of the (single) parameter to be formatted. The code has the following structure <ul> <li> a % (required) <li> a modifier (optional) <dl> <dt> + <dd> forces display of + for positive numbers <dt> 0 <dd> show leading zeroes <dt> - <dd> align left in the field <dt> space <dd> prepend a space in front of positive numbers <dt> # <dd> use "alternate" format. Add 0 or 0x for octal or hexadecimal numbers. Don't suppress trailing zeroes in general floating point format. </dl> <li> an integer denoting field width (optional) <li> a period followed by an integer denoting precision (optional) <li> a format descriptor (required) <dl> <dt>f <dd> floating point number in fixed format <dt>e, E <dd> floating point number in exponential notation (scientific format). The E format results in an uppercase E for the exponent (1.14130E+003), the e format in a lowercase e. <dt>g, G <dd> floating point number in general format (fixed format for small numbers, exponential format for large numbers). Trailing zeroes are suppressed. The G format results in an uppercase E for the exponent (if any), the g format in a lowercase e. <dt>d, i <dd> integer in decimal <dt>x <dd> integer in hexadecimal <dt>o <dd> integer in octal <dt>s <dd> string <dt>c <dd> character </dl> </ul> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if bad format</DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="printf(java.lang.String, double)"><!-- --></A><H3> printf</H3> <PRE> public static void <B>printf</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, double x)</PRE> <DL> <DD>prints a formatted number following printf conventions <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>fmt</CODE> - the format string<DD><CODE>x</CODE> - the double to print</DL> </DD> </DL> <HR> <A NAME="printf(java.lang.String, int)"><!-- --></A><H3> printf</H3> <PRE> public static void <B>printf</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, int x)</PRE> <DL> <DD>prints a formatted number following printf conventions <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>fmt</CODE> - the format string<DD><CODE>x</CODE> - the int to print</DL> </DD> </DL> <HR> <A NAME="printf(java.lang.String, long)"><!-- --></A><H3> printf</H3> <PRE> public static void <B>printf</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, long x)</PRE> <DL> <DD>prints a formatted number following printf conventions <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>fmt</CODE> - the format string<DD><CODE>x</CODE> - the long to print</DL> </DD> </DL> <HR> <A NAME="printf(java.lang.String, char)"><!-- --></A><H3> printf</H3> <PRE> public static void <B>printf</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, char x)</PRE> <DL> <DD>prints a formatted number following printf conventions <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>fmt</CODE> - the format string<DD><CODE>x</CODE> - the character to print</DL> </DD> </DL> <HR> <A NAME="printf(java.lang.String, java.lang.String)"><!-- --></A><H3> printf</H3> <PRE> public static void <B>printf</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fmt, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> x)</PRE> <DL> <DD>prints a formatted number following printf conventions <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>fmt</CODE> - the format string<DD><CODE>x</CODE> - a string to print</DL> </DD> </DL> <HR> <A NAME="atoi(java.lang.String)"><!-- --></A><H3> atoi</H3> <PRE> public static int <B>atoi</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</PRE> <DL> <DD>Converts a string of digits (decimal, octal or hex) to an integer <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>s</CODE> - a string <DT><B>Returns:</B><DD>the numeric value of the prefix of s representing a base 10 integer</DL> </DD> </DL> <HR> <A NAME="atol(java.lang.String)"><!-- --></A><H3> atol</H3> <PRE> public static long <B>atol</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</PRE> <DL> <DD>Converts a string of digits (decimal, octal or hex) to a long integer <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>s</CODE> - a string <DT><B>Returns:</B><DD>the numeric value of the prefix of s representing a base 10 integer</DL> </DD> </DL> <HR> <A NAME="atof(java.lang.String)"><!-- --></A><H3> atof</H3> <PRE> public static double <B>atof</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</PRE> <DL> <DD>Converts a string of digits to a <tt>double</tt> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>s</CODE> - a string</DL> </DD> </DL> <HR> <A NAME="format(double)"><!-- --></A><H3> format</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(double x)</PRE> <DL> <DD>Formats a <tt>double</tt> into a string (like sprintf in C) <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>x</CODE> - the number to format <DT><B>Returns:</B><DD>the formatted string <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if bad argument</DL> </DD> </DL> <HR> <A NAME="format(int)"><!-- --></A><H3> format</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(int x)</PRE> <DL> <DD>Formats an integer into a string (like sprintf in C) <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>x</CODE> - the number to format <DT><B>Returns:</B><DD>the formatted string</DL> </DD> </DL> <HR> <A NAME="format(long)"><!-- --></A><H3> format</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(long x)</PRE> <DL> <DD>Formats a long integer into a string (like sprintf in C) <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>x</CODE> - the number to format <DT><B>Returns:</B><DD>the formatted string</DL> </DD> </DL> <HR> <A NAME="format(char)"><!-- --></A><H3> format</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(char c)</PRE> <DL> <DD>Formats a character into a string (like sprintf in C) <P> <DD><DL> <DT><B>Returns:</B><DD>the formatted string</DL> </DD> </DL> <HR> <A NAME="format(java.lang.String)"><!-- --></A><H3> format</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>format</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</PRE> <DL> <DD>Formats a string into a larger string (like sprintf in C) <P> <DD><DL> <DT><B>Returns:</B><DD>the formatted string</DL> </DD> </DL> <HR> <A NAME="main(java.lang.String[])"><!-- --></A><H3> main</H3> <PRE> public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] a)</PRE> <DL> <DD>a test stub for the format class <P> <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=3 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="class-use/Format.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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> <b>Colt 1.2.0</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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> <font size=-1 >Jump to the <a target=_top href=http://dsd.lbl.gov/~hoschek/colt >Colt Homepage</a> </BODY> </HTML>