unsw.cse.framescript
Class FSString

java.lang.Object
  extended by unsw.cse.framescript.Term
      extended by unsw.cse.framescript.FSString

public class FSString
extends Term

This class is used to give FrameScript its string data type.

Author:
mmcgill

Field Summary
 java.lang.String str
          The string.
 
Constructor Summary
FSString(java.lang.String s)
          Wraps a Java string.
 
Method Summary
 boolean equals(Term t)
          Compares two Terms for equality.
 Term eval(Instance currentObject, StackFrame stackframe)
          Evaluates a Term.
 java.lang.String toString()
          Turns the Term into a string.
 
Methods inherited from class unsw.cse.framescript.Term
assign, asString, fullMatch, indents, mapVars, match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

str

public java.lang.String str
The string.

Constructor Detail

FSString

public FSString(java.lang.String s)
Wraps a Java string.

Parameters:
s - the value of the string
Method Detail

eval

public Term eval(Instance currentObject,
                 StackFrame stackframe)
          throws FSException
Description copied from class: Term
Evaluates a Term. For many Terms the result is to return itself.

Specified by:
eval in class Term
Parameters:
currentObject - the enclosing instance frame for the code being evaluated
stackframe - StackFrame that holds the values for any variables
Returns:
the result of the evaluation
Throws:
FSException - if any errors occur in performing the evaluation

toString

public java.lang.String toString()
Description copied from class: Term
Turns the Term into a string.

Specified by:
toString in class Term

equals

public boolean equals(Term t)
Description copied from class: Term
Compares two Terms for equality.

Specified by:
equals in class Term
Parameters:
t - Term to be compared to
Returns:
true if the Terms are equal, false otherwise