org.freehep.record.loop.examples
Class Strings2Words
java.lang.Object
org.freehep.record.loop.event.RecordAdapter
org.freehep.record.loop.examples.Strings2Words
- All Implemented Interfaces:
- EventListener, RecordListener
- public class Strings2Words
- extends RecordAdapter
This class is am example of how to chain RecordListener
objects can be chained. This process allows more than one listener to be
executed during the loop method of an SequentialRecordLoop
object. This example uses the
listener in the EchoStrings example, but this listener is chained behind
an instance of this class which is an RecordListener
that replaces
the Strings in the record with a new set of strings containing
the individual words from the original strings. Thus the EchoStrings
listener will output one word on each line, rather than a line at a
time.
- Version:
- $Id: Strings2Words.java,v 1.1 2003/05/06 23:02:07 tonyj Exp $
- Author:
- patton
- Source Code:
- Strings2Words.java
Constructor Summary |
Strings2Words()
Create an instance of this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Strings2Words
public Strings2Words()
- Create an instance of this class.
recordSupplied
public void recordSupplied(RecordSuppliedEvent event)
- Description copied from interface:
RecordListener
- Called every time a new record is read by the SequentialRecordLoop's
SequentialRecordSource object.
- Specified by:
recordSupplied
in interface RecordListener
- Overrides:
recordSupplied
in class RecordAdapter
main
public static void main(String[] args)
throws FileNotFoundException
- Throws:
FileNotFoundException
Copyright © 2000-2004 FreeHEP, All Rights Reserved.