Package jadex.micro.examples.eliza
Class ElizaParse
- java.lang.Object
-
- jadex.micro.examples.eliza.ElizaParse
-
public class ElizaParse extends java.lang.Object
Eliza in Java. Adapted from a BASIC program I found floating on the net. Eliza was originally written by Joseph Weizenbaum. This version is an adaption of the program as it appeared in the memorable magazine Create Computing around 1981.
-
-
Constructor Summary
Constructors Constructor Description ElizaParse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleLine(java.lang.String I)
void
PRINT(java.lang.String s)
Cute hack to make it look like BASIC.static java.lang.String
removeChar(java.lang.String s, char c)
Utility function that removes a char from a String.static java.lang.String
replaceString(java.lang.String s, java.lang.String oldstring, java.lang.String newstring)
Utility function that replaces all occurences of a specific string with another string.
-
-
-
Method Detail
-
PRINT
public void PRINT(java.lang.String s)
Cute hack to make it look like BASIC. This adds a String to the msg Vector.
-
handleLine
public void handleLine(java.lang.String I)
-
removeChar
public static java.lang.String removeChar(java.lang.String s, char c)
Utility function that removes a char from a String.
-
replaceString
public static java.lang.String replaceString(java.lang.String s, java.lang.String oldstring, java.lang.String newstring)
Utility function that replaces all occurences of a specific string with another string.
-
-
-