public interface TokenType extends TokenTyped, Serializable
Token types are organized in a hierarchy, from most general
to most specific. At the root of the type hierarchy is the
GenericTokenType
generic type, which is primarily
used as a place holder denoting any data type. Beneath
this type are two major groups of types:
scalar
types and
composite
types. Scalars provide
the atomic units of the typing system; composites provide
the ability extend typing in a structured way.
Any type can be used as a place holder for the set of its more specific types. Used on the inputs to an operator, it allows multiple input types to be accepted. Used on the output of an operator, it can denote a variably typed output. In this case the true type is determined from the inputs or settings of the operator. The operator documentation will clarify whether this is the case.
Modifier and Type | Method and Description |
---|---|
void |
checkComparable(TokenType type)
Tests whether tokens of the specified type can be
compared to tokens of this type.
|
void |
dispatchByType(TokenTypeDispatcher dispatcher)
Dispatches processing to the type-appropriate method of the
specified dispatcher.
|
int |
getEncodedByteSize()
Gets the expected size, in bytes, for tokens of this
type.
|
boolean |
isAbstract()
Indicates whether this type is abstract.
|
boolean |
isAssignableFrom(TokenType source)
Indicates whether tokens of the specified type are
compatible or implicitly convertible to this type.
|
boolean |
isComposite()
Indicates whether this type is a composite type.
|
boolean |
isGeneric()
Indicates whether this type is the generic type.
|
boolean |
isScalar()
Indicates whether this type is a scalar type.
|
String |
name()
Gets the printable name of this type.
|
getType
String name()
boolean isComposite()
boolean isGeneric()
boolean isScalar()
boolean isAbstract()
boolean isAssignableFrom(TokenType source)
source
- the token type of the source datatrue
if the source type can be
converted.void checkComparable(TokenType type)
type
- the token type of data to compareTypesNotComparableException
- if the two
types are not comparable.int getEncodedByteSize()
void dispatchByType(TokenTypeDispatcher dispatcher)
TypeDispatchedConstructor
.dispatcher
- the class to which to dispatch controlCopyright © 2020 Actian Corporation. All rights reserved.