com.veromodo.tempo.sem.type
Class TypeMap

java.lang.Object
  extended by com.veromodo.tempo.sem.type.Type
      extended by com.veromodo.tempo.sem.type.TypeFunctional
          extended by com.veromodo.tempo.sem.type.TypeIndexed
              extended by com.veromodo.tempo.sem.type.TypeMap
All Implemented Interfaces:
java.lang.Comparable<Type>

public class TypeMap
extends TypeIndexed

Defines a type with indexed access using the [] operator the indexes may be sparce

Author:
Carleton

Nested Class Summary
 
Nested classes/interfaces inherited from class com.veromodo.tempo.sem.type.Type
Type.Order, Type.TypeKind
 
Field Summary
 
Fields inherited from class com.veromodo.tempo.sem.type.Type
_name, DEFAULT_NAME
 
Constructor Summary
TypeMap(Type b, int ar)
           
TypeMap(Type b, Type[] at)
           
 
Method Summary
 Type.Order compare(Type t)
          Determines how Type t is realted to this.
 TypeMap downCastMap()
           
 int hashCode()
           
 boolean is(Type.TypeKind kind)
          Determines if the currently instance is of given TypeKind.
 Type resolve()
          Replaces any bound type parameters with thier bound types.
 java.lang.String toString()
           
 void visit(TypeVisitor v)
           
 
Methods inherited from class com.veromodo.tempo.sem.type.TypeIndexed
addIndex, constructedWith, getArity, getBase, getCoDom, getDom, getFunction, getIndex
 
Methods inherited from class com.veromodo.tempo.sem.type.TypeFunctional
downCastFunctional
 
Methods inherited from class com.veromodo.tempo.sem.type.Type
accept, acceptable, compareTo, downCastArray, downCastAugmentedReal, downCastAutomaton, downCastBasicAutomaton, downCastBool, downCastChar, downCastCompositeAutomaton, downCastConstructor, downCastDiscreteReal, downCastEnum, downCastEnumValue, downCastFloat, downCastFunction, downCastFunctionalGeneric, downCastGeneric, downCastInstance, downCastInt, downCastInt32, downCastList, downCastMeta, downCastNat, downCastNumeric, downCastParameter, downCastReal, downCastSum, downCastTuple, downCastVoid, equals, equals, getName, isArray, isAugmentedReal, isAutomaton, isBasicAutomaton, isBool, isChar, isCompositeAutomaton, isConstructor, isDiscreteReal, isEnum, isEnumValue, isEqualTo, isError, isFloat, isFun, isFunctional, isFunctionalGeneric, isGeneric, isId, isIndexed, isInstance, isInt, isInt32, isList, isMap, isMeta, isNat, isNumeric, isParameter, isReal, isSum, isTuple, isVariable, isVoid, lub, select
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap(Type b,
               int ar)

TypeMap

public TypeMap(Type b,
               Type[] at)
Method Detail

is

public boolean is(Type.TypeKind kind)
Description copied from class: Type
Determines if the currently instance is of given TypeKind.

Overrides:
is in class TypeIndexed
Parameters:
kind - the type of class to compare to
Returns:
true if this is of given TypeKind

downCastMap

public TypeMap downCastMap()
Overrides:
downCastMap in class Type

toString

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

resolve

public Type resolve()
Description copied from class: Type
Replaces any bound type parameters with thier bound types. If all parameters are bound, the resulting type is not generic. If no parameters are bounf, the resulting type is this.

Overrides:
resolve in class Type
Returns:
a resolved type

compare

public Type.Order compare(Type t)
Description copied from class: Type
Determines how Type t is realted to this.

Overrides:
compare in class TypeIndexed
Parameters:
t - to compare to this
Returns:

visit

public void visit(TypeVisitor v)
Overrides:
visit in class TypeIndexed

hashCode

public int hashCode()
Overrides:
hashCode in class TypeIndexed