public interface Type
Red (cxh) |
Red (neuendor) |
Modifier and Type | Field and Description |
---|---|
static int |
HASH_INVALID
Used to indicate that the type comparison cache is invalid.
|
Modifier and Type | Method and Description |
---|---|
Type |
add(Type rightArgumentType)
Return a new type which represents the type that results from
adding a token of this type and a token of the given argument
type.
|
java.lang.Object |
clone()
Return a deep clone of this type.
|
Token |
convert(Token token)
Convert the specified token into a token having the type
represented by this object.
|
Type |
divide(Type rightArgumentType)
Return a new type which represents the type that results from
dividing a token of this type and a token of the given
argument type.
|
boolean |
equals(java.lang.Object object)
Determine if the argument represents the same type as this object.
|
java.lang.Class |
getTokenClass()
Return the class for tokens that this type represents.
|
int |
getTypeHash()
Return a perfect hash for this type.
|
boolean |
isAbstract()
Return true if this type does not correspond to a single token
class.
|
boolean |
isCompatible(Type type)
Test if the argument type is compatible with this type.
|
boolean |
isConstant()
Test if this Type is a constant.
|
boolean |
isInstantiable()
Determine if this Type corresponds to an instantiable token
class.
|
boolean |
isSubstitutionInstance(Type type)
Return true if the specified type is a substitution instance of this
type.
|
Type |
modulo(Type rightArgumentType)
Return a new type which represents the type that results from
moduloing a token of this type and a token of the given
argument type.
|
Type |
multiply(Type rightArgumentType)
Return a new type which represents the type that results from
multiplying a token of this type and a token of the given
argument type.
|
Type |
one()
Return the type of the multiplicative identity for elements of
this type.
|
Type |
subtract(Type rightArgumentType)
Return a new type which represents the type that results from
subtracting a token of this type and a token of the given
argument type.
|
java.lang.String |
toString()
Return the string representation of this type.
|
Type |
zero()
Return the type of the additive identity for elements of
this type.
|
static final int HASH_INVALID
Type add(Type rightArgumentType)
rightArgumentType
- The type to add to this type.java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- If an instance cannot be cloned.Token convert(Token token) throws IllegalActionException
token
- a token.IllegalActionException
- If lossless conversion
cannot be done.Type divide(Type rightArgumentType)
rightArgumentType
- The type to add to this type.boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- A Type.int getTypeHash()
java.lang.Class getTokenClass()
boolean isAbstract()
boolean isCompatible(Type type)
type
- An instance of Type.boolean isConstant()
boolean isInstantiable()
boolean isSubstitutionInstance(Type type)
type
- A Type.Type modulo(Type rightArgumentType)
rightArgumentType
- The type to add to this type.Type multiply(Type rightArgumentType)
rightArgumentType
- The type to add to this type.Type one()
Type subtract(Type rightArgumentType)
rightArgumentType
- The type to add to this type.java.lang.String toString()
toString
in class java.lang.Object
Type zero()