edu.stanford.rt.datatype
Class RecordType

java.lang.Object
  |
  +--edu.stanford.rt.datatype.DataType
        |
        +--edu.stanford.rt.datatype.RecordType

public class RecordType
extends DataType

Author:
Ninghui Li, Sandra Qiu
Implementation of the RecordType element in DomainSpecification.

Field Summary
private  OrderedMap fieldDeclarations
          Maps String (field name) to DataType (field type).
private  int size
          the number of fields declared for this RecordType declaration.
 
Fields inherited from class edu.stanford.rt.datatype.DataType
 
Constructor Summary
RecordType(java.lang.String name, OrderedMap fieldDeclarations)
          constructor for RecordType.
 
Method Summary
 OrderedMap getFieldDeclarations()
          Method getFieldDeclarations.
 DataType getFieldType(java.lang.String fieldName)
          Method getFieldType.
 java.lang.String toString(java.lang.String indent)
          Method toString.
 
Methods inherited from class edu.stanford.rt.datatype.DataType
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldDeclarations

private OrderedMap fieldDeclarations
Maps String (field name) to DataType (field type).


size

private int size
the number of fields declared for this RecordType declaration.

Constructor Detail

RecordType

public RecordType(java.lang.String name,
                  OrderedMap fieldDeclarations)
           throws DomainSpecException
constructor for RecordType.

Method Detail

getFieldDeclarations

public OrderedMap getFieldDeclarations()
Method getFieldDeclarations.

Returns:
OrderedMap

getFieldType

public DataType getFieldType(java.lang.String fieldName)
                      throws DomainSpecException
Method getFieldType. returns DataType for the field with given fieldName.

Parameters:
fieldName -
Returns:
DataType
Throws:
DomainSpecException

toString

public java.lang.String toString(java.lang.String indent)
Description copied from class: DataType
Method toString.

Overrides:
toString in class DataType
Parameters:
indent -
Returns:
String