public static void main( String[ ] args )
    {
        DictionaryReader oDictionaryReader = null;
        Dictionary oDict = null;
        CmdLineParser oCmdLine = null;
        NumberParser oNumParser = null;
        FileParser oFileParser = null;

        Map<String, List<String>> oResults = null;
        List<String> oValues = null;

        String sDictionaryName = null;
        String sCurrent = null;

        int nArgsLength = 0;
        int i = 0;

        if ( args.length > 0 )
        {
            if ( args[ i ].equals( CommonConstants.STR_DICT_OPTION ) )
            {
                i++;
                sDictionaryName = args[ i++ ];
            }

            nArgsLength = args.length - i;
            oDictionaryReader = new DictionaryReader( sDictionaryName );
            oDict = oDictionaryReader.getDictionary( );

            if ( nArgsLength > 0 )
            {
                // Remaining arguments could either be a series of numbers, a
                // series of filenames, or both.
                oNumParser = new NumberParser( oDict );
                oFileParser = new FileParser( oDict );

                for ( ; i < args.length; i++ )
                {
                    sCurrent = args[ i ];

                    try
                    {
                        oResults = oFileParser.analyzeFile( sCurrent );

                        displayResults( oResults );
                    }
                    catch ( FileNotFoundException e )
                    {
                        // It's not a filename. It might be a number sequence.
                        oValues = oNumParser.analyzeNumber( sCurrent );

                        displayResults( sCurrent, oValues );
                    }
                }
            }
            else
            {
                // Invoke command line to gather inputs from the user.
                oCmdLine = new CmdLineParser( oDict );

                oCmdLine.analyzeNumbers( );
            }
        }
        else
        {
            // Invoke command line to gather inputs from the user.
            oDictionaryReader = new DictionaryReader( );
            oCmdLine = new CmdLineParser( oDictionaryReader.getDictionary( ) );

            oCmdLine.analyzeNumbers( );
        }
    }