talx x1.0.5

util
Class Stats

java.lang.Object
  extended byutil.Stats

public class Stats
extends java.lang.Object

This class is a tool for reading in status of skills and drills from a plain text file. The name of the file or the inputstream must be passed into this class as an argument. Each line in the settings file much obey the format of SkillLatticeConstants.java e.g. "drill1 attempted yyyy.MM.dd_HH:mm:ss"


Constructor Summary
Stats(java.lang.String dir)
          This constructor loads the settings from a String filename.
 
Method Summary
 java.lang.String get(java.lang.String name)
          This method returns the value associated with some settings key.
 java.lang.String getContinuation(java.lang.String skillName)
           
 java.util.Date getDate(java.lang.String name)
           
 int getLimitCount(java.lang.String name)
           
 java.lang.String getStatus(java.lang.String name)
           
 void process(java.lang.String line)
          This method processes a single line from the settings file, and puts the pair of values into an internal map.
 void setStatus(Skill skill, Drill drill)
           
 void setStatus(java.lang.String name, int limit)
           
 void setStatus(java.lang.String name, java.lang.String stat, java.util.Date date)
           
 void write()
           
 void write(java.lang.String name, java.lang.String data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stats

public Stats(java.lang.String dir)
This constructor loads the settings from a String filename.

Parameters:
dir - Filename of the settings file.
Method Detail

process

public void process(java.lang.String line)
This method processes a single line from the settings file, and puts the pair of values into an internal map. The line of text must obey the format of SettingsConstants.java

Parameters:
line - A line of data from the settings file.

get

public java.lang.String get(java.lang.String name)
This method returns the value associated with some settings key.

Parameters:
name - Name of constant key.
Returns:
String The value of associated with argument.

getStatus

public java.lang.String getStatus(java.lang.String name)

getDate

public java.util.Date getDate(java.lang.String name)
                       throws java.text.ParseException
Throws:
java.text.ParseException

getLimitCount

public int getLimitCount(java.lang.String name)

getContinuation

public java.lang.String getContinuation(java.lang.String skillName)

setStatus

public void setStatus(java.lang.String name,
                      java.lang.String stat,
                      java.util.Date date)

setStatus

public void setStatus(java.lang.String name,
                      int limit)

setStatus

public void setStatus(Skill skill,
                      Drill drill)

write

public void write()

write

public void write(java.lang.String name,
                  java.lang.String data)

talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.