All Packages Class Hierarchy This Package Previous Next Index
Class pinball.log.BallStats
java.lang.Object
|
+----pinball.log.BallStats
- public class BallStats
- extends Object
Find the statistics for the balls in play.
-
ball
- The ball number.
-
balls
- The balls that were in play.
-
hits
- Number of hits for the ball.
-
output
- File that will get the data.
-
time
- Time in play for the ball.
-
BallStats(PrintWriter)
- Creates the statistics for the balls in play.
-
check(String)
-
Analyzes the ball's information.
-
process(StringTokenizer)
- Finds how long a ball was in play and the number of hits for it.
-
writeInfo()
- Writes the information about the balls to the output file.
output
private PrintWriter output
- File that will get the data.
ball
private int ball
- The ball number.
time
private long time
- Time in play for the ball.
hits
private int hits
- Number of hits for the ball.
balls
private Vector balls
- The balls that were in play.
BallStats
public BallStats(PrintWriter p)
- Creates the statistics for the balls in play.
- Parameters:
- p - the file to write the output to.
process
public void process(StringTokenizer tokens)
- Finds how long a ball was in play and the number of hits for it.
- Parameters:
- tokens - the line of tokens to process.
check
private void check(String data)
- Analyzes the ball's information.
Finds how long a ball was in play and the number of hits for it.
data the line from the log file.
writeInfo
public void writeInfo()
- Writes the information about the balls to the output file.
All Packages Class Hierarchy This Package Previous Next Index