jeops.expressions
Class Triple

java.lang.Object
  |
  +--jeops.expressions.Triple

public class Triple
extends java.lang.Object

Auxiliar class that stores triples with (class name, variable identifier and references to the actual object), to be used in the symbolic table.

Version:
0.03 22 May 1999 First version with comments in English.
Author:
Carlos Figueira Filho (csff@di.ufpe.br)

Constructor Summary
Triple(java.lang.String className, java.lang.String ident, java.lang.Object reference)
          Class constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this triple with the given object.
 java.lang.Object getObject()
          Returns the object reference stored in this triple.
 boolean totallyEquals(Triple t)
          Compares all fields of this triple with the given object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triple

public Triple(java.lang.String className,
              java.lang.String ident,
              java.lang.Object reference)
Class constructor.
Parameters:
className - the class name.
ident - the variable identifier.
reference - a reference to the object.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares this triple with the given object. We call two triples equal if and only if their ident field are equal.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to be compared to this triple
Returns:
true if this triple is equal to the given object; false otherwise.

getObject

public java.lang.Object getObject()
Returns the object reference stored in this triple.
Returns:
the object reference stored in this triple.

totallyEquals

public boolean totallyEquals(Triple t)
Compares all fields of this triple with the given object. We call two triples totally equal if and only if all their field are equal.
Parameters:
obj - the object to be compared to this triple
Returns:
true if this triple is totally equal to the given object; false otherwise.