org.concord.util.script
Class DivideExpression

java.lang.Object
  |
  +--org.concord.util.script.ScriptObject
        |
        +--org.concord.util.script.Expression
              |
              +--org.concord.util.script.BinaryExpression
                    |
                    +--org.concord.util.script.DivideExpression
All Implemented Interfaces:
java.beans.BeanInfo

public class DivideExpression
extends BinaryExpression

The DivideExpression class implements the semantic node for divide. The binOp method calculates for both Integer and Float by contagion. If either object is a Float then the whole expression will be a Float. Otherwise it will be an Integer. (Eventually these aritmetic semantic nodes will accomodate Double and Long and Short as well.)

Version:
$Revision: 1.2 $ $Date: 2001/08/31 15:45:34 $
Author:
$Author: ed $

Fields inherited from class org.concord.util.script.BinaryExpression
args, ops
 
Fields inherited from class org.concord.util.script.ScriptObject
beginColumn, beginLine, debug, deleted, doConversion, endColumn, endLine, name, nil, runtimeTable, script
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
DivideExpression()
           
 
Method Summary
 java.lang.Object binOp(java.lang.Object op1, java.lang.Object op2)
          This method should be overridden by a derived class.
 java.lang.String operatorString()
           
 
Methods inherited from class org.concord.util.script.BinaryExpression
addOperand, addOperation, delete, interpret
 
Methods inherited from class org.concord.util.script.Expression
interpret, toString
 
Methods inherited from class org.concord.util.script.ScriptObject
findConstructor, findMethod, getAdditionalBeanInfo, getArrayValue, getAtom, getBeanDescriptor, getCurrentFrame, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getField, getFieldValue, getIcon, getMethodDescriptors, getName, getPropertyDescriptors, getScript, popFrame, pushFrame, setArrayValue, setCurrentFrame, setFieldValue, setName, setScript, setSourceBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DivideExpression

public DivideExpression()
Method Detail

binOp

public java.lang.Object binOp(java.lang.Object op1,
                              java.lang.Object op2)
Description copied from class: BinaryExpression
This method should be overridden by a derived class. (Maybe this method should be abstract.)
Overrides:
binOp in class BinaryExpression

operatorString

public java.lang.String operatorString()
Overrides:
operatorString in class BinaryExpression