All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gpsys.TypeToTerminalsTable

java.lang.Object
   |
   +----gpsys.TypeToTerminalsTable

public class TypeToTerminalsTable
extends Object
implements Serializable
A Table that maps a given Type to an array of Terminals returning that type.

Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.

Variable Index

 o theTable

Constructor Index

 o TypeToTerminalsTable(int)
Creates a table of the specified initial capacity.

Method Index

 o get(Type)
Get all the Terminals that return the specified type.
 o put(Type, Terminal[])
Put the specified Terminals array in the table.

Variables

 o theTable
 Hashtable theTable

Constructors

 o TypeToTerminalsTable
 public TypeToTerminalsTable(int initialCapacity)
Creates a table of the specified initial capacity. The table is automatically increased in size if the number of entries exceed 50% of the initial capacity.

Parameters:
initialCapacity - The initial capacity of the table.

Methods

 o get
 public final Terminal[] get(Type t)
Get all the Terminals that return the specified type.

Parameters:
t - The return type of the Terminals.
 o put
 public final void put(Type t,
                       Terminal terminals[])
Put the specified Terminals array in the table. The Terminals all return the type t which is the key to be used for retrieval via get().

Parameters:
t - The return type of the Terminals.
functions - The array of Terminals return the above type.

All Packages  Class Hierarchy  This Package  Previous  Next  Index