org.norecess.citkit.types
Class RecordType

java.lang.Object
  extended by org.norecess.citkit.types.RecordType
All Implemented Interfaces:
HobbesType, IRecordType

public class RecordType
extends java.lang.Object
implements IRecordType

Data type for records.

Author:
Jeremy D. Frens

Constructor Summary
RecordType(java.util.Map<Symbol,HobbesType> fields)
          Deprecated. Use RecordType(Map, SymbolTable) instead.
RecordType(java.util.Map<Symbol,HobbesType> fields, SymbolTable<HobbesType> environment)
           
 
Method Summary
<T> T
accept(TypeVisitor<T> visitor)
           
 HobbesType actual()
           
 boolean equals(java.lang.Object o)
           
 HobbesType get(ISymbol symbol)
           
 HobbesType get(java.lang.String name)
           
 java.util.Set<Symbol> getFields()
           
 HobbesType getTypeFromLexicalEnvironment(ISymbol symbol)
           
 int hashCode()
           
 boolean isBound()
           
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecordType

@Deprecated
public RecordType(java.util.Map<Symbol,HobbesType> fields)
Deprecated. Use RecordType(Map, SymbolTable) instead.


RecordType

public RecordType(java.util.Map<Symbol,HobbesType> fields,
                  SymbolTable<HobbesType> environment)
Method Detail

getTypeFromLexicalEnvironment

public HobbesType getTypeFromLexicalEnvironment(ISymbol symbol)
Specified by:
getTypeFromLexicalEnvironment in interface IRecordType

accept

public <T> T accept(TypeVisitor<T> visitor)
Specified by:
accept in interface HobbesType

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFields

public java.util.Set<Symbol> getFields()
Specified by:
getFields in interface IRecordType

get

public HobbesType get(ISymbol symbol)
Specified by:
get in interface IRecordType

get

public HobbesType get(java.lang.String name)
Specified by:
get in interface IRecordType

actual

public HobbesType actual()
Specified by:
actual in interface HobbesType

isBound

public boolean isBound()
Specified by:
isBound in interface HobbesType

toShortString

public java.lang.String toShortString()
Specified by:
toShortString in interface HobbesType