compiler.semantic.type
Class TypeEnum

java.lang.Object
  extended by es.uned.compiler.semantic.type.TypeBase
      extended by compiler.semantic.type.TypeEnum
All Implemented Interfaces:
TypeIF

public class TypeEnum
extends TypeBase

Clase que representa un tipo enumerado Ha de ser implementada por el estudiante


Constructor Summary
TypeEnum(ScopeIF scope)
          Constructor for TypeEnum.
TypeEnum(ScopeIF scope, java.lang.String name)
          Constructor for TypeEnum.
 
Method Summary
 boolean equals(java.lang.Object other)
          Compares this object with another one.
 int hashCode()
          Returns a hash code for the object.
 java.lang.String toString()
          Return a string representing the object.
 
Methods inherited from class es.uned.compiler.semantic.type.TypeBase
getName, getScope, setName, setScope
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeEnum

public TypeEnum(ScopeIF scope)
Constructor for TypeEnum.

Parameters:
scope - The scope.

TypeEnum

public TypeEnum(ScopeIF scope,
                java.lang.String name)
Constructor for TypeEnum.

Parameters:
scope - The scope
name - The name.
Method Detail

equals

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

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

hashCode

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

Overrides:
hashCode in class TypeBase

toString

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

Overrides:
toString in class TypeBase
Returns:
a string representing the object.