String Transformers Problem Set Javadocs

stringtransformers
Class StringTransformer

java.lang.Object
  extended bycs101.util.AnimateObject
      extended bystringtransformers.StringTransformer
All Implemented Interfaces:
Animate, Initializable, InputAcceptor, OutputAcceptor
Direct Known Subclasses:
AlternatingOutputter, Broadcaster, LazyEchoer, LowerCaser, NameDropper, NoopTransformer, Pedant, PigLatinTransformer, SentenceCaser, UbbyDubbyTransformer, UpperCaser, WordSplitter

public abstract class StringTransformer
extends AnimateObject
implements InputAcceptor, OutputAcceptor, Initializable


Field Summary
protected  InputConnection in
           
protected  OutputConnection out
           
protected  TransformerVisualizer visualizer
           
 
Fields inherited from class cs101.util.AnimateObject
DONT_START_YET, spirit, START_IMMEDIATELY
 
Constructor Summary
StringTransformer()
           
 
Method Summary
 void act()
          Override this method to give the AnimateObject behavior.
 void addInputConnection(InputConnection in)
           
 void addOutputConnection(OutputConnection out)
           
 void init()
           
 java.lang.String toString()
           
abstract  java.lang.String transform(java.lang.String input)
           
 
Methods inherited from class cs101.util.AnimateObject
start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

in

protected InputConnection in

out

protected OutputConnection out

visualizer

protected TransformerVisualizer visualizer
Constructor Detail

StringTransformer

public StringTransformer()
Method Detail

init

public void init()
Specified by:
init in interface Initializable

toString

public java.lang.String toString()

addInputConnection

public void addInputConnection(InputConnection in)
                        throws ConnectionRejectedException
Specified by:
addInputConnection in interface InputAcceptor
Throws:
ConnectionRejectedException

addOutputConnection

public void addOutputConnection(OutputConnection out)
                         throws ConnectionRejectedException
Specified by:
addOutputConnection in interface OutputAcceptor
Throws:
ConnectionRejectedException

act

public void act()
Description copied from class: AnimateObject
Override this method to give the AnimateObject behavior. The default behavior -- Thread.yield() -- simply gives other animacies a chance to run.

Specified by:
act in interface Animate
Specified by:
act in class AnimateObject

transform

public abstract java.lang.String transform(java.lang.String input)

String Transformers Problem Set Javadocs