wyvern.kernel.commands.filters
Class FilterUtils

java.lang.Object
  extended bywyvern.kernel.commands.filters.FilterUtils

public final class FilterUtils
extends java.lang.Object

Provides utilities for use by CommandFilter implementations.

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

Method Summary
static java.util.ArrayList explode(java.lang.String text)
          Preprocesses the text to filter by splitting it into an ArrayList of lines.
static java.lang.String implode(java.util.ArrayList lines)
          Takes an ArrayList of lines and returns it as a single String, with linefeeds in the string after each line, except for the last.
static void printArrayList(java.util.ArrayList lines)
          Prints an ArrayList, one element per line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

explode

public static java.util.ArrayList explode(java.lang.String text)
Preprocesses the text to filter by splitting it into an ArrayList of lines. Then it calls the abstract method filterLines(), which the subclass must override to filter the lines.

Parameters:
text - the event output that's going to be sent to the event's agent.
Returns:
the filtered list to actually send to the agent It may be passed through more filters in the chain before sending to the agent.

implode

public static java.lang.String implode(java.util.ArrayList lines)
Takes an ArrayList of lines and returns it as a single String, with linefeeds in the string after each line, except for the last.


printArrayList

public static void printArrayList(java.util.ArrayList lines)
Prints an ArrayList, one element per line.