jeops.parser
Class Declaracoes

java.lang.Object
  |
  +--jeops.parser.Declaracoes

public class Declaracoes
extends java.lang.Object

This class models a set of String pairs, used to store the list of declarations for a rule.

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

Constructor Summary
Declaracoes()
          Class constructor.
 
Method Summary
 java.util.Enumeration elements()
          Returns an enumeration with the types of these declarations.
 java.lang.String get(java.lang.String ident)
          Recovers the type of a previously declared identifier.
 java.lang.String getIdent(int i)
          Returns the identifier for the i-th declaration of this set.
 int getNumDeclarations()
          Returns the number of declarations in this set.
 java.lang.String getType(int i)
          Returns the type for the i-th declaration of this set.
 java.util.Enumeration keys()
          Retorna uma enumeração com os identificadores das declarações.
 void put(java.lang.String ident, java.lang.String type)
          Adds a new declaration to this set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Declaracoes

public Declaracoes()
Class constructor. Creates an empty instance of this class.
Method Detail

elements

public java.util.Enumeration elements()
Returns an enumeration with the types of these declarations.
Returns:
an enumeration with the types of these declarations.

get

public java.lang.String get(java.lang.String ident)
Recovers the type of a previously declared identifier.
Parameters:
ident - the identifier of the needed identifier
Returns:
the class name of this identifier.

getIdent

public java.lang.String getIdent(int i)
Returns the identifier for the i-th declaration of this set.
Parameters:
i - the index of the needed element.
Returns:
the identifier for the i-th declaration of this set.
Since:
0.02

getNumDeclarations

public int getNumDeclarations()
Returns the number of declarations in this set.
Returns:
the number of declarations in this set.

getType

public java.lang.String getType(int i)
Returns the type for the i-th declaration of this set.
Parameters:
i - the index of the needed element.
Returns:
the type for the i-th declaration of this set.
Since:
0.02

keys

public java.util.Enumeration keys()
Retorna uma enumeração com os identificadores das declarações.

put

public void put(java.lang.String ident,
                java.lang.String type)
Adds a new declaration to this set.
Parameters:
ident - the identifier of the declaration
type - the type of the declaration