compiler.intermediate
Class Value

java.lang.Object
  extended by compiler.intermediate.Value
All Implemented Interfaces:
OperandIF

public class Value
extends java.lang.Object
implements OperandIF

Clase que representa un valor constante en el código intermedio


Constructor Summary
Value(int value)
          Constructor for Value.
 
Method Summary
 boolean equals(java.lang.Object other)
          Compares this object with another one.
 int getValue()
          Returns the value.
 int hashCode()
          Returns a hash code for the object.
 void setValue(int value)
          Sets The value.
 java.lang.String toString()
          Return a string representing the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value(int value)
Constructor for Value.

Parameters:
value - The value.
Method Detail

equals

public boolean equals(java.lang.Object other)
Compares this object with another one.

Overrides:
equals in class java.lang.Object
Parameters:
other - the other object.
Returns:
true if two objects has the same properties.

getValue

public int getValue()
Returns the value.

Returns:
Returns the value.

hashCode

public int hashCode()
Returns a hash code for the object.

Overrides:
hashCode in class java.lang.Object

setValue

public void setValue(int value)
Sets The value.

Parameters:
value - The value to set.

toString

public java.lang.String toString()
Return a string representing the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representing the object.