name.panitz.eliza
Class Eliza

java.lang.Object
  extended by name.panitz.eliza.Eliza
All Implemented Interfaces:
ButtonLogic

public class Eliza
extends java.lang.Object
implements ButtonLogic

A simulation of a psycho therapist. This program has been converted from Mark .P. Jones Gofer implementation.


Constructor Summary
Eliza()
           
 
Method Summary
 java.lang.String eval(java.lang.String s)
          Describes how the text in the input field is converted into a text for the output field.
 java.lang.String getDescription()
          The label text on the Button in the GUI.
 Li<java.lang.String> replies(Li<java.lang.String> key, Li<java.lang.String> question)
           
static java.lang.String stripPunctuation(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Eliza

public Eliza()
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: ButtonLogic
The label text on the Button in the GUI.

Specified by:
getDescription in interface ButtonLogic
Returns:
the button label text.

eval

public java.lang.String eval(java.lang.String s)
Description copied from interface: ButtonLogic
Describes how the text in the input field is converted into a text for the output field.

Specified by:
eval in interface ButtonLogic
Parameters:
s - is the text as read from the input field.
Returns:
the text to be written into the output field.

stripPunctuation

public static java.lang.String stripPunctuation(java.lang.String s)

replies

public Li<java.lang.String> replies(Li<java.lang.String> key,
                                    Li<java.lang.String> question)