phonebill.phonelog
Class PhoneBill
java.lang.Object
|
+--phonebill.phonelog.PhoneBill
- public class PhoneBill
- extends java.lang.Object
This class is a standalone program capable of generating a phone bill
based on the given command line parameters and (eventually) a configuration file.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
version
public static final java.lang.String version
prices
protected static PhonePrice prices
logParser
protected PhoneLogParser logParser
params
protected Parameters params
verbose
protected boolean verbose
help
protected boolean help
error
protected boolean error
PhoneBill
public PhoneBill()
PhoneBill
public PhoneBill(java.lang.String[] argv)
run
public void run()
testPrices
protected void testPrices()
main
public static void main(java.lang.String[] argv)
getParms
protected boolean getParms(java.lang.String[] argv)
- Processes parameters given at the command line.
Allowed parameters:
-c file The config file to use (default is "PhoneBill.conf" in the current directory)
-d dir Directory where logfiles can be found
-s date The date ([YY]YYMMDD) for which to begin with
-e date The date ([YY]YYMMDD) for which to end with
-o file The name of the output file (possibly with complete path)
-V Run in verbose mode
-Dn Run in debug level n [0..5]
initParms
protected void initParms()
- Set the parameter properties.
parseConfigFile
protected boolean parseConfigFile()
- Read the config file and set default values for the remaining parameters.
loadDefaultParmsAndValidate
protected boolean loadDefaultParmsAndValidate()
- Validate the values of parameters.
dumpConfig
protected void dumpConfig()
printUse
protected void printUse()
printHelp
protected void printHelp()
getPhonePriceInstance
public static PhonePrice getPhonePriceInstance()
setDefaultPhonePrice
public static void setDefaultPhonePrice(PhonePrice newPrice)
getUsedMemory
public static long getUsedMemory()