com.veromodo.tempo.sem.type
Class TypeEnumValue

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

public class TypeEnumValue
extends Type

Defines a enumerated data type value TypeEnumValue tracks the TypeEnum it came from. For example, in the type Color enumeration [green, yellow, red] the values green, yellow, red have the type, TypeEnumValue(TypeEnum("Color", {green, yellow, red}))

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
TypeEnumValue(TypeEnum from)
           
 
Method Summary
 Type.Order compare(Type t)
          Determines how Type t is realted to this.
 TypeEnumValue downCastEnumValue()
           
 TypeEnum getFrom()
           
 boolean is(Type.TypeKind kind)
          Determines if the currently instance is of given TypeKind.
 java.lang.String toString()
           
 void visit(TypeVisitor v)
           
 
Methods inherited from class com.veromodo.tempo.sem.type.Type
accept, acceptable, compareTo, constructedWith, downCastArray, downCastAugmentedReal, downCastAutomaton, downCastBasicAutomaton, downCastBool, downCastChar, downCastCompositeAutomaton, downCastConstructor, downCastDiscreteReal, downCastEnum, downCastFloat, downCastFunction, downCastFunctional, downCastFunctionalGeneric, downCastGeneric, downCastInstance, downCastInt, downCastInt32, downCastList, downCastMap, 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, resolve, select
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeEnumValue

public TypeEnumValue(TypeEnum from)
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 Type
Parameters:
kind - the type of class to compare to
Returns:
true if this is of given TypeKind

downCastEnumValue

public TypeEnumValue downCastEnumValue()
Overrides:
downCastEnumValue in class Type

getFrom

public TypeEnum getFrom()

compare

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

Specified by:
compare in class Type
Parameters:
t - to compare to this
Returns:

visit

public void visit(TypeVisitor v)
Specified by:
visit in class Type

toString

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