Crossfire JXClient, Trunk
Classes | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
WC Class Reference
Collaboration diagram for WC:
Collaboration graph

Classes

class  WCStatistics
 

Static Public Member Functions

static void main (String[] args) throws IOException
 

Static Private Member Functions

static void collectInFourPasses (BufferedReader reader) throws IOException
 
static void collectInOnePass (BufferedReader reader)
 
static void usage ()
 

Static Private Attributes

static final Pattern nonWordPattern = Pattern.compile("\\W")
 
static final int READ_AHEAD_LIMIT = 100_000_000
 

Detailed Description

WC - Prints newline, word, and character counts for each file. See the usage method for instructions and command line parameters. This sample shows usages of:

Definition at line 60 of file WC.java.

Member Function Documentation

◆ collectInFourPasses()

static void WC.collectInFourPasses ( BufferedReader  reader) throws IOException
staticprivate

Definition at line 103 of file WC.java.

Referenced by main().

Here is the caller graph for this function:

◆ collectInOnePass()

static void WC.collectInOnePass ( BufferedReader  reader)
staticprivate

Definition at line 138 of file WC.java.

References WC.WCStatistics.accept(), and WC.WCStatistics.combine().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

static void WC.main ( String[]  args) throws IOException
static

The main method for the WC program. Run the program with an empty argument list to see possible arguments.

Parameters
argsthe argument list for WC
Exceptions
java.io.IOExceptionIf an input exception occurred.

Definition at line 75 of file WC.java.

References collectInFourPasses(), collectInOnePass(), READ_AHEAD_LIMIT, and usage().

Here is the call graph for this function:

◆ usage()

static void WC.usage ( )
staticprivate

Definition at line 163 of file WC.java.

Referenced by main().

Here is the caller graph for this function:

Member Data Documentation

◆ nonWordPattern

final Pattern WC.nonWordPattern = Pattern.compile("\\W")
staticprivate

Definition at line 66 of file WC.java.

Referenced by WC.WCStatistics.accept().

◆ READ_AHEAD_LIMIT

final int WC.READ_AHEAD_LIMIT = 100_000_000
staticprivate

Definition at line 63 of file WC.java.

Referenced by main().


The documentation for this class was generated from the following file: