wyvern.kernel.commands.filters
Class WCFilter

java.lang.Object
  extended bywyvern.kernel.commands.filters.WCFilter
All Implemented Interfaces:
CommandFilter

public class WCFilter
extends java.lang.Object
implements CommandFilter

Word count.

Version:
1.0, Jun 16, 2003
Author:
Steve Yegge

Constructor Summary
WCFilter()
           
 
Method Summary
 java.util.ArrayList filter(java.util.ArrayList input)
          Filters the lines.
static void main(java.lang.String[] args)
          Tests it.
 void parseArguments(java.lang.String verb, java.lang.String args)
          Parses the arguments to "wc".
 java.lang.String toString()
          Returns String representation of this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WCFilter

public WCFilter()
Method Detail

parseArguments

public void parseArguments(java.lang.String verb,
                           java.lang.String args)
Parses the arguments to "wc".

Specified by:
parseArguments in interface CommandFilter
Parameters:
verb - the command verb (e.g. "wc").
args - the argument string passed to the command, not including the command verb. Null if no arguments were passed to the filter.

filter

public java.util.ArrayList filter(java.util.ArrayList input)
Filters the lines.

Specified by:
filter in interface CommandFilter
Parameters:
input - the event input, broken into lines.
Returns:
a subset of the lines, matched against the argument string.

toString

public java.lang.String toString()
Returns String representation of this filter.


main

public static void main(java.lang.String[] args)
Tests it.