SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.util.PrintfFormat Class Reference

This class acts like a StringBuffer which defines new types of append methods. More...

Inheritance diagram for umontreal.ssj.util.PrintfFormat:

Public Member Functions

 PrintfFormat ()
 Constructs a new buffer object containing an empty string.
 PrintfFormat (int length)
 Constructs a new buffer object with an initial capacity of length.
 PrintfFormat (String str)
 Constructs a new buffer object containing the initial string str.
PrintfFormat append (String str)
 Appends str to the buffer.
PrintfFormat append (int fieldwidth, String str)
 Uses the s(int,String) static method to append str to the buffer.
PrintfFormat append (double x)
 Appends x to the buffer.
PrintfFormat append (int fieldwidth, double x)
 Uses the f(int,double) static method to append x to the buffer.
PrintfFormat append (int fieldwidth, int precision, double x)
 Uses the f(int,int,double) static method to append x to the buffer.
PrintfFormat append (int x)
 Appends x to the buffer.
PrintfFormat append (int fieldwidth, int x)
 Uses the d(int,long) static method to append x to the buffer.
PrintfFormat append (long x)
 Appends x to the buffer.
PrintfFormat append (int fieldwidth, long x)
 Uses the d(int,long) static method to append x to the buffer.
PrintfFormat append (int fieldwidth, int accuracy, int precision, double x)
 Uses the format(int,int,int,double) static method with the same four arguments to append x to the buffer.
PrintfFormat append (char c)
 Appends a single character to the buffer.
void clear ()
 Clears the contents of the buffer.
StringBuffer getBuffer ()
 Returns the StringBuffer associated with that object.
String toString ()
 Converts the buffer into a String.

Static Public Member Functions

static String s (String str)
 Same as s(0, str).
static String s (int fieldwidth, String str)
 Formats the string str like the s in the C printf function.
Integers @{
static String d (long x)
 Same as d(0, 1, x).
static String d (int fieldwidth, long x)
 Same as d(fieldwidth, 1, x).
static String d (int fieldwidth, int precision, long x)
 Formats the long integer x into a string like d in the C printf function.
static String format (long x)
 Same as d(0, 1, x).
static String format (int fieldwidth, long x)
 Converts a long integer to a String with a minimum length of fieldwidth, the result is right-padded with spaces if necessary but it is not truncated.
static String formatBase (int b, long x)
 Same as formatBase(0, b, x).
static String formatBase (int fieldwidth, int b, long x)
 Converts the integer x to a String representation in base b.
Intervals @{
static void formatWithError (int fieldwidth, int fieldwidtherr, int accuracy, int precision, double x, double error, String[] res)
 Stores a string containing x into res[0], and a string containing error into res[1], both strings being formatted with the same notation.
static void formatWithError (int fieldwidth, int fieldwidtherr, int precision, double x, double error, String[] res)
 Stores a string containing x into res[0], and a string containing error into res[1], both strings being formatted with the same notation.
static void formatWithError (Locale locale, int fieldwidth, int fieldwidtherr, int accuracy, int precision, double x, double error, String[] res)
 This method is equivalent to formatWithError(int,int,int,double,double,String[]), except that it formats the given value and error for the locale locale.
static void formatWithError (Locale locale, int fieldwidth, int fieldwidtherr, int precision, double x, double error, String[] res)
 This method is equivalent to formatWithError(int,int,int,double,double,String[]), except that it formats the given value and error for the locale locale.

Static Public Attributes

Constants @{
static final String NEWLINE = System.getProperty("line.separator")
 End-of-line symbol or line separator.
static final String LINE_SEPARATOR = System.getProperty("line.separator")
 End-of-line symbol or line separator.

Reals @{

static String E (double x)
 Same as E(0, 6, x).
static String E (int fieldwidth, double x)
 Same as E(fieldwidth, 6, x).
static String E (int fieldwidth, int precision, double x)
 Formats a double-precision number x like E in C printf.
static String e (double x)
 Same as e(0, 6, x).
static String e (int fieldwidth, double x)
 Same as e(fieldwidth, 6, x).
static String e (int fieldwidth, int precision, double x)
 The same as E, except that ‘e’ is used as the exponent character instead of ‘E’.
static String f (double x)
 Same as f(0, 6, x).
static String f (int fieldwidth, double x)
 Same as f(fieldwidth, 6, x).
static String f (int fieldwidth, int precision, double x)
 Formats the double-precision x into a string like f in C printf.
static String G (double x)
 Same as G(0, 6, x).
static String G (int fieldwidth, double x)
 Same as G(fieldwidth, 6, x).
static String G (int fieldwidth, int precision, double x)
 Formats the double-precision x into a string like G in C printf.
static String g (double x)
 Same as g(0, 6, x).
static String g (int fieldwidth, double x)
 Same as g(fieldwidth, 6, x).
static String g (int fieldwidth, int precision, double x)
 The same as G, except that ‘e’ is used in the scientific notation.
static String format (int fieldwidth, int accuracy, int precision, double x)
 Returns a String containing x.
static String format (Locale locale, int fieldwidth, int accuracy, int precision, double x)
 This method is equivalent to format(int,int,int,double), except it formats the given value for the locale locale.
static String formatBase (int fieldwidth, int accuracy, int b, double x)
 Converts \(x\) to a String representation in base \(b\) using formatting similar to the \(f\) methods.

Detailed Description

This class acts like a StringBuffer which defines new types of append methods.

It defines certain functionalities of the ANSI C printf function that also can be accessed through static methods. The information given here is strongly inspired from the man page of the C printf function.

Most methods of this class format numbers for the English US locale only. One can use the Java class Formatter for performing locale-independent formatting.

Definition at line 45 of file PrintfFormat.java.

Constructor & Destructor Documentation

◆ PrintfFormat() [1/3]

umontreal.ssj.util.PrintfFormat.PrintfFormat ( )

Constructs a new buffer object containing an empty string.

Definition at line 93 of file PrintfFormat.java.

◆ PrintfFormat() [2/3]

umontreal.ssj.util.PrintfFormat.PrintfFormat ( int length)

Constructs a new buffer object with an initial capacity of length.

Parameters
lengthinitial length of the buffer

Definition at line 102 of file PrintfFormat.java.

◆ PrintfFormat() [3/3]

umontreal.ssj.util.PrintfFormat.PrintfFormat ( String str)

Constructs a new buffer object containing the initial string str.

Parameters
strinitial contents of the buffer

Definition at line 111 of file PrintfFormat.java.

Member Function Documentation

◆ append() [1/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( char c)

Appends a single character to the buffer.

Parameters
ccharacter to be appended to the buffer
Returns
this object

Definition at line 248 of file PrintfFormat.java.

◆ append() [2/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( double x)

Appends x to the buffer.

Parameters
xvalue being added to the buffer
Returns
this object

Definition at line 146 of file PrintfFormat.java.

◆ append() [3/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int fieldwidth,
double x )

Uses the f(int,double) static method to append x to the buffer.

A minimum of fieldwidth characters will be used.

Parameters
fieldwidthminimum length of the converted string to be appended
xvalue to be appended to the buffer
Returns
this object

Definition at line 159 of file PrintfFormat.java.

◆ append() [4/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int fieldwidth,
int accuracy,
int precision,
double x )

Uses the format(int,int,int,double) static method with the same four arguments to append x to the buffer.

Parameters
fieldwidthminimum length of the converted string to be appended
accuracynumber of digits after the decimal point
precisionnumber of significant digits
xvalue to be appended to the buffer
Returns
this object

Definition at line 237 of file PrintfFormat.java.

◆ append() [5/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int fieldwidth,
int precision,
double x )

Uses the f(int,int,double) static method to append x to the buffer.

A minimum of fieldwidth characters will be used with the given precision.

Parameters
fieldwidthminimum length of the converted string to be appended
precisionnumber of digits after the decimal point of the converted value
xvalue to be appended to the buffer
Returns
this object

Definition at line 174 of file PrintfFormat.java.

◆ append() [6/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int fieldwidth,
int x )

Uses the d(int,long) static method to append x to the buffer.

A minimum of fieldwidth characters will be used.

Parameters
fieldwidthminimum length of the converted string to be appended
xvalue to be appended to the buffer
Returns
this object

Definition at line 198 of file PrintfFormat.java.

◆ append() [7/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int fieldwidth,
long x )

Uses the d(int,long) static method to append x to the buffer.

A minimum of fieldwidth characters will be used.

Parameters
fieldwidthminimum length of the converted string to be appended
xvalue to be appended to the buffer
Returns
this object

Definition at line 222 of file PrintfFormat.java.

◆ append() [8/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int fieldwidth,
String str )

Uses the s(int,String) static method to append str to the buffer.

A minimum of fieldwidth characters will be used.

Parameters
fieldwidthminimum number of characters that will be added to the buffer
strstring to append to the buffer
Returns
this object

Definition at line 135 of file PrintfFormat.java.

◆ append() [9/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( int x)

Appends x to the buffer.

Parameters
xvalue to be appended to the buffer
Returns
this object

Definition at line 185 of file PrintfFormat.java.

◆ append() [10/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( long x)

Appends x to the buffer.

Parameters
xvalue to be appended to the buffer
Returns
this object

Definition at line 209 of file PrintfFormat.java.

◆ append() [11/11]

PrintfFormat umontreal.ssj.util.PrintfFormat.append ( String str)

Appends str to the buffer.

Parameters
strstring to append to the buffer
Returns
this object

Definition at line 121 of file PrintfFormat.java.

◆ clear()

void umontreal.ssj.util.PrintfFormat.clear ( )

Clears the contents of the buffer.

Definition at line 256 of file PrintfFormat.java.

◆ d() [1/3]

String umontreal.ssj.util.PrintfFormat.d ( int fieldwidth,
int precision,
long x )
static

Formats the long integer x into a string like d in the C printf function.

It converts its argument to decimal notation, precision gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. When zero is printed with an explicit precision 0, the output is empty.

Parameters
fieldwidthminimum length of the returned string
precisionnumber of digits in the returned string
xthe string to process
Returns
the same string, padded with spaces or zeros if appropriate

Definition at line 359 of file PrintfFormat.java.

◆ d() [2/3]

String umontreal.ssj.util.PrintfFormat.d ( int fieldwidth,
long x )
static

Same as d(fieldwidth, 1, x).

Parameters
fieldwidthminimum length of the returned string
xthe string to process
Returns
the same string, padded with spaces or zeros if appropriate

Definition at line 343 of file PrintfFormat.java.

◆ d() [3/3]

String umontreal.ssj.util.PrintfFormat.d ( long x)
static

Same as d(0, 1, x).

Parameters
xthe string to process
Returns
the same string, padded with spaces or zeros if appropriate

Definition at line 332 of file PrintfFormat.java.

◆ E() [1/3]

String umontreal.ssj.util.PrintfFormat.E ( double x)
static

Same as E(0, 6, x).

Parameters
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 452 of file PrintfFormat.java.

◆ E() [2/3]

String umontreal.ssj.util.PrintfFormat.E ( int fieldwidth,
double x )
static

Same as E(fieldwidth, 6, x).

Parameters
fieldwidthminimum length of the returned string
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 463 of file PrintfFormat.java.

◆ E() [3/3]

String umontreal.ssj.util.PrintfFormat.E ( int fieldwidth,
int precision,
double x )
static

Formats a double-precision number x like E in C printf.

The double argument is rounded and converted in the style [-]d.dddE+-dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is 0, no decimal-point character appears. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

Parameters
fieldwidthminimum length of the returned string
precisionnumber of digits after the decimal point
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 480 of file PrintfFormat.java.

◆ e() [1/3]

String umontreal.ssj.util.PrintfFormat.e ( double x)
static

Same as e(0, 6, x).

Parameters
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 516 of file PrintfFormat.java.

◆ e() [2/3]

String umontreal.ssj.util.PrintfFormat.e ( int fieldwidth,
double x )
static

Same as e(fieldwidth, 6, x).

Parameters
fieldwidthminimum length of the returned string
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 527 of file PrintfFormat.java.

◆ e() [3/3]

String umontreal.ssj.util.PrintfFormat.e ( int fieldwidth,
int precision,
double x )
static

The same as E, except that ‘e’ is used as the exponent character instead of ‘E’.

Parameters
fieldwidthminimum length of the returned string
precisionnumber of digits after the decimal point
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 540 of file PrintfFormat.java.

◆ f() [1/3]

String umontreal.ssj.util.PrintfFormat.f ( double x)
static

Same as f(0, 6, x).

Parameters
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 552 of file PrintfFormat.java.

◆ f() [2/3]

String umontreal.ssj.util.PrintfFormat.f ( int fieldwidth,
double x )
static

Same as f(fieldwidth, 6, x).

Parameters
fieldwidthminimum length of the returned string
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 563 of file PrintfFormat.java.

◆ f() [3/3]

String umontreal.ssj.util.PrintfFormat.f ( int fieldwidth,
int precision,
double x )
static

Formats the double-precision x into a string like f in C printf.

The argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is explicitly 0, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

Parameters
fieldwidthminimum length of the returned string
precisionnumber of digits after the decimal point
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 580 of file PrintfFormat.java.

◆ format() [1/4]

String umontreal.ssj.util.PrintfFormat.format ( int fieldwidth,
int accuracy,
int precision,
double x )
static

Returns a String containing x.

Uses a total of at least fieldwidth positions (including the sign and point when they appear), accuracy digits after the decimal point and at least precision significant digits. accuracy and precision must be strictly smaller than fieldwidth. The number is rounded if necessary. If there is not enough space to format the number in decimal notation with at least precision significant digits (accuracy or fieldwidth is too small), it will be converted to scientific notation with at least precision significant digits. In that case, fieldwidth is increased if necessary.

Parameters
fieldwidthminimum length of the returned string
accuracynumber of digits after the decimal point
precisionnumber of significant digits
xthe value to be processed
Returns
the converted value as a string

Definition at line 740 of file PrintfFormat.java.

◆ format() [2/4]

String umontreal.ssj.util.PrintfFormat.format ( int fieldwidth,
long x )
static

Converts a long integer to a String with a minimum length of fieldwidth, the result is right-padded with spaces if necessary but it is not truncated.

If only one argument is specified, a fieldwidth of 0 is assumed.

Parameters
fieldwidthminimum length of the returned string
xthe value to be processed
Returns
the string resulting from the conversion

Definition at line 390 of file PrintfFormat.java.

◆ format() [3/4]

String umontreal.ssj.util.PrintfFormat.format ( Locale locale,
int fieldwidth,
int accuracy,
int precision,
double x )
static

This method is equivalent to format(int,int,int,double), except it formats the given value for the locale locale.

Parameters
localethe locale being used for formatting
fieldwidthminimum length of the returned string
accuracynumber of digits after the decimal point
precisionnumber of significant digits
xthe value to be processed
Returns
the converted value as a string

Definition at line 808 of file PrintfFormat.java.

◆ format() [4/4]

String umontreal.ssj.util.PrintfFormat.format ( long x)
static

Same as d(0, 1, x).

Parameters
xthe value to be processed
Returns
the string resulting from the conversion

Definition at line 377 of file PrintfFormat.java.

◆ formatBase() [1/3]

String umontreal.ssj.util.PrintfFormat.formatBase ( int b,
long x )
static

Same as formatBase(0, b, x).

Parameters
bthe base used for conversion
xthe value to be processed
Returns
a string representing x in base b

Definition at line 401 of file PrintfFormat.java.

◆ formatBase() [2/3]

String umontreal.ssj.util.PrintfFormat.formatBase ( int fieldwidth,
int accuracy,
int b,
double x )
static

Converts \(x\) to a String representation in base \(b\) using formatting similar to the \(f\) methods.

Uses a total of at least fieldwidth positions (including the sign and point when they appear) and accuracy digits after the decimal point. If fieldwidth is negative, the number is printed left-justified, otherwise right-justified. Restrictions: \(2 \le b \le10\) and \(|x| < 2^{63}\).

Parameters
fieldwidthminimum length of the returned string
accuracynumber of digits after the decimal point
bbase
xthe value to be processed
Returns
the converted value as a string

Definition at line 838 of file PrintfFormat.java.

◆ formatBase() [3/3]

String umontreal.ssj.util.PrintfFormat.formatBase ( int fieldwidth,
int b,
long x )
static

Converts the integer x to a String representation in base b.

Restrictions: \(2\le\) b \(\le10\).

Parameters
fieldwidthminimum length of the returned string
bthe base used for conversion
xthe value to be processed
Returns
a string representing x in base b

Definition at line 414 of file PrintfFormat.java.

◆ formatWithError() [1/4]

void umontreal.ssj.util.PrintfFormat.formatWithError ( int fieldwidth,
int fieldwidtherr,
int accuracy,
int precision,
double x,
double error,
String[] res )
static

Stores a string containing x into res[0], and a string containing error into res[1], both strings being formatted with the same notation.

Uses a total of at least fieldwidth positions (including the sign and point when they appear) for x, fieldwidtherr positions for error, accuracy digits after the decimal point and at least precision significant digits. accuracy and precision must be strictly smaller than fieldwidth. The numbers are rounded if necessary. If there is not enough space to format x in decimal notation with at least precision significant digits (accuracy or fieldwidth are too small), it will be converted to scientific notation with at least precision significant digits. In that case, fieldwidth is increased if necessary, and the error is also formatted in scientific notation.

Parameters
fieldwidthminimum length of the value string
fieldwidtherrminimum length of the error string
accuracynumber of digits after the decimal point for the value and error
precisionnumber of significant digits for the value
xthe value to be processed
errorthe error on the value to be processed
resan array that will be filled with the formatted value and formatted error

Definition at line 946 of file PrintfFormat.java.

◆ formatWithError() [2/4]

void umontreal.ssj.util.PrintfFormat.formatWithError ( int fieldwidth,
int fieldwidtherr,
int precision,
double x,
double error,
String[] res )
static

Stores a string containing x into res[0], and a string containing error into res[1], both strings being formatted with the same notation.

This calls formatWithError(int,int,int,int,double,double,String[]) with the minimal accuracy for which the formatted string for error is non-zero. If error is 0, the accuracy is 0. If this minimal accuracy causes the strings to be formatted using scientific notation, this method increases the accuracy until the decimal notation can be used.

Parameters
fieldwidthminimum length of the value string
fieldwidtherrminimum length of the error string
precisionnumber of significant digits for the value
xthe value to be processed
errorthe error on the value to be processed
resan array that will be filled with the formatted value and formatted error

Definition at line 996 of file PrintfFormat.java.

◆ formatWithError() [3/4]

void umontreal.ssj.util.PrintfFormat.formatWithError ( Locale locale,
int fieldwidth,
int fieldwidtherr,
int accuracy,
int precision,
double x,
double error,
String[] res )
static

This method is equivalent to formatWithError(int,int,int,double,double,String[]), except that it formats the given value and error for the locale locale.

Parameters
localethe locale being used
fieldwidthminimum length of the value string
fieldwidtherrminimum length of the error string
accuracynumber of digits after the decimal point for the value and error
precisionnumber of significant digits for the value
xthe value to be processed
errorthe error on the value to be processed
resan array that will be filled with the formatted value and formatted error

Definition at line 1026 of file PrintfFormat.java.

◆ formatWithError() [4/4]

void umontreal.ssj.util.PrintfFormat.formatWithError ( Locale locale,
int fieldwidth,
int fieldwidtherr,
int precision,
double x,
double error,
String[] res )
static

This method is equivalent to formatWithError(int,int,int,double,double,String[]), except that it formats the given value and error for the locale locale.

Parameters
localethe locale being used
fieldwidthminimum length of the value string
fieldwidtherrminimum length of the error string
precisionnumber of significant digits for the value
xthe value to be processed
errorthe error on the value to be processed
resan array that will be filled with the formatted value and formatted error

Definition at line 1075 of file PrintfFormat.java.

◆ G() [1/3]

String umontreal.ssj.util.PrintfFormat.G ( double x)
static

Same as G(0, 6, x).

Parameters
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 601 of file PrintfFormat.java.

◆ G() [2/3]

String umontreal.ssj.util.PrintfFormat.G ( int fieldwidth,
double x )
static

Same as G(fieldwidth, 6, x).

Parameters
fieldwidthminimum length of the returned string
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 612 of file PrintfFormat.java.

◆ G() [3/3]

String umontreal.ssj.util.PrintfFormat.G ( int fieldwidth,
int precision,
double x )
static

Formats the double-precision x into a string like G in C printf.

The argument is converted in style f or E. precision specifies the number of significant digits. If it is 0, it is treated as 1. Style E is used if the exponent from its conversion is less than \(-4\) or greater than or equal to precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

Parameters
fieldwidthminimum length of the returned string
precisionnumber of significant digits
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 630 of file PrintfFormat.java.

◆ g() [1/3]

String umontreal.ssj.util.PrintfFormat.g ( double x)
static

Same as g(0, 6, x).

Parameters
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 694 of file PrintfFormat.java.

◆ g() [2/3]

String umontreal.ssj.util.PrintfFormat.g ( int fieldwidth,
double x )
static

Same as g(fieldwidth, 6, x).

Parameters
fieldwidthminimum length of the returned string
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 705 of file PrintfFormat.java.

◆ g() [3/3]

String umontreal.ssj.util.PrintfFormat.g ( int fieldwidth,
int precision,
double x )
static

The same as G, except that ‘e’ is used in the scientific notation.

Parameters
fieldwidthminimum length of the returned string
precisionnumber of significant digits
xthe value to be converted to string
Returns
the converted value as a string

Definition at line 717 of file PrintfFormat.java.

◆ getBuffer()

StringBuffer umontreal.ssj.util.PrintfFormat.getBuffer ( )

Returns the StringBuffer associated with that object.

Returns
the internal StringBuffer object

Definition at line 265 of file PrintfFormat.java.

◆ s() [1/2]

String umontreal.ssj.util.PrintfFormat.s ( int fieldwidth,
String str )
static

Formats the string str like the s in the C printf function.

The fieldwidth argument gives the minimum length of the resulting string. If str is shorter than fieldwidth, it is left-padded with spaces. If fieldwidth is negative, the string is right-padded with spaces if necessary. The String will never be truncated. If str is null, it calls s(fieldwidth, "null"). The fieldwidth argument has the same effect for the other methods in this class.

Parameters
fieldwidthminimum length of the returned string
strthe string to process
Returns
the same string padded with spaces if necessary

Definition at line 305 of file PrintfFormat.java.

◆ s() [2/2]

String umontreal.ssj.util.PrintfFormat.s ( String str)
static

Same as s(0, str).

If the string str is null, it returns the string "null".

Parameters
strthe string to process
Returns
the same string

Definition at line 285 of file PrintfFormat.java.

◆ toString()

String umontreal.ssj.util.PrintfFormat.toString ( )

Converts the buffer into a String.

Returns
the String conversion of the internal buffer

Definition at line 274 of file PrintfFormat.java.

Member Data Documentation

◆ LINE_SEPARATOR

final String umontreal.ssj.util.PrintfFormat.LINE_SEPARATOR = System.getProperty("line.separator")
static

End-of-line symbol or line separator.

Same as NEWLINE.

Definition at line 84 of file PrintfFormat.java.

◆ NEWLINE

final String umontreal.ssj.util.PrintfFormat.NEWLINE = System.getProperty("line.separator")
static

End-of-line symbol or line separator.

It is "\\n" for Unix/Linux, "\\r\\n" for MS-DOS/MS-Windows, and "\\r" for Apple OSX.

Definition at line 79 of file PrintfFormat.java.


The documentation for this class was generated from the following file: