stringtransformers
Class StringTransformer
java.lang.Object
cs101.util.AnimateObject
stringtransformers.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
in
protected InputConnection in
out
protected OutputConnection out
visualizer
protected TransformerVisualizer visualizer
StringTransformer
public StringTransformer()
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)