- 
- All Superinterfaces:
- Serializable,- TokenTyped
 - All Known Subinterfaces:
- GenericTokenType,- RecordTokenType,- ScalarTokenType
 - All Known Implementing Classes:
- EnumTokenType,- ObjectTokenType
 
 public interface TokenType extends TokenTyped, Serializable A description of the properties of a token data type.Token types are organized in a hierarchy, from most general to most specific. At the root of the type hierarchy is the GenericTokenTypegeneric type, which is primarily used as a place holder denoting any data type. Beneath this type are two major groups of types:scalartypes andcompositetypes. 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. 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckComparable(TokenType type)Tests whether tokens of the specified type can be compared to tokens of this type.voiddispatchByType(TokenTypeDispatcher dispatcher)Dispatches processing to the type-appropriate method of the specified dispatcher.intgetEncodedByteSize()Gets the expected size, in bytes, for tokens of this type.booleanisAbstract()Indicates whether this type is abstract.booleanisAssignableFrom(TokenType source)Indicates whether tokens of the specified type are compatible or implicitly convertible to this type.booleanisComposite()Indicates whether this type is a composite type.booleanisGeneric()Indicates whether this type is the generic type.booleanisScalar()Indicates whether this type is a scalar type.Stringname()Gets the printable name of this type.- 
Methods inherited from interface com.pervasive.datarush.types.TokenTypedgetType
 
- 
 
- 
- 
- 
Method Detail- 
nameString name() Gets the printable name of this type.- Returns:
- a user-friendly name for this type
 
 - 
isCompositeboolean isComposite() Indicates whether this type is a composite type. That is, whether this type describes a structure composed from other types.- Returns:
- whether this type is composite.
 
 - 
isGenericboolean isGeneric() Indicates whether this type is the generic type.- Returns:
- whether this type is the generic type.
 
 - 
isScalarboolean isScalar() Indicates whether this type is a scalar type.- Returns:
- whether this type is scalar.
 
 - 
isAbstractboolean isAbstract() Indicates whether this type is abstract. Scalar types are never abstract. The generic type always is. Composite types are abstract if either: they are comprised of no fields or they contain an abstract type.- Returns:
- whether this type is abstract.
 
 - 
isAssignableFromboolean isAssignableFrom(TokenType source) Indicates whether tokens of the specified type are compatible or implicitly convertible to this type.- Parameters:
- source- the token type of the source data
- Returns:
- trueif the source type can be converted.
 
 - 
checkComparablevoid checkComparable(TokenType type) Tests whether tokens of the specified type can be compared to tokens of this type. For two types to be comparable, at least one type must be implicitly convertible to the other.- Parameters:
- type- the token type of data to compare
- Throws:
- TypesNotComparableException- if the two types are not comparable.
 
 - 
getEncodedByteSizeint getEncodedByteSize() Gets the expected size, in bytes, for tokens of this type. For variable sized types, such as binary data or strings, this is a guess of the average size.- Returns:
- the estimated encoded size of a token of this type.
 
 - 
dispatchByTypevoid dispatchByType(TokenTypeDispatcher dispatcher) Dispatches processing to the type-appropriate method of the specified dispatcher. This is used in generic code to perform type-specific actions based on other input; a rather common case is object construction, where the dispatcher is usually derived fromTypeDispatchedConstructor.- Parameters:
- dispatcher- the class to which to dispatch control
 
 
- 
 
-