ptolemy.data.type
Class BaseType.LongType

java.lang.Object
  extended by ptolemy.data.type.BaseType
      extended by ptolemy.data.type.BaseType.LongType
All Implemented Interfaces:
java.io.Serializable, Type
Enclosing class:
BaseType

public static class BaseType.LongType
extends BaseType

The long integer data type.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.data.type.BaseType
BaseType.ArrayBottomType, BaseType.BooleanType, BaseType.ComplexType, BaseType.DoubleType, BaseType.EventType, BaseType.FloatType, BaseType.GeneralType, BaseType.IntType, BaseType.LongType, BaseType.NilType, BaseType.PetiteType, BaseType.ScalarType, BaseType.ShortType, BaseType.StringType, BaseType.UnknownType, BaseType.UnsignedByteType, BaseType.UnsizedFixType, BaseType.XmlTokenType
 
Field Summary
 
Fields inherited from class ptolemy.data.type.BaseType
ACTOR, ARRAY_BOTTOM, BOOLEAN, BOOLEAN_MATRIX, COMPLEX, COMPLEX_MATRIX, DOUBLE, DOUBLE_MATRIX, EVENT, FIX, FIX_MATRIX, FLOAT, GENERAL, INT, INT_MATRIX, LONG, LONG_MATRIX, MATRIX, NIL, OBJECT, PETITE, RECORD, SCALAR, SHORT, SIZED_FIX, STRING, UNKNOWN, UNSIGNED_BYTE, UNSIZED_FIX, XMLTOKEN
 
Fields inherited from interface ptolemy.data.type.Type
HASH_INVALID, HASH_MAX
 
Constructor Summary
private BaseType.LongType()
           
 
Method Summary
 Token convert(Token t)
          Convert the specified token to a token having the type represented by this object.
 int getTypeHash()
          Return a perfect hash for this type.
 
Methods inherited from class ptolemy.data.type.BaseType
_addType, add, clone, divide, equals, forClassName, forName, getTokenClass, hashCode, isAbstract, isCompatible, isConstant, isInstantiable, isSubstitutionInstance, modulo, multiply, one, subtract, toString, zero
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseType.LongType

private BaseType.LongType()
Method Detail

convert

public Token convert(Token t)
              throws IllegalActionException
Description copied from class: BaseType
Convert the specified token to a token having the type represented by this object.

Specified by:
convert in interface Type
Specified by:
convert in class BaseType
Parameters:
t - A token.
Returns:
A token.
Throws:
IllegalActionException - If lossless conversion cannot be done.

getTypeHash

public int getTypeHash()
Description copied from class: BaseType
Return a perfect hash for this type. This number corresponds uniquely to a particular type, and is used to improve performance of certain operations in the TypeLattice class. All instances of a particular type (e.g. integer array) must return the same number. Types that return HASH_INVALID will not have results in TypeLattice cached. Note that it is safer to return HASH_INVALID, than to return a number that is not unique, or different number for the same type from different instances. This base class returns HASH_INVALID.

Specified by:
getTypeHash in interface Type
Overrides:
getTypeHash in class BaseType
Returns:
A number between 0 and HASH_MAX, or HASH_INVALID.