sheffield
Class EasyWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PrintWriter
              |
              +--sheffield.EasyWriter

public class EasyWriter
extends java.io.PrintWriter


Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
EasyWriter()
          Create a new EasyWriter that writes to standard output
EasyWriter(java.lang.String s)
          Create a new EasyWriter that writes to a text file
 
Method Summary
 void print(double x, int n)
          Print a double with a specified precision
 void print(double x, int n, int w)
          Print a double with a specified precision and field width
 void print(float x, int n)
          Print a float with a specified precision
 void print(float x, int n, int w)
          Print a float with a specified precision and field width
 void print(int x, int n)
          Print an int within a specified field width
 void print(long x, int n)
          Print a long within a specified field width
 void print(short x, int n)
          Print a short within a specified field width
 void println(double x, int n)
          Println a double with a specified precision
 void println(double x, int n, int w)
          Println a double with a specified precision and field width
 void println(float x, int n)
          Println a float with a specified precision
 void println(float x, int n, int w)
          Println a float with a specified precision and field width
 void println(int x, int n)
          Println an int within a specified field width
 void println(long x, int n)
          Println a long within a specified field width
 void println(short x, int n)
          Println a short within a specified field width
 void prompt(java.lang.String p)
           
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EasyWriter

public EasyWriter()
Create a new EasyWriter that writes to standard output

EasyWriter

public EasyWriter(java.lang.String s)
Create a new EasyWriter that writes to a text file
Parameters:
s - the name of the text file
Method Detail

prompt

public void prompt(java.lang.String p)

println

public void println(int x,
                    int n)
Println an int within a specified field width
Parameters:
x - the number to println
n - the field width

print

public void print(int x,
                  int n)
Print an int within a specified field width
Parameters:
x - the number to print
n - the field width

println

public void println(long x,
                    int n)
Println a long within a specified field width
Parameters:
x - the number to println
n - the field width

print

public void print(long x,
                  int n)
Print a long within a specified field width
Parameters:
x - the number to print
n - the field width

println

public void println(short x,
                    int n)
Println a short within a specified field width
Parameters:
x - the number to println
n - the field width

print

public void print(short x,
                  int n)
Print a short within a specified field width
Parameters:
x - the number to print
n - the field width

print

public void print(double x,
                  int n)
Print a double with a specified precision
Parameters:
x - the number to print
n - the number of decimal places

println

public void println(double x,
                    int n)
Println a double with a specified precision
Parameters:
x - the number to println
n - the number of decimal places

print

public void print(double x,
                  int n,
                  int w)
Print a double with a specified precision and field width
Parameters:
x - the number to print
n - the number of decimal places
w - the field width

println

public void println(double x,
                    int n,
                    int w)
Println a double with a specified precision and field width
Parameters:
x - the number to println
n - the number of decimal places
w - the field width

print

public void print(float x,
                  int n)
Print a float with a specified precision
Parameters:
x - the number to print
n - the number of decimal places

println

public void println(float x,
                    int n)
Println a float with a specified precision
Parameters:
x - the number to println
n - the number of decimal places

print

public void print(float x,
                  int n,
                  int w)
Print a float with a specified precision and field width
Parameters:
x - the number to print
n - the number of decimal places
w - the field width

println

public void println(float x,
                    int n,
                    int w)
Println a float with a specified precision and field width
Parameters:
x - the number to println
n - the number of decimal places
w - the field width