Class TokenClassifier

java.lang.Object
  extended by TokenClassifier

public class TokenClassifier
extends java.lang.Object

The TokenClassifier Java appication takes a list of words and catagorizes them into queues based on the first letter in them.

Author:
Tyler Wilson

Constructor Summary
TokenClassifier()
           
 
Method Summary
static void buildQueues(java.lang.String fileName)
          Sets up and stores the words from the input file into appropriate queues.
static void main(java.lang.String[] args)
          The main method makes sure there is a command line argument, then creates the TokenClassifier and builds queues, finally, it prints the queues.
static java.lang.String makeUpper(java.lang.String lower)
          Change a string with lowercase letters into all uppercase
static void printQueues()
          Prints the queues in alphabetic order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenClassifier

public TokenClassifier()
Method Detail

printQueues

public static void printQueues()
Prints the queues in alphabetic order.

Parameters:
-none -

buildQueues

public static void buildQueues(java.lang.String fileName)
                        throws java.lang.Exception
Sets up and stores the words from the input file into appropriate queues.

Parameters:
fileName - the file that the words will come from
Throws:
java.lang.Exception - Is thrown when fileName is not a valid file.

makeUpper

public static java.lang.String makeUpper(java.lang.String lower)
Change a string with lowercase letters into all uppercase

Parameters:
lower - a string in any case
Returns:
the string with letters now being uppercase

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
The main method makes sure there is a command line argument, then creates the TokenClassifier and builds queues, finally, it prints the queues.

Throws:
java.lang.Exception - When there is none, or more than one argument in command line.


1