- java.lang.Object
-
- com.pervasive.datarush.tokens.TokenConverters
-
public class TokenConverters extends Object
A factory for creatingTokenConverter
objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TokenConverter
getConverter(TokenValued value)
Creates a converter, bound to the given valuestatic TokenConverter
getConverter(TokenType type)
Creates a converter appropriate for the given type.static TokenConverter[]
getConverters(RecordValued value)
Creates an array of converters for each scalar field in the given record value.static TokenConverter[]
getConverters(RecordTokenType type)
Creates an array of converters for each scalar type in the given record type.
-
-
-
Method Detail
-
getConverter
public static TokenConverter getConverter(TokenValued value)
Creates a converter, bound to the given value- Parameters:
value
- the value to bind to- Returns:
- a converter, bound to the given value
-
getConverter
public static TokenConverter getConverter(TokenType type)
Creates a converter appropriate for the given type. The converter returned can only be used for values of the type.- Parameters:
type
- the token type for which to create a converter- Returns:
- a new converter object
-
getConverters
public static TokenConverter[] getConverters(RecordTokenType type)
Creates an array of converters for each scalar type in the given record type.- Parameters:
type
- record type- Returns:
- array of converters, one for each scalar field (in order)
-
getConverters
public static TokenConverter[] getConverters(RecordValued value)
Creates an array of converters for each scalar field in the given record value. Each created converter is bound to it's input field.- Parameters:
value
- a record valued source- Returns:
- array of converters, one for each scalar input (in order) bound to the input
-
-