pascalinterpreter.operators
Class Assign

java.lang.Object
  extended bypascalinterpreter.Operator
      extended bypascalinterpreter.BinaryOperator
          extended bypascalinterpreter.operators.Assign

public class Assign
extends BinaryOperator

Represents a singleton.


Field Summary
private static Assign instance
          Holds singleton instance
 
Fields inherited from class pascalinterpreter.Operator
OP_REG_VAR_NAME
 
Constructor Summary
private Assign()
          prevents instantiation
 
Method Summary
 void execute(Variable operandL, Variable operandR)
           
static Assign getInstance()
          Returns the singleton instance.
 boolean isPossible(DataType type1, DataType type2)
          Sprawdza, czy operacja jest możliwa z użyciem tego typu operandów.
 
Methods inherited from class pascalinterpreter.BinaryOperator
execInitialize, makeConversion, parseDouble
 
Methods inherited from class pascalinterpreter.Operator
getRegistry, setRegistry, setRegistry, setRegistry, setRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static Assign instance
Holds singleton instance

Constructor Detail

Assign

private Assign()
prevents instantiation

Method Detail

getInstance

public static Assign getInstance()
Returns the singleton instance.

Returns:
the singleton instance

execute

public void execute(Variable operandL,
                    Variable operandR)
             throws RuntimeException,
                    InternalException
Specified by:
execute in class BinaryOperator
Throws:
RuntimeException
InternalException

isPossible

public boolean isPossible(DataType type1,
                          DataType type2)
Description copied from class: BinaryOperator
Sprawdza, czy operacja jest możliwa z użyciem tego typu operandów.

Overrides:
isPossible in class BinaryOperator
Parameters:
type1 - - typ operandu L.
type2 - - typ operandu R.
Returns:
True, jeżeli operacja jest możliwa. W przeciwnym wypadku false.